News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Obi202 / Twilio SIP - Too many bindings for a registration endpoint

Started by mattp, January 10, 2018, 04:20:35 AM

Previous topic - Next topic

mattp

I connected SP2 on my Obi202 to Twilio's SIP registration service.

Incoming/outgoing calls worked great (ie had full working setup).  Incoming calls seem to still work (depends on registration) but meanwhile there are a huge number of errors on twilio's end in their debugger.

https://imgur.com/GDFN39L.png

https://imgur.com/47nI1OS.png

https://imgur.com/NQkXox6.png

On the obitalk side you can see the 403/Forbidden and "register failed"...but this doesn't actually seem to mean register is failed since incoming calls still work.

https://imgur.com/1c1gkvK.png

My intuition says that for some reason the Obi202 is trying to register multiple times while other registrations are still considered alive and valid by Twilio and this gets the Obi202 over the max of 10 concurrent registrations imposed by twilio.  So the box is still registered but is trying to register again for some reason.

When I set this up I did a lot of testing (scripts on the twilio end to manage incoming/outgoing calls) and was frequently using the twilio debugging console...these errors weren't happening then.  I am guessing in the meantime there was either an Obi firmware update changing behaviour or a change on the twilio side that exposed existing Obi firmware behaviour (could be twilio just didn't complain about this before).

In any case it blows up my logs and would be great to get a firmware update to make sure the Obi202 is releasing registrations properly or not trying to create new ones while an old one is still valid.

I searched but couldn't find any details on this issue.  Maybe there is some type of "keep alive" setting I can use to address this issue?

Happy for any constructive advice.

billsimon

Find out what Twilio's default registration time is and set the Obi to use that for its own registration timer. It is probably trying to register every minute (which is an insane default).

mattp

Thanks for the idea.  Looks like 10 minutes for register refresh. 

https://www.twilio.com/docs/api/voice/sip-registration

Obitalk indeed had RegistrationPeriod set to 60 seconds.  Changed to 600, we'll see if that makes a difference.  Sorry for not responding sooner, didn't get any reply notifications.

https://i.imgur.com/arsoMmA.png

mattp

Just an update that even with the SIP registrationperiod set to 600 I am still getting errors from Twilio every 2 (sometimes 5) minutes.

32007 - SIP: Too many endpoints/bindings for the Address-of-record (AOR)

Double checked that I made the change to the correct ITSP profile on the obitalk box and verified in twilio that the user-agent for the offending SIP device is the Obitalk 202.

UserAgent "OBIHAI/OBi202-3.2.1.5794"

Perhaps this setting doesn't work properly or there is a different or additional setting that needs to be put in place to make this work?

mattp

I increased RegistrationPeriod to 900 seconds and added X_RegistrationMargin of 180 to make sure we don't try to re-register before twilio's 600 second limit.

Unfortunately, still getting all the errors about too many concurrent registrations from the obitalk box.

I guess the next level would be to snoop on the SIP packets with wireshark and figure out if the obitalk box is following the configured timing or not... but unlikely I will have time for that level of troubleshooting.

Was hoping there was some other setting that could cause this behaviour that I had missed. 

drgeoff

I assume you are not making the "schoolboy error" of using both the portal and the device's on board web server UI to configure your OBi202.

mattp

Using obi-expert within the web portal.  Could that be the cause of the problem?  Happy to be pointed in a better direction.  Thanks.

drgeoff

Quote from: mattp on April 03, 2018, 11:23:24 AM
Using obi-expert within the web portal.  Could that be the cause of the problem?  Happy to be pointed in a better direction.  Thanks.
No, that's not the cause of the problem

mattp

Spent a little more time looking at this today. Adjusted a few more obi-expert settings I thought might help.



Looks like the expiration is set right (900secs/15min) from inspecting the active registrations on twilio.
However it also looks like the Obitalk202 is trying to register every 20 seconds (creation time stamps for sip registrations 20 seconds apart).

I started thinking maybe the Obitalk box was retrying on failure too much, so spaced that out (although if everything else is working, that shouldn't be an issue).

Also thought if the expiration on twilio's end was out of sync with that on obitalk's end...then obitalk tries to re-register because it thinks it doesn't have a valid registration anymore...but twilio still has those registrations as active.

Anyway, the settings don't seem to have any effect. Still getting lots of errors in the twilio console related to this.

Happy to have other ideas.



mattp

This is still an issue.  I gave up on using the obi202 for the last year because of the issue.

Took another crack at getting it back online today and discovered my IP is now blacklisted by twilio because of too many registration requests!  :)

Before I ask twilio to remove me from the blacklist, I need to get this resolved...plus I need the phone working now more than before.

1) Anyone else using an Obi20x box with twilio sip registration?  If so are you having the same problem?  Anyone willing to share configs (sanitized of course) so I can diff them and try to figure out the root cause?

2) Any recommendation on using the portal vs just ditching the portal and using the box web interface directly (eg missing features, more stable, etc)?

Thanks!

SteveInWA

If I had a problem that persisted after a year and a half of dinking around, I'd refer to the old cliche about "the definition of insanity is doing the same thing over and over and expecting different results".

What is your requirement to use Twilio?  Can't you use some other ITSP instead?  Nobody here on this forum seems to have a solution for you.

mattp

Quote from: SteveInWA on June 20, 2019, 07:51:01 PM
If I had a problem that persisted after a year and a half of dinking around, I'd refer to the old cliche about "the definition of insanity is doing the same thing over and over and expecting different results".

What is your requirement to use Twilio?  Can't you use some other ITSP instead?  Nobody here on this forum seems to have a solution for you.

I hear you.  We have API integrations with twilio and use them for a lot of stuff.

I have verified that the re-registration requests are happening very frequently via wireshark...so the twilio problem relative to other ITSP providers is perhaps that they are less tolerant of "abuse" (ie re-registering every 20 seconds or so instead of every 15 minutes).  A different ITSP may only solve the problem if they don't care about the re-registrations.

The obitalk problem is why the configuration regarding registration timeout intervals/expiration/etc doesn't seem to have an effect.  I am guessing that somewhere in the 200 form fields of configuration options in obi expert I missed something.  OR something about my network is blocking certain types of packets leading the obi box to think the registration is expiring.  Finally got around to putting my crappy cable modem in bridge mode and putting one of my SRX firewall/routers in place...so in a better position to fine tune the network side of things (why I came back to the topic after so long).

If it is a network issue (obi thinks registration expired for some reason), then I know there is little help here and I need to do a deeper dive with wireshark.

However given the problem persists with a completely different firewall/router with zero policies in place...I suspect this is a missed configuration option or bug on the obitalk side.  I should be able to configure registration interval I would think.  Of course I only suspect, not assume.

Given no one else seems to have this problem I will go the wireshark route first and try to get more information.  I originally posted hoping someone would look at my config and say: "yeah, you mis-understood that option, you need to set this other thing to change the registration interval for the obi boxes."

Oh well.