[Freeswitch-dev] Call to registered phone behind NAT
Oleg Khovayko
khovayko at gmail.com
Sun May 23 10:01:49 PDT 2010
Brian West wrote:
>
>
> I really find that one hard to believe.
>
Hard to believe, but this is true:
I have made PURE experiment.
My friend has registered SIP-phone behind NAT in Ukraine.
His registration:
Call-ID: 4a978b30 at 192.168.10.103
User: 1012 at 192.168.1.5
Contact: "user" <sip:1012 at 192.168.1.136:1024>
Agent: AcctonVoIP/2.5
Status: Registered(UDP)(unknown) EXP(2010-05-23 14:27:20)
Host: olegh.ath.cx
IP: 91.207.244.1
Port: 1024
Auth-User: 1012
Auth-Realm: olegh.ath.cx
MWI-Account: 1012 at 192.168.1.5
I tried call 1001 -> 1012, fs_cli prints:
2010-05-23 12:37:01.593320 [NOTICE] switch_channel.c:669 New Channel
sofia/internal/sip:1012 at 192.168.1.136:1024
[2b79d969-8966-df11-ac63-005004c3cb7e]
I sniffed network traffic, FS tries connect to his LAN address from
"Contact", not his real address:
olegh# tcpdump host'(192.168.1.136 or 91.207.244.1)'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on xl0, link-type EN10MB (Ethernet), capture size 96 bytes
12:40:55.044208 arp who-has 192.168.1.136 tell deskpro.khovayko.com
12:40:55.544711 arp who-has 192.168.1.136 tell deskpro.khovayko.com
12:40:56.545145 arp who-has 192.168.1.136 tell deskpro.khovayko.com
12:40:58.546827 arp who-has 192.168.1.136 tell deskpro.khovayko.com
> sofia profile xxx siptrace on
>
> I will be you its NOT ignoring the fs_path you just can't see the
> packet leaving and since its TCP the far side nat I suspect has closed
> the nat translation thus you'll need to register more often or enable
> keep alives on the device.
>
> /b
>
I tried to do this -- results as same as with tcpdump.
My local phone has number 1001, IP=192.168.1.130, try to call 1012
(behind NAT, see registration above):
freeswitch at internal>
freeswitch at internal>
freeswitch at internal>
recv 950 bytes from udp/[192.168.1.130]:5060 at 16:55:30.811681:
------------------------------------------------------------------------
INVITE sip:1012 at 192.168.1.5 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bKe2ba0d5f00302
From: 1001 Cabinet<sip:1001 at 192.168.1.5>;tag=4df567c4
To: 1012<sip:1012 at 192.168.1.5>
Call-ID: 78fdee2b-17 at 192.168.1.130
CSeq: 1380166667 INVITE
Max-Forwards: 70
Contact: 1001 Cabinet<sip:1001 at 192.168.1.130:5060>
P-Preferred-Identity: 1001 Cabinet<sip:1001 at 192.168.1.5:5060>
User-Agent: AcctonVoIP/2.5
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, SUBSCRIBE, REFER, NOTIFY,
PRACK, UPDATE, MESSAGE, SERVICE, INFO, PING
Allow-Events: refer
Supported: 100rel, replaces
Content-Length: 322
Content-Type: application/sdp
v=0
o=- 608413784 756898537 IN IP4 192.168.1.130
s=Voice call
e=you at yourcompany.com
c=IN IP4 192.168.1.130
t=0 0
a=sendrecv
m=audio 5000 RTP/AVP 0 8 18 100
a=ptime:20
a=maxptime:30
a=sendrecv
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:18 g729/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
------------------------------------------------------------------------
send 307 bytes to udp/[192.168.1.130]:5060 at 16:55:30.815843:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bKe2ba0d5f00302
From: 1001 Cabinet<sip:1001 at 192.168.1.5>;tag=4df567c4
To: 1012<sip:1012 at 192.168.1.5>
Call-ID: 78fdee2b-17 at 192.168.1.130
CSeq: 1380166667 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.0.6-svn-exported
Content-Length: 0
------------------------------------------------------------------------
send 788 bytes to udp/[192.168.1.130]:5060 at 16:55:30.842061:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bKe2ba0d5f00302
From: 1001 Cabinet<sip:1001 at 192.168.1.5>;tag=4df567c4
To: 1012 <sip:1012 at 192.168.1.5>;tag=Za0U6NHjK7H6S
Call-ID: 78fdee2b-17 at 192.168.1.130
CSeq: 1380166667 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.0.6-svn-exported
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, line-seize, call-info, sla,
include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="192.168.1.5",
nonce="4f2df2fe-8b66-df11-ac63-005004c3cb7e", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------
recv 329 bytes from udp/[192.168.1.130]:5060 at 16:55:30.907144:
------------------------------------------------------------------------
ACK sip:1012 at 192.168.1.5 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bKe2ba0d5f00302
From: 1001 Cabinet<sip:1001 at 192.168.1.5>;tag=4df567c4
To: 1012<sip:1012 at 192.168.1.5>;tag=Za0U6NHjK7H6S
Call-ID: 78fdee2b-17 at 192.168.1.130
CSeq: 1380166667 ACK
Max-Forwards: 70
User-Agent: AcctonVoIP/2.5
Content-Length: 0
------------------------------------------------------------------------
recv 1177 bytes from udp/[192.168.1.130]:5060 at 16:55:30.913127:
------------------------------------------------------------------------
INVITE sip:1012 at 192.168.1.5 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bK69429b9100303
From: 1001 Cabinet<sip:1001 at 192.168.1.5>;tag=4df567c4
To: 1012<sip:1012 at 192.168.1.5>
Call-ID: 78fdee2b-17 at 192.168.1.130
CSeq: 1380166668 INVITE
Max-Forwards: 70
Contact: 1001 Cabinet<sip:1001 at 192.168.1.130:5060>
P-Preferred-Identity: 1001 Cabinet<sip:1001 at 192.168.1.5:5060>
User-Agent: AcctonVoIP/2.5
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, SUBSCRIBE, REFER, NOTIFY,
PRACK, UPDATE, MESSAGE, SERVICE, INFO, PING
Allow-Events: refer
Supported: 100rel, replaces
Proxy-Authorization: Digest username="1001", realm="192.168.1.5",
uri="sip:1012 at 192.168.1.5",
nonce="4f2df2fe-8b66-df11-ac63-005004c3cb7e", qop=auth,
cnonce="2f9b946d", nc=00000001, response="32cf7ea1d398bce1e1c8f53380a6bcea"
Content-Length: 322
Content-Type: application/sdp
v=0
o=- 608413784 756898537 IN IP4 192.168.1.130
s=Voice call
e=you at yourcompany.com
c=IN IP4 192.168.1.130
t=0 0
a=sendrecv
m=audio 5000 RTP/AVP 0 8 18 100
a=ptime:20
a=maxptime:30
a=sendrecv
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:18 g729/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
------------------------------------------------------------------------
send 307 bytes to udp/[192.168.1.130]:5060 at 16:55:30.919399:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bK69429b9100303
From: 1001 Cabinet<sip:1001 at 192.168.1.5>;tag=4df567c4
To: 1012<sip:1012 at 192.168.1.5>
Call-ID: 78fdee2b-17 at 192.168.1.130
CSeq: 1380166668 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.0.6-svn-exported
Content-Length: 0
------------------------------------------------------------------------
send 1302 bytes to udp/[192.168.1.136]:1024 at 16:55:31.703579:
------------------------------------------------------------------------
INVITE sip:1012 at 192.168.1.136:1024 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5;rport;branch=z9hG4bK2ajD0jFj617vN
Max-Forwards: 69
From: "Extension 1001" <sip:1001 at 192.168.1.5>;tag=1vjDacKSDSyBH
To: <sip:1012 at 192.168.1.136:1024>
Call-ID: d6d76003-e12e-122d-728c-2fb53066047d
CSeq: 131198529 INVITE
Contact: <sip:mod_sofia at 192.168.1.5:5060>
User-Agent: FreeSWITCH-mod_sofia/1.0.6-svn-exported
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, line-seize, call-info, sla,
include-session-description, presence.winfo, message-summary, refer
Privacy: none
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 425
X-FS-Support: update_display
P-Asserted-Identity: "Extension 1001" <sip:1001 at 192.168.1.5>
v=0
o=FreeSWITCH 1274609641 1274609642 IN IP4 192.168.1.5
s=FreeSWITCH
c=IN IP4 192.168.1.5
t=0 0
m=audio 24090 RTP/AVP 0 115 107 9 8 3 101 13
a=rtpmap:0 PCMU/8000
a=rtpmap:115 G7221/32000
a=fmtp:115 bitrate=48000
a=rtpmap:107 G7221/16000
a=fmtp:107 bitrate=32000
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20
------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20100523/004e55f1/attachment-0001.html
More information about the FreeSWITCH-dev
mailing list