Connection issue FreeSWITCH over NAT

Apr 9, 2009 at 2:01 AM

Recently I found CallButler and and I LOVE IT!

While I was testing CallButler, and I'm aiming to connect CallButler with FreeSWITCH over the NAT environment.

[ X-lite1 <-> CallButler <-> NAT <-> INTERNET <-> NAT <-> FreeSWITCH <-> X-lite2]

Case 1: (Working O.K.)
  X-lite2 calling X-lite1
  - Hangup from X-lite1 : OK
  - Hangup from X-lite2: OK

Case 2: (Not working)
  - Hangup from X-lite1: Not hanging up
  - Hangup from X-lite2: OK

SIP Trace 1: SIP initiation (Case 2 above)
------------------------------------------------------------------------------------------------
INVITE sip:099293122@voip.xxx.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.22:5060;rport;branch=z9hG4bK60A7E9089F0745989792560792DF782D
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>
Contact: <sip:099293000@10.0.0.22:5060>
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 565 INVITE
User-Agent: WOSISIP 1.0
Max-Forwards: 70
Content-Length: 341
Supported: replaces
Content-Type: application/sdp

v=0
o=099293000 633748773570468750 633748773570468768 IN IP4 10.0.0.22
s=WOSI SIP 0.5
c=IN IP4 10.0.0.22
t=0 0
m=audio 8002 RTP/AVP 0 8 3 97 7 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:7 LPC/8000
a=rtpmap:98 SPEEX/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
------------------------------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.22:5060;rport=5060;branch=z9hG4bK60A7E9089F0745989792560792DF782D;received=xxx.xxx.xxx.xxx
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 565 INVITE
User-Agent: FreeSWITCH
Content-Length: 0
------------------------------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.0.0.22:5060;rport=5060;branch=z9hG4bK60A7E9089F0745989792560792DF782D;received=xxx.xxx.xxx.xx
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>;tag=prmBg3a0rt5ea
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 565 INVITE
User-Agent: FreeSWITCH
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="voip.xxx.com", nonce="6489f3bc-249e-11de-8ba8-ab9d0818eeb5", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------------------------------
ACK sip:099293122@voip.xxx.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.22:5060;rport;branch=z9hG4bK60A7E9089F0745989792560792DF782D
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>;tag=prmBg3a0rt5ea
Contact: <sip:099293000@10.0.0.22:5060>
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 565 ACK
User-Agent: WOSISIP 1.0
Max-Forwards: 70
Content-Length: 0
------------------------------------------------------------------------------------------------
INVITE sip:099293122@voip.xxx.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.22:5060;rport;branch=z9hG4bKAFC0B882326F4B8CB1DC70439664C8E3
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>
Contact: <sip:099293000@10.0.0.22:5060>
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 566 INVITE
User-Agent: WOSISIP 1.0
Max-Forwards: 70
Content-Length: 341
Supported: replaces
Content-Type: application/sdp
Proxy-Authorization: Digest username="099293000",realm="voip.xxx.com",nonce="6489f3bc-249e-11de-8ba8-ab9d0818eeb5",response="2cd88253f100f4283bfe80a4689372d2",uri="sip:099293122@voip.xxx.com:5060",cnonce="9d40ea6095a741368613f1c4edb968d7",nc=0000,qop=auth,algorithm=MD5

v=0
o=099293000 633748773570468750 633748773570468768 IN IP4 10.0.0.22
s=WOSI SIP 0.5
c=IN IP4 10.0.0.22
t=0 0
m=audio 8002 RTP/AVP 0 8 3 97 7 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:7 LPC/8000
a=rtpmap:98 SPEEX/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
------------------------------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.22:5060;rport=5060;branch=z9hG4bKAFC0B882326F4B8CB1DC70439664C8E3;received=xxx.xxx.xx.xxx
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 566 INVITE
User-Agent: FreeSWITCH
Content-Length: 0
------------------------------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.22:5060;rport=5060;branch=z9hG4bKAFC0B882326F4B8CB1DC70439664C8E3;received=xxx.xxx.xxx.xxx
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>;tag=Q1D4HyU3N3U1N
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 566 INVITE
Contact: <sip:mod_sofia@xxx.xxx.xxx.xxx:5060;transport=udp>
User-Agent: FreeSWITCH
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Session-Expires: 120;refresher=uas
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 265

v=0
o=FreeSWITCH 5185830995427729559 2917823764911367645 IN IP4 10.12.36.3
s=FreeSWITCH
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
m=audio 28560 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20

