Hello,
I have Asterisk1---SER---Asterisk2.
When I do INVITE from the left,
--the asterisk2 send 200ok to the SER
--the SER forward to the Asterisk1
--but the asterisk1 directly send the ACK to Asterisk2
Asterisk2 retransmit the 200ok… and error.
I think that it need that the ACK come from the SER and not directly from the Asterisk1.
So, how can I detect a 200ok and reply a ACK with my SER?
Or, anyone have ever seen that problem?
Thank you
Next: my capture problem
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP IP_SER;branch=z9hG4bK815c.d8703d97.0;received=IP_SER
Via: SIP/2.0/UDP IP_PROVIDER_ASTERISK:5060;branch=z9hG4bK369cf0be;rport=5060
From: "francois berganz" sip:170725014@IP_PROVIDER_ASTERISK;tag=as4a6f8fc6
To: sip:URI_TEST@IP_SER;tag=as272dc8d3
Call-ID: 5079515a2060a26155be2cbf6b73dc78@IP_PROVIDER_ASTERISK
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: sip:URI_TEST@IP_ASTERISK
Content-Type: application/sdp
Content-Length: 287
v=0
o=root 1097653753 1097653753 IN IP4 IP_ASTERISK
s=Asterisk PBX 1.6.0.1
c=IN IP4 IP_ASTERISK
t=0 0
m=audio 16386 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
6§¢Iœÿ
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP IP_PROVIDER_ASTERISK:5060;branch=z9hG4bK369cf0be;rport=5060
From: "francois berganz" sip:170725014@IP_PROVIDER_ASTERISK;tag=as4a6f8fc6
To: sip:URI_TEST@IP_SER;tag=as272dc8d3
Call-ID: 5079515a2060a26155be2cbf6b73dc78@IP_PROVIDER_ASTERISK
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: sip:URI_TEST@IP_ASTERISK
Content-Type: application/sdp
Content-Length: 287
v=0
o=root 1097653753 1097653753 IN IP4 IP_ASTERISK
s=Asterisk PBX 1.6.0.1
c=IN IP4 IP_ASTERISK
t=0 0
m=audio 16386 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 200 OK
v: SIP/2.0/UDP IP_SER_TO_CLIENTS;branch=z9hG4bK6c33.6ae23971.0
v: SIP/2.0/UDP IP_ASTERISK:5060;branch=z9hG4bK598106c4;rport=5060
f: "francois berganz"sip:170725014@IP_ASTERISK;tag=as1551f6d3
t: sip:URI_TEST@IP_SER_TO_CLIENTS;tag=c0a80101-41e5ef
i: 1593ec3c0a617037319349245be7c5ab@IP_ASTERISK
CSeq: 102 INVITE
Require: timer
x: 100;refresher=uac
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,I NFO
m: sip:URI_TEST@192.168.1.82:5060;user=phone
Record-Route: sip:IP_SER_TO_CLIENTS;lr=on;ftag=as1551f6d3
Allow-Events: refer,dialog,message-summary,check-sync,talk,hold
c: application/sdp
l: 206
v=0
o=URI_TEST 4319348 4319348 IN IP4 192.168.1.82
s=-
c=IN IP4 192.168.1.82
t=0 0
m=audio 41000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
SIP/2.0 200 OK
v: SIP/2.0/UDP IP_ASTERISK:5060;branch=z9hG4bK598106c4;rport=5060
f: "francois berganz"sip:170725014@IP_ASTERISK;tag=as1551f6d3
t: sip:URI_TEST@IP_SER_TO_CLIENTS;tag=c0a80101-41e5ef
i: 1593ec3c0a617037319349245be7c5ab@IP_ASTERISK
CSeq: 102 INVITE
Require: timer
x: 100;refresher=uac
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,I NFO
m: sip:URI_TEST@IP_PHONE:5060;user=phone
Record-Route: sip:IP_SER_TO_CLIENTS;lr=on;ftag=as1551f6d3
Allow-Events: refer,dialog,message-summary,check-sync,talk,hold
c: application/sdp
l: 206
v=0
o=URI_TEST 4319348 4319348 IN IP4 192.168.1.82
s=-
c=IN IP4 192.168.1.82
t=0 0
m=audio 41000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
ACK sip:URI_TEST@IP_PHONE:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP IP_ASTERISK:5060;branch=z9hG4bK0e97e7e8;rport
Route: sip:IP_SER_TO_CLIENTS;lr=on;ftag=as1551f6d3
Max-Forwards: 70
From: "francois berganz" sip:170725014@IP_ASTERISK;tag=as1551f6d3
To: sip:URI_TEST@IP_SER_TO_CLIENTS;tag=c0a80101-41e5ef
Contact: sip:170725014@IP_ASTERISK
Call-ID: 1593ec3c0a617037319349245be7c5ab@IP_ASTERISK
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.0.1
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP IP_SER;branch=z9hG4bK815c.d8703d97.0;received=IP_SER
Via: SIP/2.0/UDP IP_PROVIDER_ASTERISK:5060;branch=z9hG4bK369cf0be;rport=5060
From: "francois berganz" sip:170725014@IP_PROVIDER_ASTERISK;tag=as4a6f8fc6
To: sip:URI_TEST@IP_SER;tag=as272dc8d3
Call-ID: 5079515a2060a26155be2cbf6b73dc78@IP_PROVIDER_ASTERISK
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: sip:URI_TEST@IP_ASTERISK
Content-Type: application/sdp
Content-Length: 287
v=0
o=root 1097653753 1097653754 IN IP4 IP_ASTERISK
s=Asterisk PBX 1.6.0.1
c=IN IP4 IP_ASTERISK
t=0 0
m=audio 16386 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 200 OK
Via: SIP/2.0/UDP IP_PROVIDER_ASTERISK:5060;branch=z9hG4bK369cf0be;rport=5060
From: "francois berganz" sip:170725014@IP_PROVIDER_ASTERISK;tag=as4a6f8fc6
To: sip:URI_TEST@IP_SER;tag=as272dc8d3
Call-ID: 5079515a2060a26155be2cbf6b73dc78@IP_PROVIDER_ASTERISK
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: sip:URI_TEST@IP_ASTERISK
Content-Type: application/sdp
Content-Length: 287
v=0
o=root 1097653753 1097653754 IN IP4 IP_ASTERISK
s=Asterisk PBX 1.6.0.1
c=IN IP4 IP_ASTERISK
t=0 0
m=audio 16386 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
ACK sip:URI_TEST@IP_PHONE:5060;user=phone SIP/2.0
Record-Route: sip:IP_SER_TO_CLIENTS;lr=on;ftag=as1551f6d3
Via: SIP/2.0/UDP IP_SER_TO_CLIENTS;branch=z9hG4bK6c33.6ae23971.2
Via: SIP/2.0/UDP IP_ASTERISK:5060;branch=z9hG4bK0e97e7e8;rport=5060
Max-Forwards: 70
From: "francois berganz" sip:170725014@IP_ASTERISK;tag=as1551f6d3
To: sip:URI_TEST@IP_SER_TO_CLIENTS;tag=c0a80101-41e5ef
Contact: sip:170725014@IP_ASTERISK
Call-ID: 1593ec3c0a617037319349245be7c5ab@IP_ASTERISK
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.0.1
Content-Length: 0
ACK sip:URI_TEST@IP_ASTERISK SIP/2.0
Via: SIP/2.0/UDP IP_PROVIDER_ASTERISK:5060;branch=z9hG4bK7a6d7cf4;rport
From: "francois berganz" sip:170725014@IP_PROVIDER_ASTERISK;tag=as4a6f8fc6
To: sip:URI_TEST@IP_SER;tag=as272dc8d3
Contact: sip:170725014@IP_PROVIDER_ASTERISK
Call-ID: 5079515a2060a26155be2cbf6b73dc78@IP_PROVIDER_ASTERISK
CSeq: 102 ACK
User-Agent: MARS
Max-Forwards: 70
Content-Length: 0
Cordialement,
BERGANZ François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
2009/2/23 BERGANZ François francois@acropolistelecom.net:
Hello,
I have Asterisk1---SER---Asterisk2.
When I do INVITE from the left,
--the asterisk2 send 200ok to the SER
--the SER forward to the Asterisk1
--but the asterisk1 directly send the ACK to Asterisk2
Asterisk2 retransmit the 200ok… and error.
I think that it need that the ACK come from the SER and not directly from the Asterisk1.
So, how can I detect a 200ok and reply a ACK with my SER?
ACK to 200 OK is an in-dialog request (while ACK to [3456]XX response is part of the INVITE transaction). And to force all SIP messages through the proxy, it must insert Record-Route header in the first INVITE. This is clearly explained in RFC 3261 Section 16. Read the "rr" module documentation, the function you need is very easy and comes enabled in the default config script.
I found the solution.
I just had to do do record-route! I am sorry, I could think about that. Thank you for answers
Cordialement, BERGANZ François Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
-----Message d'origine----- De : users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] De la part de Iñaki Baz Castillo Envoyé : lundi 23 février 2009 16:07 Cc : users@lists.kamailio.org Objet : Re: [Kamailio-Users] problem with 200ok
2009/2/23 BERGANZ François francois@acropolistelecom.net:
Hello,
I have Asterisk1---SER---Asterisk2.
When I do INVITE from the left,
--the asterisk2 send 200ok to the SER
--the SER forward to the Asterisk1
--but the asterisk1 directly send the ACK to Asterisk2
Asterisk2 retransmit the 200ok… and error.
I think that it need that the ACK come from the SER and not directly from the Asterisk1.
So, how can I detect a 200ok and reply a ACK with my SER?
ACK to 200 OK is an in-dialog request (while ACK to [3456]XX response is part of the INVITE transaction). And to force all SIP messages through the proxy, it must insert Record-Route header in the first INVITE. This is clearly explained in RFC 3261 Section 16. Read the "rr" module documentation, the function you need is very easy and comes enabled in the default config script.