<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Even if the router is loopback enabled? I'm testing something like
    this:<br>
    <br>
Freeswitch(lan)&lt;-----------&gt;Router-NAT(Internet)Loopback&lt;----------&gt;Phone(lan)<br>
    <br>
    Setting the phone to STUN/UDP fails with "port unreachable", the
    phone can call but not be called, whereas STUN/TCP works- Freeswitch
    ignores the public IP sent by the phone and uses the router's
    internal IP instead.<br>
    This scenario is obviously different from the OP, but is typical of
    a roaming user switching between wlan and GSM. With the default
    internal profile and external_sip/rtp_ip set to STUN, it works quite
    well. Quite useless though if the phone can't use TCP. I'll be doing
    some tests from another NAT'd network later today to test this
    further....<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 8/01/2014 4:04 AM, Steven Ayre
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAFiqYunPmTMrqX0QDTtHuGzi7A616KK5BuKVL9vz7cLBDVcDVA@mail.gmail.com"
      type="cite">
      <div dir="ltr">STUN could work but would have problems in this
        scenario since the FS server is also on a RFC1918 IP, not a
        public address. You'd need to be using a STUN server running on
        the same network segment as FS to find the IP:port on that side
        of the NAT router for it to work.</div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On 7 January 2014 11:06, Francis <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:sms@icefire.qza.net.au" target="_blank">sms@icefire.qza.net.au</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            1. Have you turned on STUN on the phone?<br>
            2. Does the phone support any kind of NAT keepalive, say 20
            seconds or so?<br>
            3. Does the phone support RPORT?<br>
            4. Is there a firewall on the freeswitch server, and if so,
            are the<br>
            appropriate SIP and RTP ports open to new traffic?<br>
            5. Does the router have SIP ALG disabled? (yes is a good
            answer :)<br>
            <br>
            One more question- is the freeswitch server behind a nat as
            well, or<br>
            does it have it's own public IP address?<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                <br>
                On 7/01/2014 6:38 PM, Mitja wrote:<br>
                &gt; Hello there,<br>
                &gt;<br>
                &gt; Im trying to solve NAT related Problem which is
                caused by missbehaving<br>
                &gt; SIP phone.<br>
                &gt; Up Front: I searched the wiki and the web for all
                the NAT related<br>
                &gt; sites/mailling list. I think its a error of the
                invoxia IPhone docking<br>
                &gt; station (the missbehaving SIP phone), thus I did
                not open a jira for it.<br>
                &gt;<br>
                &gt; We have a freeswitch server with internet
                accessibility and a Phone<br>
                &gt; behind a natting router (Fritz!Box).<br>
                &gt; FreeSWITCH (1.2.3.4) &lt;-&gt; (10.11.12.13) NAT
                (192.168.0.1) &lt;-&gt;<br>
                &gt; (192.168.0.2) SIP Phone<br>
                &gt;<br>
                &gt; The Phone is able to register and initiate calls.
                But when someone else<br>
                &gt; to call that endpoint, its unreachable.<br>
                &gt;<br>
                &gt; I did some research and the problem seems to be
                that the phone registers<br>
                &gt; with a Contact containing the private IP Adress
                (192.168.0.2).<br>
                &gt;<br>
                &gt; <a class="moz-txt-link-abbreviated" href="mailto:freeswitch@1.2.3.4@internal">freeswitch@1.2.3.4@internal</a>&gt; sofia status
                profile internal reg<br>
                &gt;<br>
                &gt; Registrations:<br>
                &gt;
