Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running Asterisk 1.6.1.10 / FreePBX 2.5.2.2 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:

username=<user>
fromuser=<user>
canreinvite=no
type=friend
secret=<pass>
qualify=no [qualify yes produces 401/forbidden messages]
nat=yes
insecure=very
host=<sip trunk gateway>
fromdomain=<sip trunk gateway>
disallow=all
context=from-pstn
allow=ulaw
dtmfmode=inband

Under sip_general_custom.conf i have

stunaddr=stun.xten.com
externrefresh=120
localnet=192.168.1.1/255.255.255.0
nat=yes

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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