SIP Trace 2: SIP termination (Case 2 above)
------------------------------------------------------------------------------------------------
BYE sip:099293122@10.0.0.22:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.23:53530;branch=z9hG4bK-d8754z-4e26e2403f1fff7c-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:100@10.0.0.23:53530>
To: "099293122"<sip:099293122@10.0.0.22>;tag=448A9DA28E4A439F8F27BEAE81A4276D
From: "PK Labtop"<sip:100@10.0.0.22>;tag=66293261
Call-ID: MjViOTAxYjNhN2RjMDljZmJmZTE4ZWM3NTQ4MDQ1ZDI.
CSeq: 3 BYE
User-Agent: X-Lite release 1100l stamp 47546
Authorization: Digest username="100",realm="10.0.0.22",nonce="1953f64c-b82b-4835-9404-84c3fe83c5c0",uri="sip:099293122@10.0.0.22:5060",response="a2ce6c9f7437b71ca53ac47bfe07e807",algorithm=MD5
Reason: SIP;description="User Hung Up"
Content-Length: 0
------------------------------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.23:53530;branch=z9hG4bK-d8754z-4e26e2403f1fff7c-1---d8754z-;rport=53530;received=10.0.0.23
From: "PK Labtop"<sip:100@10.0.0.22>;tag=66293261
To: "099293122"<sip:099293122@10.0.0.22>;tag=448A9DA28E4A439F8F27BEAE81A4276D
Contact: <sip:099293122@10.0.0.22:5060>
Call-ID: MjViOTAxYjNhN2RjMDljZmJmZTE4ZWM3NTQ4MDQ1ZDI.
CSeq: 3 BYE
Content-Length: 0
------------------------------------------------------------------------------------------------
CANCEL sip:099293122@voip.xxx.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.22:5060;rport;branch=z9hG4bK3D4C5C95DFFE489999E445A4F0B43AEE
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=33C101187E1A48339D3430D9E23B6472
To: <sip:099293122@voip.xxx.com:5060>
Contact: <sip:099293000@10.0.0.22:5060>
Call-ID: D3DA1643AA6A4129B22D2F8831F0041D@10.0.0.22
CSeq: 1177 CANCEL
User-Agent: WOSISIP 1.0
Max-Forwards: 70
Content-Length: 0
------------------------------------------------------------------------------------------------
SIP/2.0 481 Call/Transaction Does Not Exist
Via: SIP/2.0/UDP 10.0.0.22:5060;rport=5060;branch=z9hG4bK3D4C5C95DFFE489999E445A4F0B43AEE;received=xxx.xxx.xxx.xxx
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=33C101187E1A48339D3430D9E23B6472
To: <sip:099293122@voip.xxx.com:5060>;tag=BS2ZZ0Xv6cmtN
Call-ID: D3DA1643AA6A4129B22D2F8831F0041D@10.0.0.22
CSeq: 1177 CANCEL
Content-Length: 0


Also it looks like it doesn't send any DTMF for CASE2.

Anyone have idea about this?

Apr 23, 2009 at 11:20 PM
Edited Apr 23, 2009 at 11:25 PM
I've found out when CallBulter receives "Accept: application/dsp" within in the header with response 200, CallBulter seems to be ignoring this initiation message. In other words, CallButler doesn't acknowlege this call has been answered.

Anyone knows how to solve it?

-----------------------------------

SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.22:5060;rport=5060;branch=z9hG4bKAFC0B882326F4B8CB1DC70439664C8E3;received=xxx.xxx.xxx.xxx
From: "PK Labtop" <sip:099293000@voip.xxx.com:5060>;tag=401FEF90FB004A14AAEFBD6566637CBC
To: <sip:099293122@voip.xxx.com:5060>;tag=Q1D4HyU3N3U1N
Call-ID: EBA191D1698A42B0A19A0429220C71BE@10.0.0.22
CSeq: 566 INVITE
Contact: <sip:mod_sofia@xxx.xxx.xxx.xxx:5060;transport=udp>
User-Agent: FreeSWITCH
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Session-Expires: 120;refresher=uas
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 265

v=0
o=FreeSWITCH 5185830995427729559 2917823764911367645 IN IP4 10.12.36.3
s=FreeSWITCH
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
m=audio 28560 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20

-----------------------------------

Apr 26, 2009 at 11:47 PM
Now I got it working.

Somehow FreeSWITCH did not pass 183 notification (ringing) so I've forced to pass 183 notification.

I assume this is due to CallButler is generating ring tones so FreeSWITCH is not give 183 to CallButler.