Hello Daniel/Stoyan
Thanks for your reply, here is a full sip trace from the first INVITE message to the last acknowledge which is sent to PGW.
192.168.10.189 ==> 81.21.38.34
INVITE sip:94294294@81.21.38.34 SIP/2.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport Max-Forwards: 70 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Contact: sip:22498045@192.168.10.189:5060 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE User-Agent: FPBX-2.8.1(1.8.21.0) Date: Thu, 06 Jun 2013 09:40:42 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Type: application/sdp Content-Length: 265
v=0 o=root 1692903116 1692903116 IN IP4 192.168.10.189 s=Asterisk PBX 1.8.21.0 c=IN IP4 192.168.10.189 t=0 0 m=audio 12584 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv
81.21.38.34 ==> 192.168.10.189
SIP/2.0 100 trying -- your call is important to us Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport=5060 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Server: kamailio (4.0.1 (x86_64/linux)) Content-Length: 0
81.21.38.34 ==> 81.21.38.5
INVITE sip:3005A94294294@81.21.38.5 SIP/2.0 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport=5060 Max-Forwards: 16 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Contact: sip:22498045@192.168.10.189:5060 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE User-Agent: FPBX-2.8.1(1.8.21.0) Date: Thu, 06 Jun 2013 09:40:42 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Type: application/sdp Content-Length: 277 P-hint: outbound
v=0 o=root 1692903116 1692903116 IN IP4 81.21.38.34 s=Asterisk PBX 1.8.21.0 c=IN IP4 81.21.38.34 t=0 0 m=audio 38796 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv a=nortpproxy:yes
81.21.38.5 ==> 81.21.38.34
SIP/2.0 100 Trying Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport=5060 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Content-Length: 0
81.21.38.5 ==> 81.21.38.34
INVITE sip:7000A94294294@81.21.38.34:5060;user=phone SIP/2.0 Via: SIP/2.0/UDP 81.21.38.5:5060;branch=z9hG4bKterm-1105c-22498045-94294294-67117 Record-Route: sip:94294294@81.21.38.5;pgw-call=call-2aa6 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport=5060 Max-Forwards: 15 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Contact: sip:22498045@192.168.10.189:5060 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE User-Agent: FPBX-2.8.1(1.8.21.0) Date: Thu, 06 Jun 2013 09:40:42 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Type: application/sdp Content-Length: 277 P-hint: outbound
v=0 o=root 1692903116 1692903116 IN IP4 81.21.38.34 s=Asterisk PBX 1.8.21.0 c=IN IP4 81.21.38.34 t=0 0 m=audio 38796 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv a=nortpproxy:yes
81.21.38.34 ==> 81.21.38.5
SIP/2.0 100 trying -- your call is important to us Via: SIP/2.0/UDP 81.21.38.5:5060;branch=z9hG4bKterm-1105c-22498045-94294294-67117 Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport=5060 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Server: kamailio (4.0.1 (x86_64/linux)) Content-Length: 0
81.21.38.34==>81.21.38.55
INVITE sip:94294294@81.21.38.55 SIP/2.0 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.ef179a29b1792073be0e0618cf49ac25.0 Via: SIP/2.0/UDP 81.21.38.5:5060;branch=z9hG4bKterm-1105c-22498045-94294294-67117 Record-Route: sip:94294294@81.21.38.5;pgw-call=call-2aa6 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK7ddbce3f;rport=5060 Max-Forwards: 14 From: "22498045" sip:22498045@192.168.10.189;tag=as181922af To: sip:94294294@81.21.38.34 Contact: sip:22498045@192.168.10.189:5060 Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE User-Agent: FPBX-2.8.1(1.8.21.0) Date: Thu, 06 Jun 2013 09:40:42 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Type: application/sdp Content-Length: 277 P-hint: outbound P-hint: outbound
v=0 o=root 1692903116 1692903116 IN IP4 81.21.38.34 s=Asterisk PBX 1.8.21.0 c=IN IP4 81.21.38.34 t=0 0 m=audio 38796 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv a=nortpproxy:yes
81.21.38.55 ==> 81.21.38.34
SIP/2.0 200 OK From: "22498045"sip:22498045@192.168.10.189;tag=as181922af To: <sip:94294294@81.21.38.34
;tag=3d95248-37261551-13c4-50022-1c3096-5cc2673d-1c3096
Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.ef179a29b1792073be0e0618cf49ac25.0 Via: SIP/2.0/UDP 81.21.38.5:5060 ;branch=z9hG4bKterm-1105c-22498045-94294294-67117 Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;rport=5060;branch=z9hG4bK7ddbce3f Supported: replaces Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af Record-Route: sip:94294294@81.21.38.5;pgw-call=call-2aa6 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Contact: sip:94294294@81.21.38.55 Allow: INVITE, CANCEL, ACK, BYE, OPTIONS, INFO, REFER, NOTIFY, UPDATE Content-Type: application/sdp Content-Length: 242
v=0 o=Dialogic_SIP_CCLIB 64680888 64680889 IN IP4 81.21.38.55 s=Dialogic_SIP_CCLIB c=IN IP4 81.21.38.55 t=0 0 m=audio 49156 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=sendrecv a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15
81.21.38.34 ==> 81.21.38.5
SIP/2.0 200 OK From: "22498045"sip:22498045@192.168.10.189;tag=as181922af To: <sip:94294294@81.21.38.34
;tag=3d95248-37261551-13c4-50022-1c3096-5cc2673d-1c3096
Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Via: SIP/2.0/UDP 81.21.38.5:5060 ;branch=z9hG4bKterm-1105c-22498045-94294294-67117 Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;rport=5060;branch=z9hG4bK7ddbce3f Supported: replaces Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af Record-Route: sip:94294294@81.21.38.5;pgw-call=call-2aa6 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Contact: sip:94294294@81.21.38.55 Allow: INVITE, CANCEL, ACK, BYE, OPTIONS, INFO, REFER, NOTIFY, UPDATE Content-Type: application/sdp Content-Length: 260
v=0 o=Dialogic_SIP_CCLIB 64680888 64680889 IN IP4 81.21.38.34 s=Dialogic_SIP_CCLIB c=IN IP4 81.21.38.34 t=0 0 m=audio 47332 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=sendrecv a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=nortpproxy:yes
81.21.38.5 ==> 81.21.38.34
SIP/2.0 200 OK From: "22498045"sip:22498045@192.168.10.189;tag=as181922af To: <sip:94294294@81.21.38.34
;tag=3d95248-37261551-13c4-50022-1c3096-5cc2673d-1c3096
Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.4dbc7d09c7e34a53fab5087a11e6f210.0 Via: SIP/2.0/UDP 192.168.10.189:5060;rport=5060;branch=z9hG4bK7ddbce3f Supported: replaces Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af Record-Route: sip:94294294@81.21.38.5;pgw-call=call-2aa6 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Contact: sip:94294294@81.21.38.55 Allow: INVITE, CANCEL, ACK, BYE, OPTIONS, INFO, REFER, NOTIFY, UPDATE Content-Type: application/sdp Content-Length: 260
v=0 o=Dialogic_SIP_CCLIB 64680888 64680889 IN IP4 81.21.38.34 s=Dialogic_SIP_CCLIB c=IN IP4 81.21.38.34 t=0 0 m=audio 47332 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=sendrecv a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=nortpproxy:yes
81.21.38.34 ==> 192.168.10.189
SIP/2.0 200 OK From: "22498045"sip:22498045@192.168.10.189;tag=as181922af To: <sip:94294294@81.21.38.34
;tag=3d95248-37261551-13c4-50022-1c3096-5cc2673d-1c3096
Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060 CSeq: 102 INVITE Via: SIP/2.0/UDP 192.168.10.189:5060;rport=5060;branch=z9hG4bK7ddbce3f Supported: replaces Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af Record-Route: sip:94294294@81.21.38.5;pgw-call=call-2aa6 Record-Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641 Contact: sip:94294294@81.21.38.55 Allow: INVITE, CANCEL, ACK, BYE, OPTIONS, INFO, REFER, NOTIFY, UPDATE Content-Type: application/sdp Content-Length: 260
v=0 o=Dialogic_SIP_CCLIB 64680888 64680889 IN IP4 81.21.38.34 s=Dialogic_SIP_CCLIB c=IN IP4 81.21.38.34 t=0 0 m=audio 47332 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=sendrecv a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=nortpproxy:yes
# U 192.168.10.189:5060 -> 81.21.38.34:5060
ACK sip:94294294@81.21.38.55 SIP/2.0* Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK76f8f103;rport* Route: sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641,< sip:94294294@81.21.38.5 ;pgw-call=call-2aa6>,sip:81.21.38.34;lr=on;ftag=as181922af* Max-Forwards: 70* From: "22498045" sip:22498045@192.168.10.189;tag=as181922af* To: <sip:94294294@81.21.38.34
;tag=3d95248-37261551-13c4-50022-1c3096-5cc2673d-1c3096*
Contact: sip:22498045@192.168.10.189:5060* Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060* CSeq: 102 ACK* User-Agent: FPBX-2.8.1(1.8.21.0)* Content-Length: 0*
81.21.38.34:5060 -> 81.21.38.5:5060
ACK sip:94294294@81.21.38.55 SIP/2.0* Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.9402c2edbc3ef96d9e405408364506a9.0* Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK76f8f103;rport=5060* Route: sip:94294294@81.21.38.5 ;pgw-call=call-2aa6,sip:81.21.38.34;lr=on;ftag=as181922af* Max-Forwards: 16* From: "22498045" sip:22498045@192.168.10.189;tag=as181922af* To: <sip:94294294@81.21.38.34
;tag=3d95248-37261551-13c4-50022-1c3096-5cc2673d-1c3096*
Contact: sip:22498045@192.168.10.189:5060* Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060* CSeq: 102 ACK* User-Agent: FPBX-2.8.1(1.8.21.0)* Content-Length: 0*
Message: 3 Date: Thu, 06 Jun 2013 16:51:42 +0200 From: Daniel-Constantin Mierla miconda@gmail.com To: "Kamailio (SER) - Users Mailing List" sr-users@lists.sip-router.org Subject: Re: [SR-Users] Problem with ACK Message-ID: 51B0A1FE.6040406@gmail.com Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
On 6/6/13 4:34 PM, Stoyan Mihaylov wrote:
We had some similar problems.
But what was the actual problem? At least in the two ACKs provided below, loose routing handling with looks correct.
Is something that Asterisk doesn't like?
Cheers, Daniel
Our configuration is: SIP client 1 <-> Kamailio <-> Asterisk <->Kamailio<->SIP client 2 My solution was to check $td and $si and if they are same as Kamailio, to forward call to Asterisk. Because I planed to use more then 1 Asterisk, I keep in variable which one to use.
On Thu, Jun 6, 2013 at 5:28 PM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello, the incoming ACK has the top Route with lr parameter, meaning is loose routing. By that, the proxy removes the top route header, preserves the R-URI and sends to the URI in the next Route header. From what I can see in the Route stack, it seems a spiral back to the proxy because ip 81.21.38.34 is two times there. If you can't sort it out, send the full SIP trace taken on the proxy from the initial INVITE to the ACK. Then we can see how Record-Route headers are set and the signaling flow. Cheers, Daniel On 6/6/13 3:30 PM, phillman25 wrote:
Dear list further to the above problem i observed the following: ACK message coming from PABX1: U +0.001877 192.168.10.189:5060 <http://192.168.10.189:5060> -> 81.21.38.34:5060 <http://81.21.38.34:5060> ACK sip:94294294@81.21.38.55 <mailto:sip%3A94294294@81.21.38.55> SIP/2.0* Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK76f8f103;rport* Route: <sip:81.21.38.34;lr=on;ftag=as181922af;did=c83.f641>,<
sip:94294294@81.21.38.5
<mailto:sip%3A94294294@81.21.38.5>;pgw-call=call-2aa6>,<
sip:81.21.38.34;lr=on;ftag=as181922af>*
Max-Forwards: 70* From: "22498045" <sip:22498045@192.168.10.189 <mailto:sip%3A22498045@192.168.10.189>>;tag=as181922af* To: <sip:94294294@81.21.38.34 <mailto:sip%3A94294294@81.21.38.34>>;tag=3d95248-37261551-
13c4-50022-1c3096-5cc2673d-1c3096*
Contact: <sip:22498045@192.168.10.189:5060 <http://sip:22498045@192.168.10.189:5060>>* Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060* <mailto:696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060*> CSeq: 102 ACK* User-Agent: FPBX-2.8.1(1.8.21.0)* Content-Length: 0* ACK message sent to PGW from Kamailio1 U +0.001254 81.21.38.34:5060 <http://81.21.38.34:5060> -> 81.21.38.5:5060 <http://81.21.38.5:5060> ACK sip:94294294@81.21.38.55 <mailto:sip%3A94294294@81.21.38.55> SIP/2.0* Via: SIP/2.0/UDP 81.21.38.34;branch=z9hG4bKc526.9402c2edbc3ef96d9e405408364506a9.0* Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK76f8f103;rport=5060* Route: <sip:94294294@81.21.38.5 <mailto:sip%3A94294294@81.21.38.5>;pgw-call=call-2aa6>,<
sip:81.21.38.34;lr=on;ftag=as181922af>*
Max-Forwards: 16* From: "22498045" <sip:22498045@192.168.10.189 <mailto:sip%3A22498045@192.168.10.189>>;tag=as181922af* To: <sip:94294294@81.21.38.34 <mailto:sip%3A94294294@81.21.38.34>>;tag=3d95248-37261551-
13c4-50022-1c3096-5cc2673d-1c3096*
Contact: <sip:22498045@192.168.10.189:5060 <http://sip:22498045@192.168.10.189:5060>>* Call-ID: 696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060* <mailto:696cfa577f42395767bc812e7e8a38a5@192.168.10.189:5060*> CSeq: 102 ACK* User-Agent: FPBX-2.8.1(1.8.21.0)* Content-Length: 0* Shouldn't the ACK message to the PGW have the header ACK sip:94294294@81.21.38.5 <mailto:sip%3A94294294@81.21.38.5>;pgw-call=call-2aa6 and the Route: <sip:81.21.38.34;lr=on;ftag=as181922af>* ??? Your help is much appreciated!! Phillip On Thu, Jun 6, 2013 at 12:26 PM, phillman25 <phillman25@gmail.com <mailto:phillman25@gmail.com>> wrote: Dear List I upgraded from Kamailio v 3.3 to 4.0.1 and am now facing an issue for the below scenario: PABX1 ==> Kamailio1 ==> Cisco PGW ==> Kamailio1 ==> PABX2 I understand that this is a hairpin scenario but was working normally on v 3.3. Checking in the syslog i see: ERROR: <core> [receive.c:230]: ERROR: receive_msg: no via found in reply Checking the sip trace i see that when calling from PABX1 to PABX2. After PABX2 answers and the the 200 OK is eventually sent to PABX1 , PABX1 answers with ACK but seems like its not sent back to PABX2 as a result PABX resends a 200 OK and the cycle continues until PABX2 sends a BYE message. Please see below the ACK received from PABX1: ACK sip:94294294@81.21.38.55 <mailto:sip%3A94294294@81.21.38.55> SIP/2.0 Via: SIP/2.0/UDP 192.168.10.189:5060;branch=z9hG4bK6bffe37c;rport Route: <sip:81.21.38.34;lr=on;ftag=as1cd4f8f1;did=e36.c471>,<
sip:94294294@81.21.38.5
<mailto:sip%3A94294294@81.21.38.5>;pgw-call=call-26eb>,<
sip:81.21.38.34;lr=on;ftag=as1cd4f8f1>
Max-Forwards: 70 From: "22498045" <sip:22498045@192.168.10.189 <mailto:sip%3A22498045@192.168.10.189>>;tag=as1cd4f8f1 To: <sip:94294294@81.21.38.34 <mailto:sip%3A94294294@81.21.38.34>>;tag=3d94f08-37261551-
13c4-50022-1c1e67-87fe958-1c1e67
Contact: <sip:22498045@192.168.10.189:5060 <http://sip:22498045@192.168.10.189:5060>> Call-ID: 03042a717e27a87e759f7f4879e70377@192.168.10.189:5060 <http://03042a717e27a87e759f7f4879e70377@192.168.10.189:5060> CSeq: 102 ACK User-Agent: FPBX-2.8.1(1.8.21.0) Content-Length: 0 Is there an issue with the above ACK message? Is there any way to solve this issue quickly perhaps by disabling loose route? I have observed that this issue occurs only when hairpinned. Thanking you in advance! Phillip