Discussion:
[Freeswitch-users] 482 Request merged, in serial forking
Humberto Quintana
2009-09-04 16:06:31 UTC
Permalink
Hello,

I'm a new Freeswitch user. After some reading I put Freeswitch (Version 1.0.4) to work as Session Border Controller. I have only one problem that I dont know how to solve it ( or which parameter to set) and I'd appreciate if someone could give me a clue about this.

Kamailio is sitting behind FS and it selects the route or routes in case of failure (serial forking) . Freeswitch is configured to use directly the Request-URI sent by Kamailio.

So, when the 1st route fails, Kamailio receives the Reply from FS and sends back the ACK to end the transaction. More than 1 second later, a new INVITE from Kamailio with the next route is tried (With the To-header's tag is empty. Same Callid, From and Cseq header but different VIA-header's branch parameter) and FS is answering back 482 Merged Request. It happens the same for the 3rd route.

It seems that the transaction is still 'alive' in FS even if the ACK was received ?


Thanks,

Humberto


===1st route===

U 2009/09/03 17:20:36.069147 kamailio -> freeswitch
INVITE sip:5145555555 at gw1 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.0
Call-ID: 1

U 2009/09/03 17:20:36.169147 freeswitch -> gw1
INVITE sip:5145555555 at gw1 SIP/2.0.
Call-ID: 2

U 2009/09/03 17:20:36.170158 gw1 -> freeswitch
SIP/2.0 100 Trying.
Call-ID: 2

U 2009/09/03 17:20:36.190457 gw1 -> freeswitch
SIP/2.0 503 Service Unavailable.
Call-ID: 2

U 2009/09/03 17:20:36.193296 freeswitch -> gw1
ACK sip:5142776756 at gw1 SIP/2.0.
Call-ID: 2

U 2009/09/03 17:20:36.227492 freeswitch -> kamailio
SIP/2.0 503 Service Unavailable.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.0
Call-ID: 1

U 2009/09/03 17:20:36.228122 kamailio -> freeswitch
ACK sip:5145555555 at gw1 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.0
Call-ID: 1


===2nd route===
U 2009/09/03 17:20:37.596885 kamailio -> freeswitch
INVITE sip:15145555555 at gw2:5061 SIP/2.0
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.1
Call-ID: 1

U 2009/09/03 17:20:37.597590 freeswitch -> kamailio
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.1
Call-ID: 1

U 2009/09/03 17:20:37.598163 kamailio -> freeswitch
ACK sip:15145555555 at gw2:5061 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.1
Call-ID: 1


===3rd route===
U 2009/09/03 17:20:37.642098 kamailio -> freeswitch
INVITE sip:5145555555 at gw3 SIP/2.0
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.2
Call-ID: 1

U 2009/09/03 17:20:37.642634 freeswitch -> kamailio
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.2
Call-ID: 1

U 2009/09/03 17:20:37.643139 kamailio -> freeswitch
ACK sip:5145555555 at gw3 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.2
Call-ID: 1


_________________________________________________________________
Click less, chat more: Messenger on MSN.ca
http://go.microsoft.com/?linkid=9677404
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090904/0b2d2471/attachment-0001.html
Brian West
2009-09-04 23:34:40 UTC
Permalink
I'm going to gess the call-id is the same for the second
transaction... can you provide a more detailed trace?

