WARNING chan_sip.c: Failed to parse contact info

Does anybody know what this warning means? It started when we upgraded to the current Asterisk version.

PBX in a Flash Version = 1.7.5.5
FreePBX Version = 2.8.1.4
Running Asterisk Version = Asterisk 1.6.2.17
Asterisk Source Version = 1.6.2.17
Dahdi Source Version = 2.4.0+2.4.0
Libpri Source Version = 1.4.11.5
Addons Source Version = 1.6.2.3
Operating System = CentOS release 5.5 (Final)
Kernel Version = 2.6.18-194.32.1.el5 - 32 Bit

Yes. Thanks. I found a couple of extensions like that. I think the grandstream ATAs are downloading new firmware that’s not compatible with the old provisioning files on our server. This is the log.

[2011-03-16 11:35:15] DEBUG[3597] chan_sip.c: **** Received REGISTER (2) - Command in SIP REGISTER
[2011-03-16 11:35:15] DEBUG[3597] chan_sip.c: Trying to put ‘SIP/2.0 100’ onto UDP socket destined for 216.59.229.152:49234
[2011-03-16 11:35:15] DEBUG[3597] chan_sip.c: Trying to put ‘SIP/2.0 401’ onto UDP socket destined for 216.59.229.152:49234
[2011-03-16 11:35:15] DEBUG[3597] chan_sip.c: **** Received REGISTER (2) - Command in SIP REGISTER
[2011-03-16 11:35:15] DEBUG[3597] chan_sip.c: Trying to put ‘SIP/2.0 100’ onto UDP socket destined for 216.59.229.152:49234
[2011-03-16 11:35:15] WARNING[3597] chan_sip.c: Failed to parse contact info
[2011-03-16 11:35:15] DEBUG[3597] chan_sip.c: Trying to put ‘SIP/2.0 400’ onto UDP socket destined for 216.59.229.152:49234
[2011-03-16 11:35:15] DEBUG[3571] devicestate.c: No provider found, checking channel drivers for SIP - 5145451234
[2011-03-16 11:35:15] DEBUG[3571] chan_sip.c: Checking device state for peer 5145451234
[2011-03-16 11:35:15] DEBUG[3571] devicestate.c: Changing state for SIP/5145451234 - state 5 (Unavailable)
[2011-03-16 11:35:15] DEBUG[3571] devicestate.c: device ‘SIP/5145451234’ state ‘5’
[2011-03-16 11:35:15] DEBUG[3595] app_queue.c: Device ‘SIP/5145451234’ changed to state ‘5’ (Unavailable) but we don’t care because they’re not a member of any queue.
[2011-03-16 11:35:15] DEBUG[3572] devicestate.c: Checking if I can find provider for “Custom” - number: DND5145451234
[2011-03-16 11:35:15] DEBUG[3572] devicestate.c: Checking provider Custom with Custom
[2011-03-16 11:35:15] DEBUG[3572] db.c: Unable to find key ‘DND5145451234’ in family ‘CustomDevstate’

Thanks but I don’t see any failed registrations. Gotta be something else.

The pertinent chan_sip.c lines (related to the comment I pasted in my first message) :

ast_log(LOG_WARNING, "Failed to parse contact info\n");
transmit_response_with_date(p, "400 Bad Request", req);

so if you turn on sip debugging and then see who is getting 400 Bad Request, at the same time the warning appears in your log file, you will find the culprit.

I do not see how this is specifically linked to your upgrade of Asterisk. That code has been in place for a long time. I see it in 1.4 and 1.8. I don’t feel like tracing back but I bet it has been in there for a very long time.

Comments in the source for chan_sip:

                    /* Contact header parameter "*" detected, so punt if: Expires header is missing,
                     * Expires value is not zero, or another Contact header is present. */

Find out who’s trying to register to your Asterisk server when this warning occurs, and examine that device’s configuration.

When you see this warning in the log, the client registering is getting a 400 Bad Request response, so they’re not successfully registering. Look through your peers and see who’s not registered.