=================================================================================================<br>
                &gt;<br>
                &gt; Call-ID: &nbsp; &nbsp; &nbsp;
                &nbsp;aeac7f28-a6a0-4ba1-9d7c-30934924726d<br>
                &gt; User: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a moz-do-not-send="true"
                  href="mailto:270@1.2.3.4">270@1.2.3.4</a><br>
                &gt; Contact: &nbsp; &nbsp; &nbsp; &nbsp;"user"
                <a class="moz-txt-link-rfc2396E" href="mailto:sip:270@192.168.0.2:52767;ob">&lt;sip:270@192.168.0.2:52767;ob&gt;</a><br>
                &gt; Agent: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invoxia-lemonvoice-v6.17.4<br>
                &gt; Status: &nbsp; &nbsp; &nbsp; &nbsp; Registered(UDP)(unknown)
                EXP(2014-01-06 13:06:35)<br>
                &gt; EXPSECS(134)<br>
                &gt; Host: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ippbx-border<br>
                &gt; IP: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10.11.12.13<br>
                &gt; Port: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 52767<br>
                &gt; Auth-User: &nbsp; &nbsp; &nbsp;270<br>
                &gt; Auth-Realm: &nbsp; &nbsp; 1.2.3.4<br>
                &gt; MWI-Account: &nbsp; &nbsp;<a moz-do-not-send="true"
                  href="mailto:270@1.2.3.4">270@1.2.3.4</a><br>
                &gt;<br>
                &gt; Other devices in the same Setup have their NAT IP
                [+Port]<br>
                &gt; (<a moz-do-not-send="true"
                  href="http://10.11.12.13:52767" target="_blank">10.11.12.13:52767</a>)
                in their Contact Header which then works fine. In<br>
                &gt; this setup however the FreeSWITCH tries to send the
                INVITE Message to<br>
                &gt; 192.168.0.2 and even when a NAT Table on the
                firewall manages to map it<br>
                &gt; to <a moz-do-not-send="true"
                  href="http://10.11.12.13:52767" target="_blank">10.11.12.13:52767</a>
                the answer from 10.11.12.13 is discarded.<br>
                &gt;<br>
                &gt; Normally I use bridge with user/<a
                  moz-do-not-send="true" href="mailto:270@1.2.3.4">270@1.2.3.4</a>
                with the dialstring<br>
                &gt;
"{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(internal/${dialed_user}@${dialed_domain})}".<br>
                &gt; I tried to force freeswitch to use the NAT IP
                address by calling bridge<br>
                &gt; with <a class="moz-txt-link-rfc2396E" href="mailto:sofia/internal/sip:270@10.11.12.13:52767;ob">"sofia/internal/sip:270@10.11.12.13:52767;ob"</a>
                which worked fine.<br>
                &gt; The IP address is of course not static but if I
                would be able to extract<br>
                &gt; the IP information which is stored in sofia
                registry (see above) I could<br>
                &gt; arrange my dialplan in a way that would fix that
                phones missbehaviour.<br>
                &gt;<br>
                &gt; So after all that describing text (sorry for that),
                heres my question:<br>
                &gt; Is there a way (an API or Dialplan command) to get
                the IP Information<br>
                &gt; which is stored the sofia registry.<br>
                &gt;<br>
                &gt; Thanks in advance<br>
                &gt;<br>
                &gt; Regards,<br>
                &gt; Mitja<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;
_________________________________________________________________________<br>
                &gt; Professional FreeSWITCH Consulting Services:<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="http://www.freeswitchsolutions.com"
                  target="_blank">http://www.freeswitchsolutions.com</a><br>
                &gt;<br>
                &gt; FreeSWITCH-powered IP PBX: The CudaTel
                Communication Server<br>
                &gt; <a moz-do-not-send="true"
                  href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
                &gt;<br>
                &gt; Official FreeSWITCH Sites<br>
                &gt; <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
                &gt;<br>
                &gt; FreeSWITCH-users mailing list<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                &gt; UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                &gt; <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
                <br>
                <br>
_________________________________________________________________________<br>
                Professional FreeSWITCH Consulting Services:<br>
                <a moz-do-not-send="true"
                  href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitchsolutions.com"
                  target="_blank">http://www.freeswitchsolutions.com</a><br>
                <br>
                FreeSWITCH-powered IP PBX: The CudaTel Communication
                Server<br>
                <a moz-do-not-send="true" href="http://www.cudatel.com"
                  target="_blank">http://www.cudatel.com</a><br>
                <br>
                Official FreeSWITCH Sites<br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
                <a moz-do-not-send="true" href="http://www.cluecon.com"
                  target="_blank">http://www.cluecon.com</a><br>
                <br>
                FreeSWITCH-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                <a moz-do-not-send="true"
                  href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>