Not sure whether this belong in the users list or the dev list, but when in doubt; start with users :-)
I am using FreeSWITCH as an SBC, talking to Kamailio on one and and Asterisk on the other, and am seeing some strange behavior when calls are being forked on the Asterisk.
Call setup is like this:
1. FreeSWITCH receives INVITE from Kamailio
2. FreeSWITCH sends INVITE to Asterisk with new Call-ID
3. Asterisk forks call, sends out multiple INVITEs back to FreeSWITCH (each with a unique call-id)
4. FreeSWITCH sends multiple INVITEs to Kamailio, each with the new Call-ID from step 2.
This is causing problems with one of the MGWs behind Kamailio, which is seeing multiple INVITEs to different destinations with the same Call-ID.
So, firstly, why is FreeSWITCH reusing call-ids?
Secondly, how is it matching up the calls? I can't find anything common in the INVITEs, other than the source number and obviously that the IP sent to and received from is the same.
I'm not sure if this is intended behavior or not, but is there a way to have FreeSWITCH not do that?
Regards,
Örn
P.S. Here is the sequence of INVITEs. I also have the console log (for a different call) if needed.
INVITE sent to FreeSWITCH by Kamailio:
Record-Route: <sip:172.25.200.101;lr=on>
Via: SIP/2.0/UDP 172.25.200.101;branch=z9hG4bK165.08b3b5c4.0
Via: SIP/2.0/UDP 172.25.200.121:5080;rport=5080;branch=z9hG4bK9aFD5m2KKerHN
Max-Forwards: 16
Call-ID: 84b63791-4839-1233-639f-00215e2db0e0
CSeq: 73014324 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.2.7
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 229
X-FS-Support: update_display,send_info
v=0
o=FreeSWITCH 1426681750 1426681751 IN IP4 172.25.200.121
s=FreeSWITCH
c=IN IP4 172.25.200.121
t=0 0
m=audio 19026 RTP/AVP 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
INVITE sent to Asterisk by FreeSWITCH:
Via: SIP/2.0/UDP 10.11.12.13;rport;branch=z9hG4bK0N733e7FHv4QF
Max-Forwards: 15
Call-ID: a7c77ea5-4839-1233-73b9-00215e2c8c90
CSeq: 73014353 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.2.12
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 223
X-FS-Support: update_display,send_info
v=0
o=FreeSWITCH 1426677605 1426677606 IN IP4 10.11.12.13
s=FreeSWITCH
c=IN IP4 10.11.12.13
t=0 0
m=audio 23230 RTP/AVP 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
First INVITE sent to FreeSWITCH by Asterisk (forked call):
Via: SIP/2.0/UDP 172.26.0.62:5060;branch=z9hG4bK416db3f1;rport
Max-Forwards: 70
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.15-cert2
Date: Wed, 18 Mar 2015 17:47:11 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 312
v=0
o=root 693576967 693576967 IN IP4 172.26.0.62
s=Asterisk PBX 1.8.15-cert2
c=IN IP4 172.26.0.62
t=0 0
m=audio 30440 RTP/AVP 8 0 9 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
Second INVITE sent to FreeSWITCH by Asterisk (forked call):
Via: SIP/2.0/UDP 172.26.0.62:5060;branch=z9hG4bK6796aff1;rport
Max-Forwards: 70
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.15-cert2
Date: Wed, 18 Mar 2015 17:47:11 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 310
v=0
o=root 89056081 89056081 IN IP4 172.26.0.62
s=Asterisk PBX 1.8.15-cert2
c=IN IP4 172.26.0.62
t=0 0
m=audio 30708 RTP/AVP 8 0 9 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
First INVITE sent by FreeSWITCH to Kamailio (call forked by Asterisk):
Via: SIP/2.0/UDP 172.25.200.111:5080;rport;branch=z9hG4bK3jvS9UyXU216H
Max-Forwards: 69
Call-ID: a7d2b58b-4839-1233-73b9-00215e2c8c90
CSeq: 73014353 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.2.12
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 209
X-FS-Support: update_display,send_info
v=0
o=FreeSWITCH 1426681031 1426681032 IN IP4 172.25.200.111
s=FreeSWITCH
c=IN IP4 172.25.200.111
t=0 0
m=audio 19804 RTP/AVP 8 0 9 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
Second INVITE sent by FreeSWITCH to Kamailio (call forked by Asterisk):
Via: SIP/2.0/UDP 172.25.200.111:5080;rport;branch=z9hG4bK4UNjBQF1rBrSD
Max-Forwards: 69
Call-ID: a7d2dd62-4839-1233-73b9-00215e2c8c90
CSeq: 73014353 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.2.12
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 209
X-FS-Support: update_display,send_info
v=0
o=FreeSWITCH 1426669459 1426669460 IN IP4 172.25.200.111
s=FreeSWITCH
c=IN IP4 172.25.200.111
t=0 0
m=audio 31376 RTP/AVP 8 0 9 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20