/b
Post by Humberto Quintana
Hello,
I'm a new Freeswitch user. After some reading I put Freeswitch
(Version 1.0.4) to work as Session Border Controller. I have only
one problem that I dont know how to solve it ( or which parameter to
set) and I'd appreciate if someone could give me a clue about this.
Kamailio is sitting behind FS and it selects the route or routes in
case of failure (serial forking) . Freeswitch is configured to use
directly the Request-URI sent by Kamailio.
So, when the 1st route fails, Kamailio receives the Reply from FS
and sends back the ACK to end the transaction. More than 1 second
later, a new INVITE from Kamailio with the next route is tried (With
the To-header's tag is empty. Same Callid, From and Cseq header but
different VIA-header's branch parameter) and FS is answering back
482 Merged Request. It happens the same for the 3rd route.
It seems that the transaction is still 'alive' in FS even if the ACK was received ?
Thanks,
Humberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090904/2d355dc4/attachment.html
Humberto Quintana
2009-09-08 14:00:18 UTC
Permalink
Hi Brian,

Yes , the Call-Id is the same for the 2nd and 3rd transaction but the branch parameter in the Via header is different. Please check the capture below.

Thanks,

Humberto


----------> Route 1

U 2009/09/08 09:17:38.759129 kamailio:5060 -> freeswitch:5060
INVITE sip:5145555555 at gw1:5060 SIP/2.0.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Contact: <sip:10092020 at UserIP:52060>.
Supported: replaces, timer, path.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Max-Forwards: 68.
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 396.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 50366 RTP/AVP 99.
a=sendrecv.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:38.861646 freeswitch:5060 -> kamailio:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
UserIP-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
Content-Length: 0.
.


U 2009/09/08 09:17:39.000958 freeswitch:5060 -> gw1:5060
INVITE sip:5145555555 at gw1:5060 SIP/2.0.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
Max-Forwards: 67.
From: "hq160" <sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
CSeq: 120089593 INVITE.
Contact: <sip:mod_sofia at kamailio>.
UserIP-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 372.
X-rsbc: 04d14ab631843dc1 at 192.168.2.13.
Remote-Party-ID: "hq160" <sip:10092020 at freeswitch>;party=calling;screen=yes;privacy=off.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
a=ptime:20.
m=video 50366 RTP/AVP 99.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:39.056082 gw1:5060 -> freeswitch:5060
SIP/2.0 100 Trying.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
Content-Length: 0.
CSeq: 120089593 INVITE.
From: "hq160"<sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>;tag=d05714dc-26334.
UserIP-Agent: Quintum/1.0.0 SN/0030E100A224 SW/P106-12-00.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
Quintum: 0b06343032343333.
.


U 2009/09/08 09:17:39.058998 gw1:5060 -> freeswitch:5060
SIP/2.0 503 Service Unavailable.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
Content-Length: 0.
CSeq: 120089593 INVITE.
From: "hq160"<sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>;tag=d05714dc-26334.
UserIP-Agent: Quintum/1.0.0 SN/0030E100A224 SW/P106-12-00.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
.


U 2009/09/08 09:17:39.059341 freeswitch:5060 -> gw1:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
Max-Forwards: 67.
From: "hq160" <sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>;tag=d05714dc-26334.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
CSeq: 120089593 ACK.
Content-Length: 0.
.


U 2009/09/08 09:17:39.061148 freeswitch:5060 -> kamailio:5060
SIP/2.0 503 Service Unavailable.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
UserIP-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, refer.
Reason: Q.850;cause=41;text="NORMAL_TEMPORARY_FAILURE".
Content-Length: 0.
.


U 2009/09/08 09:17:39.062085 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
CSeq: 31348 ACK.
Max-Forwards: 70.
UserIP-Agent: Kamailio (1.4.4-tls (i386/linux)).
Content-Length: 0.
.

-------> Route 2

U 2009/09/08 09:17:41.426541 kamailio:5060 -> freeswitch:5060
INVITE sip:15145555555 at gw2:5061 SIP/2.0.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.1.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Contact: <sip:10092020 at UserIP:52060>.
Supported: replaces, timer, path.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Max-Forwards: 68.
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 396.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 50366 RTP/AVP 99.
a=sendrecv.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:41.427280 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.1.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Content-Length: 0.
.


U 2009/09/08 09:17:41.427901 kamailio:5060 -> freeswitch:5060
ACK sip:15145555555 at gw2:5061 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.1.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
CSeq: 31348 ACK.
Max-Forwards: 70.
UserIP-Agent: Kamailio (1.4.4-tls (i386/linux)).
Content-Length: 0.
.

--------> Route 3

U 2009/09/08 09:17:44.206445 kamailio:5060 -> freeswitch:5060
INVITE sip:5145555555 at gw3:5060 SIP/2.0.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.2.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Contact: <sip:10092020 at UserIP:52060>.
Supported: replaces, timer, path.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Max-Forwards: 68.
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 396.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 50366 RTP/AVP 99.
a=sendrecv.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:44.207261 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.2.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Content-Length: 0.
.


U 2009/09/08 09:17:44.207762 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw3:5060 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.2.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
CSeq: 31348 ACK.
Max-Forwards: 70.
UserIP-Agent: Kamailio (1.4.4-tls (i386/linux)).
Content-Length: 0.
.




============================================
I'm going to gess the call-id is the same for the second
transaction... can you provide a more detailed trace?

/b
Post by Humberto Quintana
Hello,
I'm a new Freeswitch user. After some reading I put Freeswitch
(Version 1.0.4) to work as Session Border Controller. I have only
one problem that I dont know how to solve it ( or which parameter to
set) and I'd appreciate if someone could give me a clue about this.
Kamailio is sitting behind FS and it selects the route or routes in
case of failure (serial forking) . Freeswitch is configured to use
directly the Request-URI sent by Kamailio.
So, when the 1st route fails, Kamailio receives the Reply from FS
and sends back the ACK to end the transaction. More than 1 second
later, a new INVITE from Kamailio with the next route is tried (With
the To-header's tag is empty. Same Callid, From and Cseq header but
different VIA-header's branch parameter) and FS is answering back
482 Merged Request. It happens the same for the 3rd route.
It seems that the transaction is still 'alive' in FS even if the ACK
was received ?
Thanks,
Humberto
_________________________________________________________________
Click less, chat more: Messenger on MSN.ca
http://go.microsoft.com/?linkid=9677404
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090908/87df5b14/attachment-0001.html
Brian West
2009-09-08 14:23:39 UTC
Permalink
Looks like FS is behind nat. You need to set local-network-acl and
the ext-rtp-ip and ext-sip-ip so FreeSWITCH properly puts in the right
IP's in the via headers and sdp.

Please refer to internal.xml in the latest SVN for an example of how
to do this.

/b
Post by Humberto Quintana
Hi Brian,
Yes , the Call-Id is the same for the 2nd and 3rd transaction but
the branch parameter in the Via header is different. Please check
the capture below.
Thanks,
Humberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090908/991564c8/attachment.html
Brian West
2009-09-08 14:23:39 UTC
Permalink
Looks like FS is behind nat. You need to set local-network-acl and
the ext-rtp-ip and ext-sip-ip so FreeSWITCH properly puts in the right
IP's in the via headers and sdp.

Please refer to internal.xml in the latest SVN for an example of how
to do this.

/b
Post by Humberto Quintana
Hi Brian,
Yes , the Call-Id is the same for the 2nd and 3rd transaction but
the branch parameter in the Via header is different. Please check
the capture below.
Thanks,
Humberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090908/991564c8/attachment-0002.html
Humberto Quintana
2009-09-08 16:16:04 UTC
Permalink
Hi Brian,

Thank you very much for your answer but both, Freeswitch and Kamailio have public IPs, it's my NAT'd IP phone who has private IP but this is fixed by Kamailio.

The problem is not the 1st call is failing ( the test is set that way), the problem is FS answers back 482 when Kamailio tries a 2nd route ( or 3rd ) for the same call...


Freeswitch is configured to use the Requested-URI sent by Kamailio:

<action application="bridge" data="sofia/external/${sip_req_uri}"/>


I noticed that there is no Log message in Freeswitch when receiving the INVITE for the 2nd route.
The process in FS seems to be destroyed (11:46:21.396593) before the 2nd INVITE is received (11:46:21.401419
).


U 2009/09/08 11:46:21.395702 freeswitch:5060 -> kamailio:5060
SIP/2.0 503 Service Unavailable.
Call-ID: ba748cd27cd163b5 at 192.168.2.13

U 2009/09/08 11:46:21.395897 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13

U 2009/09/08 11:46:21.401419 kamailio:5060 -> freeswitch:5060
INVITE sip:15145555555 at gw2:5061 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13

U 2009/09/08 11:46:21.401845 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Call-ID: ba748cd27cd163b5 at 192.168.2.13


2009-09-08 11:46:21.395503 [DEBUG] mod_sofia.c:417 Responding to INVITE with: 503
2009-09-08 11:46:21.395503 [DEBUG] switch_core_state_machine.c:46 sofia/external/10092020 at freeswitch Standard HANGUP, cause: NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:434 (sofia/external/10092020 at freeswitch) State HANGUP going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:476 (sofia/external/10092020 at freeswitch) State Change CS_HANGUP -> CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:932 Send signal sofia/external/10092020 at freeswitch [BREAK]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:398 (sofia/external/10092020 at freeswitch) Running State Change CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612 (sofia/external/10092020 at freeswitch) State REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:53 sofia/external/10092020 at freeswitch Standard REPORTING, cause: NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612 (sofia/external/10092020 at freeswitch) State REPORTING going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:411 (sofia/external/10092020 at freeswitch) State Change CS_REPORTING -> CS_DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:1068 Session 3 (sofia/external/10092020 at freeswitch) Locked, Waiting on external entities
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1086 Session 3 (sofia/external/10092020 at freeswitch) Ended
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1088 Close Channel sofia/external/10092020 at freeswitch [CS_DESTROY]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564 (sofia/external/10092020 at freeswitch) State DESTROY
2009-09-08 11:46:21.396593 [DEBUG] mod_sofia.c:255 sofia/external/10092020 at freeswitch SOFIA DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:60 sofia/external/10092020 at freeswitch Standard DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564 (sofia/external/10092020 at freeswitch) State DESTROY going to sleep


Note: I'm using only the external sofia profile.


Thanks,

Humberto











==========================================
Looks like FS is behind nat. You need to set local-network-acl and
the ext-rtp-ip and ext-sip-ip so FreeSWITCH properly puts in the right
IP's in the via headers and sdp.

Please refer to internal.xml in the latest SVN for an example of how
to do this.

/b

_________________________________________________________________
New! Open Messenger faster on the MSN homepage
http://go.microsoft.com/?linkid=9677405
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090908/645dca1b/attachment.html
Michael Jerris
2009-09-14 17:27:51 UTC
Permalink
We currently don't support forked dialogs.

Mike
Post by Humberto Quintana
Hi Brian,
Thank you very much for your answer but both, Freeswitch and
Kamailio have public IPs, it's my NAT'd IP phone who has private IP
but this is fixed by Kamailio.
The problem is not the 1st call is failing ( the test is set that
way), the problem is FS answers back 482 when Kamailio tries a 2nd
route ( or 3rd ) for the same call...
<action application="bridge" data="sofia/external/${sip_req_uri}"/>
I noticed that there is no Log message in Freeswitch when receiving
the INVITE for the 2nd route.
The process in FS seems to be destroyed (11:46:21.396593) before the
2nd INVITE is received (11:46:21.401419
).
U 2009/09/08 11:46:21.395702 freeswitch:5060 -> kamailio:5060
SIP/2.0 503 Service Unavailable.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
U 2009/09/08 11:46:21.395897 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
U 2009/09/08 11:46:21.401419 kamailio:5060 -> freeswitch:5060
INVITE sip:15145555555 at gw2:5061 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
U 2009/09/08 11:46:21.401845 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
2009-09-08 11:46:21.395503 [DEBUG] mod_sofia.c:417 Responding to INVITE with: 503
2009-09-08 11:46:21.395503 [DEBUG] switch_core_state_machine.c:46
NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:434
(sofia/external/10092020 at freeswitch) State HANGUP going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:476
(sofia/external/10092020 at freeswitch) State Change CS_HANGUP ->
CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:932 Send
signal sofia/external/10092020 at freeswitch [BREAK]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:398
(sofia/external/10092020 at freeswitch) Running State Change CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612
(sofia/external/10092020 at freeswitch) State REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:53
NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612
(sofia/external/10092020 at freeswitch) State REPORTING going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:411
(sofia/external/10092020 at freeswitch) State Change CS_REPORTING ->
CS_DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:1068
Session 3 (sofia/external/10092020 at freeswitch) Locked, Waiting on
external entities
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1086
Session 3 (sofia/external/10092020 at freeswitch) Ended
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1088 Close
Channel sofia/external/10092020 at freeswitch [CS_DESTROY]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564
(sofia/external/10092020 at freeswitch) State DESTROY
2009-09-08 11:46:21.396593 [DEBUG] mod_sofia.c:255 sofia/external/
10092020 at freeswitch SOFIA DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:60
sofia/external/10092020 at freeswitch Standard DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564
(sofia/external/10092020 at freeswitch) State DESTROY going to sleep
Note: I'm using only the external sofia profile.
Thanks,
Humberto
==========================================
Looks like FS is behind nat. You need to set local-network-acl and
the ext-rtp-ip and ext-sip-ip so FreeSWITCH properly puts in the right
IP's in the via headers and sdp.
Please refer to internal.xml in the latest SVN for an example of how
to do this.
/b
New! Open Hotmail faster on the new MSN homepage!
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090914/94782edb/attachment-0001.html
Michael Jerris
2009-09-14 17:27:51 UTC
Permalink
We currently don't support forked dialogs.

Mike
Post by Humberto Quintana
Hi Brian,
Thank you very much for your answer but both, Freeswitch and
Kamailio have public IPs, it's my NAT'd IP phone who has private IP
but this is fixed by Kamailio.
The problem is not the 1st call is failing ( the test is set that
way), the problem is FS answers back 482 when Kamailio tries a 2nd
route ( or 3rd ) for the same call...
<action application="bridge" data="sofia/external/${sip_req_uri}"/>
I noticed that there is no Log message in Freeswitch when receiving
the INVITE for the 2nd route.
The process in FS seems to be destroyed (11:46:21.396593) before the
2nd INVITE is received (11:46:21.401419
).
U 2009/09/08 11:46:21.395702 freeswitch:5060 -> kamailio:5060
SIP/2.0 503 Service Unavailable.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
U 2009/09/08 11:46:21.395897 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
U 2009/09/08 11:46:21.401419 kamailio:5060 -> freeswitch:5060
INVITE sip:15145555555 at gw2:5061 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
U 2009/09/08 11:46:21.401845 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Call-ID: ba748cd27cd163b5 at 192.168.2.13
2009-09-08 11:46:21.395503 [DEBUG] mod_sofia.c:417 Responding to INVITE with: 503
2009-09-08 11:46:21.395503 [DEBUG] switch_core_state_machine.c:46
NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:434
(sofia/external/10092020 at freeswitch) State HANGUP going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:476
(sofia/external/10092020 at freeswitch) State Change CS_HANGUP ->
CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:932 Send
signal sofia/external/10092020 at freeswitch [BREAK]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:398
(sofia/external/10092020 at freeswitch) Running State Change CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612
(sofia/external/10092020 at freeswitch) State REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:53
NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612
(sofia/external/10092020 at freeswitch) State REPORTING going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:411
(sofia/external/10092020 at freeswitch) State Change CS_REPORTING ->
CS_DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:1068
Session 3 (sofia/external/10092020 at freeswitch) Locked, Waiting on
external entities
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1086
Session 3 (sofia/external/10092020 at freeswitch) Ended
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1088 Close
Channel sofia/external/10092020 at freeswitch [CS_DESTROY]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564
(sofia/external/10092020 at freeswitch) State DESTROY
2009-09-08 11:46:21.396593 [DEBUG] mod_sofia.c:255 sofia/external/
10092020 at freeswitch SOFIA DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:60
sofia/external/10092020 at freeswitch Standard DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564
(sofia/external/10092020 at freeswitch) State DESTROY going to sleep
Note: I'm using only the external sofia profile.
Thanks,
Humberto
==========================================
Looks like FS is behind nat. You need to set local-network-acl and
the ext-rtp-ip and ext-sip-ip so FreeSWITCH properly puts in the right
IP's in the via headers and sdp.
Please refer to internal.xml in the latest SVN for an example of how
to do this.
/b
New! Open Hotmail faster on the new MSN homepage!
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090914/94782edb/attachment-0002.html
Humberto Quintana
2009-09-04 16:06:31 UTC
Permalink
Hello,

I'm a new Freeswitch user. After some reading I put Freeswitch (Version 1.0.4) to work as Session Border Controller. I have only one problem that I dont know how to solve it ( or which parameter to set) and I'd appreciate if someone could give me a clue about this.

Kamailio is sitting behind FS and it selects the route or routes in case of failure (serial forking) . Freeswitch is configured to use directly the Request-URI sent by Kamailio.

So, when the 1st route fails, Kamailio receives the Reply from FS and sends back the ACK to end the transaction. More than 1 second later, a new INVITE from Kamailio with the next route is tried (With the To-header's tag is empty. Same Callid, From and Cseq header but different VIA-header's branch parameter) and FS is answering back 482 Merged Request. It happens the same for the 3rd route.

It seems that the transaction is still 'alive' in FS even if the ACK was received ?


Thanks,

Humberto


===1st route===

U 2009/09/03 17:20:36.069147 kamailio -> freeswitch
INVITE sip:5145555555 at gw1 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.0
Call-ID: 1

U 2009/09/03 17:20:36.169147 freeswitch -> gw1
INVITE sip:5145555555 at gw1 SIP/2.0.
Call-ID: 2

U 2009/09/03 17:20:36.170158 gw1 -> freeswitch
SIP/2.0 100 Trying.
Call-ID: 2

U 2009/09/03 17:20:36.190457 gw1 -> freeswitch
SIP/2.0 503 Service Unavailable.
Call-ID: 2

U 2009/09/03 17:20:36.193296 freeswitch -> gw1
ACK sip:5142776756 at gw1 SIP/2.0.
Call-ID: 2

U 2009/09/03 17:20:36.227492 freeswitch -> kamailio
SIP/2.0 503 Service Unavailable.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.0
Call-ID: 1

U 2009/09/03 17:20:36.228122 kamailio -> freeswitch
ACK sip:5145555555 at gw1 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.0
Call-ID: 1


===2nd route===
U 2009/09/03 17:20:37.596885 kamailio -> freeswitch
INVITE sip:15145555555 at gw2:5061 SIP/2.0
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.1
Call-ID: 1

U 2009/09/03 17:20:37.597590 freeswitch -> kamailio
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.1
Call-ID: 1

U 2009/09/03 17:20:37.598163 kamailio -> freeswitch
ACK sip:15145555555 at gw2:5061 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.1
Call-ID: 1


===3rd route===
U 2009/09/03 17:20:37.642098 kamailio -> freeswitch
INVITE sip:5145555555 at gw3 SIP/2.0
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.2
Call-ID: 1

U 2009/09/03 17:20:37.642634 freeswitch -> kamailio
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.2
Call-ID: 1

U 2009/09/03 17:20:37.643139 kamailio -> freeswitch
ACK sip:5145555555 at gw3 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKa0fa.0cd8784.2
Call-ID: 1


_________________________________________________________________
Click less, chat more: Messenger on MSN.ca
http://go.microsoft.com/?linkid=9677404
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090904/0b2d2471/attachment-0002.html
Brian West
2009-09-04 23:34:40 UTC
Permalink
I'm going to gess the call-id is the same for the second
transaction... can you provide a more detailed trace?

/b
Post by Humberto Quintana
Hello,
I'm a new Freeswitch user. After some reading I put Freeswitch
(Version 1.0.4) to work as Session Border Controller. I have only
one problem that I dont know how to solve it ( or which parameter to
set) and I'd appreciate if someone could give me a clue about this.
Kamailio is sitting behind FS and it selects the route or routes in
case of failure (serial forking) . Freeswitch is configured to use
directly the Request-URI sent by Kamailio.
So, when the 1st route fails, Kamailio receives the Reply from FS
and sends back the ACK to end the transaction. More than 1 second
later, a new INVITE from Kamailio with the next route is tried (With
the To-header's tag is empty. Same Callid, From and Cseq header but
different VIA-header's branch parameter) and FS is answering back
482 Merged Request. It happens the same for the 3rd route.
It seems that the transaction is still 'alive' in FS even if the ACK was received ?
Thanks,
Humberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090904/2d355dc4/attachment-0002.html
Humberto Quintana
2009-09-08 14:00:18 UTC
Permalink
Hi Brian,

Yes , the Call-Id is the same for the 2nd and 3rd transaction but the branch parameter in the Via header is different. Please check the capture below.

Thanks,

Humberto


----------> Route 1

U 2009/09/08 09:17:38.759129 kamailio:5060 -> freeswitch:5060
INVITE sip:5145555555 at gw1:5060 SIP/2.0.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Contact: <sip:10092020 at UserIP:52060>.
Supported: replaces, timer, path.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Max-Forwards: 68.
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 396.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 50366 RTP/AVP 99.
a=sendrecv.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:38.861646 freeswitch:5060 -> kamailio:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
UserIP-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
Content-Length: 0.
.


U 2009/09/08 09:17:39.000958 freeswitch:5060 -> gw1:5060
INVITE sip:5145555555 at gw1:5060 SIP/2.0.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
Max-Forwards: 67.
From: "hq160" <sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
CSeq: 120089593 INVITE.
Contact: <sip:mod_sofia at kamailio>.
UserIP-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 372.
X-rsbc: 04d14ab631843dc1 at 192.168.2.13.
Remote-Party-ID: "hq160" <sip:10092020 at freeswitch>;party=calling;screen=yes;privacy=off.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
a=ptime:20.
m=video 50366 RTP/AVP 99.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:39.056082 gw1:5060 -> freeswitch:5060
SIP/2.0 100 Trying.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
Content-Length: 0.
CSeq: 120089593 INVITE.
From: "hq160"<sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>;tag=d05714dc-26334.
UserIP-Agent: Quintum/1.0.0 SN/0030E100A224 SW/P106-12-00.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
Quintum: 0b06343032343333.
.


U 2009/09/08 09:17:39.058998 gw1:5060 -> freeswitch:5060
SIP/2.0 503 Service Unavailable.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
Content-Length: 0.
CSeq: 120089593 INVITE.
From: "hq160"<sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>;tag=d05714dc-26334.
UserIP-Agent: Quintum/1.0.0 SN/0030E100A224 SW/P106-12-00.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
.


U 2009/09/08 09:17:39.059341 freeswitch:5060 -> gw1:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Via: SIP/2.0/UDP freeswitch;rport;branch=z9hG4bK151FSXQmjX4KH.
Max-Forwards: 67.
From: "hq160" <sip:10092020 at freeswitch>;tag=3mrtKm2rma0De.
To: <sip:5145555555 at gw1:5060>;tag=d05714dc-26334.
Call-ID: d2bda062-171c-122d-c787-005056aa5fb7.
CSeq: 120089593 ACK.
Content-Length: 0.
.


U 2009/09/08 09:17:39.061148 freeswitch:5060 -> kamailio:5060
SIP/2.0 503 Service Unavailable.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
UserIP-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, refer.
Reason: Q.850;cause=41;text="NORMAL_TEMPORARY_FAILURE".
Content-Length: 0.
.


U 2009/09/08 09:17:39.062085 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.0.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
CSeq: 31348 ACK.
Max-Forwards: 70.
UserIP-Agent: Kamailio (1.4.4-tls (i386/linux)).
Content-Length: 0.
.

-------> Route 2

U 2009/09/08 09:17:41.426541 kamailio:5060 -> freeswitch:5060
INVITE sip:15145555555 at gw2:5061 SIP/2.0.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.1.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Contact: <sip:10092020 at UserIP:52060>.
Supported: replaces, timer, path.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Max-Forwards: 68.
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 396.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 50366 RTP/AVP 99.
a=sendrecv.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:41.427280 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.1.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Content-Length: 0.
.


U 2009/09/08 09:17:41.427901 kamailio:5060 -> freeswitch:5060
ACK sip:15145555555 at gw2:5061 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.1.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
CSeq: 31348 ACK.
Max-Forwards: 70.
UserIP-Agent: Kamailio (1.4.4-tls (i386/linux)).
Content-Length: 0.
.

--------> Route 3

U 2009/09/08 09:17:44.206445 kamailio:5060 -> freeswitch:5060
INVITE sip:5145555555 at gw3:5060 SIP/2.0.
Record-Route: <sip:kamailio;lr=on;ftag=8c90b1379825fa62;nat=yes;vsf=QllAAwMAAglyAgIIbgoHFhwIGRwDAC4yMTA6NDUwNjA-;did=0b8.111bca94>.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.2.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>.
Contact: <sip:10092020 at UserIP:52060>.
Supported: replaces, timer, path.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Max-Forwards: 68.
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 396.
.
v=0.
o=10092020 8000 8001 IN IP4 192.168.2.13.
s=SIP Call.
c=IN IP4 MediaServer.
t=0 0.
m=audio 50362 RTP/AVP 0 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 50366 RTP/AVP 99.
a=sendrecv.
a=rtpmap:99 H264/90000.
a=fmtp:99 profile-level-id=42801E; packetization-mode=0; sprop-parameter-sets=J0KAFJWgUH5A,KM4CfIC=.
a=framerate:15.


U 2009/09/08 09:17:44.207261 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.2.
Via: SIP/2.0/UDP 192.168.2.13:52060;rport=52060;received=UserIP;branch=z9hG4bK4d46edc4e1623ae5.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
CSeq: 31348 INVITE.
Content-Length: 0.
.


U 2009/09/08 09:17:44.207762 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw3:5060 SIP/2.0.
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKede5.5c558357.2.
From: "hq160" <10092020 at kamailio>;tag=8c90b1379825fa62.
Call-ID: 04d14ab631843dc1 at 192.168.2.13.
To: <sip:15145555555 at kamailio>;tag=2BZ1HSHNQ19tj.
CSeq: 31348 ACK.
Max-Forwards: 70.
UserIP-Agent: Kamailio (1.4.4-tls (i386/linux)).
Content-Length: 0.
.




============================================
I'm going to gess the call-id is the same for the second
transaction... can you provide a more detailed trace?

/b
Post by Humberto Quintana
Hello,
I'm a new Freeswitch user. After some reading I put Freeswitch
(Version 1.0.4) to work as Session Border Controller. I have only
one problem that I dont know how to solve it ( or which parameter to
set) and I'd appreciate if someone could give me a clue about this.
Kamailio is sitting behind FS and it selects the route or routes in
case of failure (serial forking) . Freeswitch is configured to use
directly the Request-URI sent by Kamailio.
So, when the 1st route fails, Kamailio receives the Reply from FS
and sends back the ACK to end the transaction. More than 1 second
later, a new INVITE from Kamailio with the next route is tried (With
the To-header's tag is empty. Same Callid, From and Cseq header but
different VIA-header's branch parameter) and FS is answering back
482 Merged Request. It happens the same for the 3rd route.
It seems that the transaction is still 'alive' in FS even if the ACK
was received ?
Thanks,
Humberto
_________________________________________________________________
Click less, chat more: Messenger on MSN.ca
http://go.microsoft.com/?linkid=9677404
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090908/87df5b14/attachment-0002.html
Humberto Quintana
2009-09-08 16:16:04 UTC
Permalink
Hi Brian,

Thank you very much for your answer but both, Freeswitch and Kamailio have public IPs, it's my NAT'd IP phone who has private IP but this is fixed by Kamailio.

The problem is not the 1st call is failing ( the test is set that way), the problem is FS answers back 482 when Kamailio tries a 2nd route ( or 3rd ) for the same call...


Freeswitch is configured to use the Requested-URI sent by Kamailio:

<action application="bridge" data="sofia/external/${sip_req_uri}"/>


I noticed that there is no Log message in Freeswitch when receiving the INVITE for the 2nd route.
The process in FS seems to be destroyed (11:46:21.396593) before the 2nd INVITE is received (11:46:21.401419
).


U 2009/09/08 11:46:21.395702 freeswitch:5060 -> kamailio:5060
SIP/2.0 503 Service Unavailable.
Call-ID: ba748cd27cd163b5 at 192.168.2.13

U 2009/09/08 11:46:21.395897 kamailio:5060 -> freeswitch:5060
ACK sip:5145555555 at gw1:5060 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13

U 2009/09/08 11:46:21.401419 kamailio:5060 -> freeswitch:5060
INVITE sip:15145555555 at gw2:5061 SIP/2.0.
Call-ID: ba748cd27cd163b5 at 192.168.2.13

U 2009/09/08 11:46:21.401845 freeswitch:5060 -> kamailio:5060
SIP/2.0 482 Request merged.
Call-ID: ba748cd27cd163b5 at 192.168.2.13


2009-09-08 11:46:21.395503 [DEBUG] mod_sofia.c:417 Responding to INVITE with: 503
2009-09-08 11:46:21.395503 [DEBUG] switch_core_state_machine.c:46 sofia/external/10092020 at freeswitch Standard HANGUP, cause: NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:434 (sofia/external/10092020 at freeswitch) State HANGUP going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:476 (sofia/external/10092020 at freeswitch) State Change CS_HANGUP -> CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:932 Send signal sofia/external/10092020 at freeswitch [BREAK]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:398 (sofia/external/10092020 at freeswitch) Running State Change CS_REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612 (sofia/external/10092020 at freeswitch) State REPORTING
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:53 sofia/external/10092020 at freeswitch Standard REPORTING, cause: NORMAL_TEMPORARY_FAILURE
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:612 (sofia/external/10092020 at freeswitch) State REPORTING going to sleep
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:411 (sofia/external/10092020 at freeswitch) State Change CS_REPORTING -> CS_DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_session.c:1068 Session 3 (sofia/external/10092020 at freeswitch) Locked, Waiting on external entities
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1086 Session 3 (sofia/external/10092020 at freeswitch) Ended
2009-09-08 11:46:21.396593 [NOTICE] switch_core_session.c:1088 Close Channel sofia/external/10092020 at freeswitch [CS_DESTROY]
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564 (sofia/external/10092020 at freeswitch) State DESTROY
2009-09-08 11:46:21.396593 [DEBUG] mod_sofia.c:255 sofia/external/10092020 at freeswitch SOFIA DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:60 sofia/external/10092020 at freeswitch Standard DESTROY
2009-09-08 11:46:21.396593 [DEBUG] switch_core_state_machine.c:564 (sofia/external/10092020 at freeswitch) State DESTROY going to sleep


Note: I'm using only the external sofia profile.


Thanks,

Humberto











==========================================
Looks like FS is behind nat. You need to set local-network-acl and
the ext-rtp-ip and ext-sip-ip so FreeSWITCH properly puts in the right
IP's in the via headers and sdp.

Please refer to internal.xml in the latest SVN for an example of how
to do this.

/b

_________________________________________________________________
New! Open Messenger faster on the MSN homepage
http://go.microsoft.com/?linkid=9677405
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090908/645dca1b/attachment-0002.html
Loading...