[asterisk-users] How does chan_sip match an ACK?

Tony Mountifield tony at softins.co.uk
Mon Mar 30 11:21:35 CDT 2015


I am trying to debug a SIP issue, between an Asterisk 1.2.32 system that
is behind a network device to which I don't have ready access, which is
performing NAT with possibly some kind of SIP ALG, and an Asterisk 11
system on a public IP.

My question is very specific, and I don't need right now to discuss the
ins and outs of the above setup.

What I am seeing is that when I have set up a call from the Asterisk 11
system, the 1.2.32 system is sending 200 OK, and sip debug shows the
ACK response coming back from the Asterisk 11 box. However, the ACK
appears not to be understood, because the 200 OK gets re-sent, multiple
times, and eventually gives up.

My specific question is, what values in the ACK does chan_sip (1.2.32)
use to match the ACK with the pending 200 OK? My understanding of the
chan_sip.c code is not good enough to work it out for certain.

Here is the 200 OK (I've changed the address of the public endpoint):

Mar 30 10:20:20 VERBOSE[5811] logger.c: Retransmitting #5 (no NAT) to 11.111.11.111:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 11.111.11.111:5060;branch=z9hG4bK6bee4b53;received=11.111.11.111
From: "Tony Mountifield" <sip:2011 at 11.111.11.111>;tag=as4ab948f7
To: <sip:12345 at 172.16.141.143>;tag=as76e64309
Call-ID: 21bf5fa61b5e98880b96448118310bf7 at 11.111.11.111:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:12345 at 172.16.141.143>
Content-Type: application/sdp
Content-Length: 218

v=0
o=root 5732 5732 IN IP4 172.16.141.143
s=session
c=IN IP4 172.16.141.143
t=0 0
m=audio 16282 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

And here is the ACK in reply that is not getting understood:

<-- SIP read from 11.111.11.111:5060:
ACK sip:12345 at 172.16.141.143 SIP/2.0
Via: SIP/2.0/UDP 11.111.11.111:5060;branch=z9hG4bK36651b68
Max-Forwards: 70
From: "Tony Mountifield" <sip:2011 at 11.111.11.111>;tag=as4ab948f7
To: <sip:12345 at 172.16.141.143>;tag=as76e64309
Contact: <sip:2011 at 11.111.11.111:5060>
Call-ID: 21bf5fa61b5e98880b96448118310bf7 at 11.111.11.111:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 11.5.0
Content-Length: 0

So what is it about the ACK that is wrong?

Thanks for any help!

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list