Asterisk 13 “ __set_address_from_contact: Invalid contact ur

I’m installing Asterisk 13 on our production Ubuntu 14.0.4 box and the process seemed to go well. I previously installed it on my personal server as well. It works perfectly on my personal server, but on the production server, I periodically get this error:

[May 11 17:48:43] WARNING[6754]: chan_sip.c:16110 __set_address_from_contact: Invalid contact uri (missing sip: or sips:), attempting to use anyway [May 11 17:48:43] WARNING[6754]: chan_sip.c:16123 __set_address_from_contact: Invalid URI: parse_uri failed to acquire hostport [May 11 17:48:43] WARNING[14673]: file.c:905 ast_readaudio_callback: Failed to write frame [May 11 17:48:43] WARNING[14673]: app_playback.c:493 playback_exec: Playback failed on SIP/vitel-outbound-00000003 for tt-monkeys

To get the error, I’m running asterisk -rvvvvv and then running the command below to test:

The first or second time I attempt the call, it works - my phone rings and I’m assaulted by monkey screams. Usually the third or fourth time, however, I get the error shown above. My phone does ring, but then it immediately hangs up when I answer.

If I exit asterisk and do a sudo service asterisk restart, everything goes back to being healthy for a few calls.

My only other observation is that in the failure cases, it tends to take a while before my phone rings. When it works, I’ll send the command and my phone will ring a few seconds later.

Any suggestions? I’m stumped.

The error is in what is being sent by the peer. You need sip debugging to see what it is doing wrong.

You should review the “REGISTER Sip” package > headers > Contact URI .
Surely that’s the problem.
Contact URI field, should be formatted as follows:
<Sip: user@x.x.x.x: port>

Excuse my English

It’s complaining about an incoming contact header, not one that Asterisk is sending. Also “REGISTER Sip” package > headers > Contact URI" looks like instructions for using some sort of third party GUI.