[Freeswitch-dev] Call to registered phone behind NAT

Oleg Khovayko khovayko at gmail.com
Wed May 19 11:46:04 PDT 2010


Hi,

Please help.


My FreeSWITCH has some mobile clients (Sipdroid and Nokia), keeps 
registration on the FS.
See registration record samples:

Call-ID:        571195090210 at 14.144.242.244
User:           1019 at 192.168.1.5
Contact:        "user" <sip:1019 at 14.144.242.244:38592;transport=udp>
Agent:          Sipdroid/1.4.6 beta/T-Mobile G1
Status:         Registered(UDP)(unknown) EXP(2010-05-19 16:38:41)
Host:           olegh.ath.cx
IP:             208.54.35.47
Port:           30727
Auth-User:      1019
Auth-Realm:     olegh.ath.cx
MWI-Account:    1019 at 192.168.1.5


Call-ID:        30IpTq1FoIfJnxJC5ROP1HByEOig2n
User:           1015 at 192.168.1.5
Contact:        "user" 
<sip:1015 at 10.0.0.135;transport=TCP;fs_nat=yes;fs_path=sip%3A1015%4094.71.98.45%3A17476%3Btransport%3DTCP>
Agent:          Nokia RA-6 210.34.75
Status:         Registered(TCP-NAT)(unknown) EXP(2010-05-19 15:57:27)
Host:           olegh.ath.cx
IP:             94.71.98.45
Port:           17476
Auth-User:      1015
Auth-Realm:     olegh.ath.cx
MWI-Account:    1015 at 192.168.1.5

As you can see, for last samle (nokia) "Contact" contains line: 
sip:1015 at 10.0.0.135.

In the real life, this phone NATed, and real IP (gateway's) is 94.71.98.45.

Call from that phone is OK.
But, when I try to call that phone from local, FS try to use wrong IP 
for connect:


2010-05-19 14:28:24.156706 [NOTICE] switch_channel.c:669 New Channel 
sofia/internal/sip:1015 at 10.0.0.135 [62b74c4f-7463-df11-ac63-005004c3cb7e]

Of course, connection can not be established.


Question: How to fix this problem?
Or maybe, need to change FS, and always use REAL IP:PORT for establish 
outgoing call?


Following - header of "sofia status profile internal":

=================================================================================================
Name                    internal
Domain Name             N/A
Auto-NAT                true
DBName                  sofia_reg_internal
Pres Hosts
Dialplan                XML
Context                 public
Challenge Realm         auto_from
RTP-IP                  192.168.1.5
Ext-RTP-IP              173.73.120.93
SIP-IP                  192.168.1.5
Ext-SIP-IP              173.73.120.93
URL                     sip:mod_sofia at 192.168.1.5:5060
BIND-URL                sip:mod_sofia at 192.168.1.5:5060
HOLD-MUSIC              local_stream://moh
OUTBOUND-PROXY          N/A
CODECS IN               G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM
CODECS OUT              G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM
TEL-EVENT               101
DTMF-MODE               rfc2833
CNG                     13
SESSION-TO              0
MAX-DIALOG              0
NOMEDIA                 false
LATE-NEG                false
PROXY-MEDIA             false
AGGRESSIVENAT           false
STUN-ENABLED            true
STUN-AUTO-DISABLE       false
CALLS-IN                96
FAILED-CALLS-IN         15
CALLS-OUT               113
FAILED-CALLS-OUT        79

Registrations:
=================================================================================================





More information about the FreeSWITCH-dev mailing list