News:

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

Main Menu

Fundamental design flaw in SIP protocol

Started by JaskHill, November 23, 2020, 08:40:54 AM

Previous topic - Next topic

JaskHill

Hi, I think I found a fundamental design flaw in SIP protocol.

If I restart my modem, then the public (WAN) IP address of my modem will change. But at that time point the OBI box is not aware of this, and the registration server is still keeping my old public (WAN) IP address, until the next registration.

So, it means that if I restart my modem, or if my modem modifies the public (WAN) IP address on its own for whatever reason, then incoming calls to my OBI box will fail, because they still want to reach my old public IP address, until the next OBI box registration.

So no one has brought attention to this fundamental design flaw in SIP protocol?

drgeoff

#1
Quote from: JaskHill on November 23, 2020, 08:40:54 AM
Hi, I think I found a fundamental design flaw in SIP protocol.

If I restart my modem, then the public (WAN) IP address of my modem will change. But at that time point the OBI box is not aware of this, and the registration server is still keeping my old public (WAN) IP address, until the next registration.

So, it means that if I restart my modem, or if my modem modifies the public (WAN) IP address on its own for whatever reason, then incoming calls to my OBI box will fail, because they still want to reach my old public IP address, until the next OBI box registration.

So no one has brought attention to this fundamental design flaw in SIP protocol?
This "flaw" has been known for years.  There is no mention of, nor regard for, NAT in the SIP RFC. https://tools.ietf.org/html/rfc3261

Hence https://tools.ietf.org/html/rfc5389 (dated 2008), https://tools.ietf.org/html/rfc6314 (2011) etc.

Sheffield_Steve

Not at all.  You misunderstand how this all works.  

The Obi box is a SIP client.   It negotiates a connection with the SIP server and is responsible for maintaining that connection.  i.e. If you reboot your modem, the Obi box will renegotiate a new connection with that SIP server.

At no point does the SIP server initiate a connection to your modem/Obi box.  It only responds to an initiation from the SIP client which provides the connection information needed.

A good analogy is your web browser. (web client).  You can reboot your modem and it won't have any problem connecting to a web server.


Quote from: JaskHill on November 23, 2020, 08:40:54 AM
Hi, I think I found a fundamental design flaw in SIP protocol.

If I restart my modem, then the public (WAN) IP address of my modem will change. But at that time point the OBI box is not aware of this, and the registration server is still keeping my old public (WAN) IP address, until the next registration.

So, it means that if I restart my modem, or if my modem modifies the public (WAN) IP address on its own for whatever reason, then incoming calls to my OBI box will fail, because they still want to reach my old public IP address, until the next OBI box registration.

So no one has brought attention to this fundamental design flaw in SIP protocol?

drgeoff

#3
Quote from: Sheffield_Steve on November 23, 2020, 11:18:25 AM
Not at all.  You misunderstand how this all works.  

The Obi box is a SIP client.   It negotiates a connection with the SIP server and is responsible for maintaining that connection.  i.e. If you reboot your modem, the Obi box will renegotiate a new connection with that SIP server.
Not quite.  The OBi does not contact the SIP server again automatically as soon as the WAN address changes.  It only re-registers depending on the time set in Service Providers/ITSP Profile x/SIP/RegisterExpires (*).  Until the OBi re-registers the SIP server will indeed try to send calls to the old WAN address.

* The SIP registrar can tell the client to use a different registration interval.

Sheffield_Steve

#4
You are almost right.

If the modem is rebooted.  Then indeed the connection will not be reestablished until the Obi makes another registration attempt

But, the SIP sever NEVER tries to make a direct connection (calls) to the modem/Obi.  If it looses connection it won't attempt to make a call to the OBi until the OBi has re-registered and made a new connection with the server.


Quote from: drgeoff on November 23, 2020, 11:54:16 AM
Not quite.  The OBi does not contact the SIP server again automatically as soon as the WAN address changes.  It only re-registers depending on the time set in Service Providers/ITSP Profile x/SIP/RegisterExpires.  Until it re-registers the SIP server will indeed try to send calls to the old WAN address.

drgeoff

Quote from: Sheffield_Steve on November 23, 2020, 12:02:24 PM
You are almost right.

If the modem is rebooted.  Then indeed the connection will not be reestablished until the Obi makes another registration attempt

But, the SIP sever NEVER tries to make a direct connection (calls) to the modem/Obi.  If it looses connection it won't attempt to make a call to the OBi until the OBi has re-registered and made a new connection with the server.


Quote from: drgeoff on November 23, 2020, 11:54:16 AM
Not quite.  The OBi does not contact the SIP server again automatically as soon as the WAN address changes.  It only re-registers depending on the time set in Service Providers/ITSP Profile x/SIP/RegisterExpires.  Until it re-registers the SIP server will indeed try to send calls to the old WAN address.
How can the SIP server know that connection is lost? It isn't expecting anything from the client until the next re-registration.

JaskHill

So how do I force the OBI box to immediately send the new WAN IP address to the registration server, after I restart the modem?

Restart the OBI box immediately afterwards ?  or make an outgoing call immediately afterwards ?

drgeoff

Quote from: JaskHill on November 24, 2020, 07:44:25 AM
So how do I force the OBI box to immediately send the new WAN IP address to the registration server, after I restart the modem?

Restart the OBI box immediately afterwards ?  or make an outgoing call immediately afterwards ?

Wait 2 minutes for the modem to fully reboot after your restart it.  Then power cycle the OBi.

Sheffield_Steve

The SIP server software (like all software) is responsible for any sockets it creates.  It typically monitors them periodically using the recv command, but most certainly before sending a SIP message/initiating a call.

Quote from: drgeoff on November 23, 2020, 01:54:43 PM
How can the SIP server know that connection is lost? It isn't expecting anything from the client until the next re-registration.