OBI 100 - Outbound 400 errors - Content Length Mismatch - Culprit is SIP ALG on Netgear Router

I couldn't make outgoing calls with my OBI 100. On the phone you'd hear the high pitched three tones that signify an error and hear something like "The number you dialed, was rejected by the service provider, error 4 0 0". 

Incoming calls worked OK. 

A test call to **9 222 222 222 which is the OBI echo service worked fine.

A check of the call history at the OBI device web interface at 192.168.1.x shows the outgoing call log as shown below. The 400 error was more specifically a Content Length Mismatch which is a mismatch between the content as given by the SIP header and that given by the UDP header. Examples of the Content Length Mismatch in the OBI call log are shown below.

This onion had three layers to peel back. The layers were:

  1. First I saw that resetting my Netgear router would temporarily allow outgoing calls to go through. It was a start, but the next time I would go to use the phone the errors would return and I would then have to reset the router again. Not good. But in retrospect it provided a clue that the problem lay within the router. And while using a previous (lower end) router there had been no issues.
  2. Next, I found this link  - it seems that for my service provider, Vestalink, it's important to use port 8891. They say using the default port of 5060 causes problems. I set all ports to 8891 but that did not solve the problem.
  3. Finally, the answer was found on a Netgear forum. The problem lies with the router's attempt to implement a SIP ALG (Application-level Gateway). It seems that many commercial routers simply don't implement SIP ALG correctly. The ALG attempts to rewrite the SIP packets to account for the fact that the SIP client is behind a NAT device. However, this is 
                 a) Not needed because most SIP providers take care of this on the server side.
                 b) Usually done incorrectly leading to the Content Length Mismatch errors. 

On my Netgear router configuring [Advanced Setup | WAN Setup | NAT Filtering | Disable SIP ALG] solved the issue.

    

Comments

Anonymous said…
Thanks for this, it helped me. Couldn't figure out why a NEW router would give me trouble while my old one worked fine! Thank you!

Popular posts from this blog

Hit failing alternator with a hammer to confirm diagnosis of failing alternator due to bad brushes

alternatives --install gets stuck: failed to read link: No such file or directory

Using SSH, SOCKS, tsocks, and proxy settings to create a simultaneous "dual use" work/home computer