[Freeswitch-users] doublenat outgoing call issue

Bruce Hopkins jbrucehopkins at gmail.com
Mon Mar 8 04:56:12 PST 2010


Hi,

I wonder if some kind soul might be able please to help me by pointing out
what I am doing wrong with my doublenat configuration.

I have incoming calls from WAN --> LAN working fine, but when I try to call
from LAN -->WAN, the Freeswitch CLI says:


"[ERR} switch_ivr_originate.c.2389 CAnnot create outgoing channel of type
[error] cause: [USER_NOT_REGISTERED]"


The setup is essentially:


phone_1 (192.168.a.b) --> NAT (public ip 1.2.3.4) --> Internet --> NAT
(public ip 5.6.7.8) --> Freeswitch (192.168.x.y) --> phone_2 (192.168.x.z)


Phone_1 is able to register with Freeswitch using a "doublenat" sip profile
I set up using port 5090, created from the default external profile with the
port changed. phone_1 can initiate calls to phone_2 fine with no problems
with audio - everything works just fine in that direction.

However when I try to call from phone_2 --> phone_1 I get the message "The
person at extension 1002 is not available.  Record your message at the
tone."  Meanwhile the CLI shows that Freeswitch says phone_1 is not
registered.

In trying to solve this I have run a Wireshark trace onthe PC running the
phone_1 softphone to check that the SIP registration seems to go as I
understand it should.  the dialog is as follows:

phone_1 --> FS             request: REGISTER
FS         -->  phone_1    status: 401 Unauthorised
phone_1 --> FS             request: REGISTER
FS         --> phone_1     status: 200 OK
phone_1 --> FS             request: SUBSCRIBE
FS         --> phone_1     status: 405 Method Not Allowed


There does appear to be a difference here to what happens when phone_2 (on
the same LAN as Freeswitch) registers.  With phone_2 I see:

phone_2 --> FS             request: REGISTER
FS         --> phone_2     status: 401 Unauthorised
phone_2 --> FS             request: REGISTER
FS         --> phone_2     status  200 OK
phone_2 --> FS             request: SUBSCRIBE
FS         --> phone_2     status: 202 Accepted
FS         --> phone_2     request: NOTIFY
phone_2 --> FS             status: 200 OK



More configuration details:

In conf/sip_profiles/doublenat.xml I have not uncommented <param
name="force-register-domain" value="$$(domain)"/>

In conf/sip_profiles/doublenat.xml I have tried setting the context to each
of public and default.  This does not seem to make a difference.

In conf/directory/doublenat.xml I have set the domain name to be the domain
name registerd for Fs's external IP with DNS, and used by phone_1.

In conf/directory/doublenat.xml I have tried both of the following 9I  don't
know if this is relevant)

1. Firstly with phone_1 registering to an extension in the default
configuration, held in conf/directory/default/:

<groups>
    <group name="default">
       <users>
          <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
       </users>
    </group>

2.  Then I tried moving the .xml file for phone_1's extension to
conf/drectory/doublenat/ and changed conf/directory/doublenat.xml to show:

<groups>
    <group name="doublenat">
       <users>
          <X-PRE-PROCESS cmd="include" data="doublenat/*.xml"/>
       </users>
     </group>

Unfortunately this does not make a difference to the issue though.

If anybody had the time to tell me what I am doing wrong I would be hugely
grateful !

Many thanks in advance
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100308/fffed071/attachment.html 


More information about the FreeSWITCH-users mailing list