Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Asterisk / FreePBX and I've got an outbound trunk setup. Everything use to work fine until recently (perhaps due to upgrade to FC12 or other things I'm not sure).

Anyway the setup does not appear to have issues registering and setting up the call, RTP packets go both ways and you can hear the ringing from the other side. However it appears that when the call is picked up or thereabouts, the incoming RTP packets cease. Upon closer inspection with Wireshark, there are these particular packets that seem to be the cause:

trunk->asterisk SIP/SD Status: 200 OK, with session description
asterisk->trunk SIP    Request: ACK sip:<phone>@trunk:6889
asterisk->trunk SIP    Request: BYE sip:<phone>@trunk:6889
[..about a dozzen RTP packets in/outbound..]
trunk->asterisk SIP    Status: 200 OK, CSeq: 104 Bye
[..outbound RTP continues, phone is silent..]

Then the inbound RTP packets cease, however the asterisk logs dont show any activity at this point. The last entry reads 'SIP/ is answered SIP/'.

Then when you hangup the extension, you get

asterisk->trunk SIP    Request: BYE sip:<phone>@trunk:6889
trunk->asterisk SIP    Status: 481 Call Leg/Transaction does not exist

My trunk peer settings in FreePBX are:

qualify=no [qualify yes produces 401/forbidden messages]
host=<sip trunk gateway>
fromdomain=<sip trunk gateway>

Under sip_general_custom.conf i have

Whats causing Asterisk to prematurely end the call and still think the call is in progress? I have no idea where to look next.

share|improve this question

Try turning canreinvite to yes, and reloading sip. also, post the output of sip set debug on before and after this change.

share|improve this answer

There's a BYE in there generated when you pick up the phone - there's no timestamps on the above, but it seems to occur immediately following the 200 OK. The second BYE is then generated which is outside of the conversation now - hence the 481.

Can you give us a SIP trace of the conversation showing the textual content of the sip conversation? I believe in asterisk it's the command "sip debug".

Cheers, Aled.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.