<div>Hi,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>I have incoming calls from WAN --> LAN working fine, but when I try to call from LAN -->WAN, the Freeswitch CLI says:</div>
<div> </div>
<div> </div>
<div>"[ERR} switch_ivr_originate.c.2389 CAnnot create outgoing channel of type [error] cause: [USER_NOT_REGISTERED]"</div>
<div> </div>
<div> </div>
<div>The setup is essentially:</div>
<div> </div>
<div> </div>
<div>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)</div>
<div> </div>
<div> </div>
<div>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. </div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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:</div>
<div> </div>
<div>phone_1 --> FS request: REGISTER</div>
<div>FS --> phone_1 status: 401 Unauthorised</div>
<div>phone_1 --> FS request: REGISTER</div>
<div>FS --> phone_1 status: 200 OK</div>
<div>phone_1 --> FS request: SUBSCRIBE</div>
<div>FS --> phone_1 status: 405 Method Not Allowed</div>
<div> </div>
<div> </div>
<div>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:</div>
<div> </div>
<div>phone_2 --> FS request: REGISTER</div>
<div>FS --> phone_2 status: 401 Unauthorised</div>
<div>phone_2 --> FS request: REGISTER</div>
<div>FS --> phone_2 status 200 OK</div>
<div>phone_2 --> FS request: SUBSCRIBE</div>
<div>FS --> phone_2 status: 202 Accepted</div>
<div>FS --> phone_2 request: NOTIFY</div>
<div>phone_2 --> FS status: 200 OK</div>
<div> </div>
<div> </div>
<div> </div>
<div>More configuration details:</div>
<div> </div>
<div>In conf/sip_profiles/doublenat.xml I have not uncommented <param name="force-register-domain" value="$$(domain)"/></div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>In conf/directory/doublenat.xml I have tried both of the following 9I don't know if this is relevant)</div>
<div> </div>
<div>1. Firstly with phone_1 registering to an extension in the default configuration, held in conf/directory/default/:</div>
<div> </div>
<div><groups></div>
<div> <group name="default"></div>
<div> <users></div>
<div> <X-PRE-PROCESS cmd="include" data="default/*.xml"/></div>
<div> </users></div>
<div> </group></div>
<div> </div>
<div>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:</div>
<div> </div>
<div><groups></div>
<div> <group name="doublenat"></div>
<div> <users></div>
<div> <X-PRE-PROCESS cmd="include" data="doublenat/*.xml"/></div>
<div> </users></div>
<div> </group></div>
<div> </div>
<div>Unfortunately this does not make a difference to the issue though.</div>
<div> </div>
<div>If anybody had the time to tell me what I am doing wrong I would be hugely grateful !</div>
<div> </div>
<div>Many thanks in advance</div>
<div>Bruce</div>