VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tony at softins.co.uk Guest
|
Posted: Mon Mar 30, 2015 11:21 am Post subject: [asterisk-users] How does chan_sip match an ACK? |
|
|
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@11.111.11.111>;tag=as4ab948f7
To: <sip:12345@172.16.141.143>;tag=as76e64309
Call-ID: 21bf5fa61b5e98880b96448118310bf7@11.111.11.111:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:12345@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@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@11.111.11.111>;tag=as4ab948f7
To: <sip:12345@172.16.141.143>;tag=as76e64309
Contact: <sip:2011@11.111.11.111:5060>
Call-ID: 21bf5fa61b5e98880b96448118310bf7@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@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
tony at softins.co.uk Guest
|
Posted: Tue Mar 31, 2015 10:38 am Post subject: [asterisk-users] How does chan_sip match an ACK? |
|
|
In article <mfbt6f$9rt$1@softins.softins.co.uk>,
Tony Mountifield <tony@softins.co.uk> wrote:
Quote: | 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.
|
OK, for the future reference of anyone else having a similar problem,
this is what was happening:
The dialplan was doing an immediate Answer:
exten => _X.,1,Answer
exten => _X.,n,Goto(wherever)
This means that the answering system, upon receiving the SIP INVITE,
would reply with a 100 Trying, followed immediately by a 200 OK.
Now, the two systems are actually on opposite sides of the Atlantic,
and the sending system sent the INVITE with a very short retransmission
timeout (T1 appeared to be 228ms due to a qualify time of 114ms). And by
the time it received the replies from the receiving system, it had
already retransmitted the INVITE.
However, the receiving system, having sent the 200 OK, then received
the repeat INVITE. It looks like it repeated the 200 OK, but then the
ACK from the sending system didn't get recognised properly.
I appear to have overcome it by putting in a delay before the Answer,
so that any repeated INVITE would arrive before the receiving system
tried sending the 200 OK to Answer:
exten => _X.,1,Ringing
exten => _X.,n,Wait(1)
exten => _X.,n,Answer
exten => _X.,n,Goto(wherever)
On further reading, I would think I could also solve it by setting the
T1 values in sip.conf, instead of doing the above:
Should I set "timert1=500", or "t1min=500" or both, or what?
Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|