Dropped calls with a SIP trunk and Asterisk 1.6? Try upgrading!

At a customers site, we did have severe problems with a SIP trunk and a Trixbox PBX (version 2.8.0.4, based on Asterisk 1.6.0.26). Both incoming and outgoing calls were dropping. I describe a short history of what we did to resolve the problem for others in the community, as I did not find a similar report in Google.

The setup is a pure VoIP environment, with Snom VoIP phones and a 2-channel SIP trunk over public internet to the German provider Sipgate.

The obvious first try was to call Sipgate and ask whether they can see any problems. After several debugging sessions, it was clear that they could not help us. From their side, all dropped calls looked like the calls were properly terminated from the POTS side.

The Asterisk log file wasn't very helpful either. The only message was

WARNING[30616] chan_sip.c: Trying to destroy "<call-id>@sipconnect.sipgate.de", not found in dialog list?!?!

Increasing the log level to the most verbose setting, we only found this additional message:

DEBUG[30588] pbx.c: FONALITY: This thread has already held the conlock, skip locking

This message is documented with several VOIP-related problems, but none of those seemed to match our scenario.

To rule out any problems created by STUN, timeouts in the firewall connection tracking etc., we had set up an public IP dedicated for VoIP and assigned that directly to the Asterisk server (via ARP proxying) to definitely get rid of all NAT problems. No success.

In the PCAP packet trace of the traffic we found this SIP message:

481 Call leg/transaction does not exist

We decided to try to replace the Asterisk that was included with Trixbox by a current Asterisk 1.8 build. Voila - the problems were gone! If you experience similar problems, try upgrading to the latest Asterisk release!

Due to lots of customer-specific information in the packet trace, I cannot offer the trace for download.