<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Eric,<br>
    <br>
    Not the OpenSIPs logs I'm looking for, but the actual SIP packet at
    network level (use ngrep or tcpdump) for the INVITE leaving your
    OpenSIPS.<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 30.09.2016 16:52, Eric Freeman
      wrote:<br>
    </div>
    <blockquote
cite="mid:DM3PR12MB07648F5758B18A823B61D2E087C10@DM3PR12MB0764.namprd12.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
        style="font-size:10pt;color:#000000;font-family:Verdana, Geneva,
        sans-serif;">
        <p>Hopefully this is the relevant information you need from the
          log. I am trying to call <span style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="mailto:111@199.48.152.152">111@199.48.152.152</a>.
            The IP of the opensips server si 10.88.23.10 and has a
            public IP of 204.17.231.3.  The IP address of the video
            conference server is 10.89.71.12.</span></p>
        <p><br>
        </p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_msg: SIP
          Request:</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_msg:  method:
           &lt;INVITE&gt;</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_msg:  uri:    
          <a class="moz-txt-link-rfc2396E" href="mailto:sip:111@199.48.152.152">&lt;sip:111@199.48.152.152&gt;</a></p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_msg:  version:
          &lt;SIP/2.0&gt;</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers:
          flags=2</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_to: end of
          header reached, state=10</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_to:
          display={}, ruri={<a class="moz-txt-link-abbreviated" href="mailto:sip:111@199.48.152.152">sip:111@199.48.152.152</a>}</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:get_hdr_field:
          &lt;To&gt; [26]; uri=[<a class="moz-txt-link-abbreviated" href="mailto:sip:111@199.48.152.152">sip:111@199.48.152.152</a>] </p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:get_hdr_field: to
          body [<a class="moz-txt-link-rfc2396E" href="mailto:sip:111@199.48.152.152">&lt;sip:111@199.48.152.152&gt;</a>#015#012]</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:get_hdr_field: cseq
          &lt;CSeq&gt;: &lt;1&gt; &lt;INVITE&gt;</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_via_param:
          found param type 235, &lt;rport&gt; = &lt;n/a&gt;; state=6</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_via_param:
          found param type 232, &lt;branch&gt; =
          &lt;z9hG4bK-57ed3cdd-76b5c304-9584dff&gt;; state=16</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_via: end of
          header reached, state=5</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers: via
          found, flags=2</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers: this
          is the first via</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:receive_msg: After
          parse_msg...</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:receive_msg:
          preparing to run routing scripts...</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers:
          flags=100</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:maxfwd:is_maxfwd_present:
          value = 70 </p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:uri:has_totag: no totag</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers:
          flags=78</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:tm:t_lookup_request:
          start searching: hash=25578, isACK=0</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:tm:matching_3261: RFC3261
          transaction matching failed</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:tm:t_lookup_request: no
          transaction found</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_to_param:
          tag=2c770a98-c47590a-13c4-45026-57ed3cdd-1bac9941-57ed3cdd</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_to: end of
          header reached, state=29</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_to:
          display={"Conference Room"},
          ruri={<a class="moz-txt-link-abbreviated" href="mailto:sip:LifeSize@10.88.23.13;transport=UDP">sip:LifeSize@10.88.23.13;transport=UDP</a>}</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:grep_sock_info:
          checking if host==us: 11==11 &amp;&amp;  [10.88.23.13] ==
          [10.88.23.13]</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:grep_sock_info:
          checking if port 5060 matches port 5060</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers:
          flags=200</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:get_hdr_field:
          content_length=1759</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:get_hdr_field: found
          end of header</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:rr:find_first_route: No
          Route headers found</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:grep_sock_info:
          checking if host==us: 14==11 &amp;&amp;  [199.48.152.152] ==
          [10.88.23.13]</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:grep_sock_info:
          checking if port 5060 matches port 5060</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:grep_sock_info:
          checking if host==us: 14==11 &amp;&amp;  [199.48.152.152] ==
          [10.88.23.13]</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:grep_sock_info:
          checking if port 5060 matches port 5060</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:check_self: host !=
          me</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]: DBG:core:parse_headers:
          flags=ffffffffffffffff</p>
        <p>Sep 29 12:10:17 cd-ubuntu-opensips
          /usr/local/sbin/opensips[12878]:
          DBG:core:do_action_set_adv_address: setting adv address =
          [204.17.231.3]</p>
        <p><br>
        </p>
        <div id="Signature">
          <div name="divtagdefaultwrapper"
            style="font-family:Calibri,Arial,Helvetica,sans-serif;
            font-size:; margin:0">
            <div id="divtagdefaultwrapper" style="font-size:12pt;
              color:#000000; background-color:#FFFFFF;
              font-family:Calibri,Arial,Helvetica,sans-serif">
              <p>Eric Freeman</p>
              <p><span id="ms-rterangepaste-start"></span></p>
              <div style="color:rgb(34,34,34);
                font-family:arial,sans-serif; font-size:12.8px">
                Technical Director/NA for TBWA\Chiat\Day</div>
              <div style="color:rgb(34,34,34);
                font-family:arial,sans-serif; font-size:12.8px">
                <br>
              </div>
              <div style="color:rgb(34,34,34);
                font-family:arial,sans-serif; font-size:12.8px">
                <span style="font-size:13px">TBWA\Chiat\Day New York</span><br>
              </div>
              <div style="color:rgb(34,34,34);
                font-family:arial,sans-serif; font-size:12.8px">
                488 Madison Ave.<br>
                New York NY 10022<br>
                United States of America</div>
              <div style="color:rgb(34,34,34);
                font-family:arial,sans-serif; font-size:12.8px">
                Tel: <a moz-do-not-send="true" value="+12128041324"
                  tabindex="0" href="tel:%2B12128041324" target="_blank"
                  style="color:rgb(17,85,204)" id="LPNoLP">+12128041324</a></div>
              <span id="ms-rterangepaste-end"></span>
            </div>
          </div>
        </div>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          color="#000000" face="Calibri, sans-serif"><b>From:</b>
          Bogdan-Andrei Iancu <a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a><br>
          <b>Sent:</b> Friday, September 30, 2016 4:32:01 AM<br>
          <b>To:</b> Eric Freeman; OpenSIPS users mailling list<br>
          <b>Subject:</b> Re: [OpenSIPS-Users] Routing in opensips</font>
        <div> </div>
      </div>
      <div><tt>Hi Eric,<br>
          <br>
          As a first step, can you confirm that the INVITE (sent out by
          your OPenSIPS to the internet) has in VIA hdr the public IP of
          your NAT ?<br>
          <br>
          Best regards,<br>
        </tt>
        <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
        <div class="moz-cite-prefix">On 29.09.2016 19:14, Eric Freeman
          wrote:<br>
        </div>
        <blockquote
cite="mid:DM3PR12MB0764911C486A147697F95D8687CE0@DM3PR12MB0764.namprd12.prod.outlook.com"
          type="cite">
          <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
          <div id="divtagdefaultwrapper"
            style="font-size:10pt;color:#000000;font-family:Verdana,
            Geneva, sans-serif;">
            <p>It is still not working, I added my public IP as
              requested. I do not have any gateways or anything set up.
              Do I need to add anything?</p>
            <p>I added this to the route statement:</p>
            <p><br>
            </p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span style="color: rgb(0, 0, 0); font-size: 10pt;">if
                (!uri==myself) {</span></p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span class="Apple-tab-span" style="white-space: pre; color: rgb(0, 0, 0); font-size: 10pt;"></span><span
                style="color: rgb(0, 0, 0); font-size: 10pt;">append_hf("P-hint:
                outbound\r\n"); </span></p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span class="Apple-tab-span" style="white-space: pre; color: rgb(0, 0, 0); font-size: 10pt;"></span><span
                style="color: rgb(0, 0, 0); font-size: 10pt;">set_advertised_address("XXX.XX.XXX.X");</span></p>
            <p><span style="color: rgb(0, 0, 0); font-size: 10pt;"></span></p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span class="Apple-tab-span" style="white-space: pre; color: rgb(0, 0, 0); font-size: 10pt;"></span><span
                style="color: rgb(0, 0, 0); font-size: 10pt;">route(relay);</span><br>
            </p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <br>
            </p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span style="color: rgb(0, 0, 0); font-family: Verdana,
                Geneva, sans-serif, 'Apple Color Emoji', 'Segoe UI
                Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android
                Emoji', EmojiSymbols; font-size: 13px;">I am still
                receiving these errors:</span><br>
            </p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span style="color: rgb(0, 0, 0); font-size: 10pt;">Sep 29
                12:10:22 cd-ubuntu-opensips
                /usr/local/sbin/opensips[12878]:
                DBG:rr:find_first_route: No Route headers found</span></p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span style="color: rgb(0, 0, 0); font-size: 10pt;">Sep 29
                12:10:22 cd-ubuntu-opensips
                /usr/local/sbin/opensips[12878]: DBG:rr:loose_route:
                There is no Route HF</span></p>
            <p><span style="color: rgb(0, 0, 0); font-size: 10pt;"></span><span
                style="color: rgb(0, 0, 0); font-size: 10pt;"></span></p>
            <p style="margin-right: 0px; margin-left: 0px; font-size:
              18px; line-height: normal; font-family: Monaco; color:
              rgb(4, 51, 255);">
              <span style="color: rgb(0, 0, 0); font-size: 10pt;">Sep 29
                12:10:22 cd-ubuntu-opensips
                /usr/local/sbin/opensips[12878]: DBG:core:parse_headers:
                flags=78</span></p>
            <div><br>
            </div>
            <p><br>
            </p>
            <div id="Signature">
              <div name="divtagdefaultwrapper"
                style="font-family:Calibri,Arial,Helvetica,sans-serif;
                font-size:; margin:0">
                <div id="divtagdefaultwrapper" style="font-size:12pt;
                  color:#000000; background-color:#FFFFFF;
                  font-family:Calibri,Arial,Helvetica,sans-serif">
                  <p>Eric Freeman</p>
                  <p><span id="ms-rterangepaste-start"></span></p>
                  <div style="color:rgb(34,34,34);
                    font-family:arial,sans-serif; font-size:12.8px">
                    Technical Director/NA for TBWA\Chiat\Day</div>
                  <div style="color:rgb(34,34,34);
                    font-family:arial,sans-serif; font-size:12.8px">
                    <br>
                  </div>
                  <div style="color:rgb(34,34,34);
                    font-family:arial,sans-serif; font-size:12.8px">
                    <span style="font-size:13px">TBWA\Chiat\Day New York</span><br>
                  </div>
                  <div style="color:rgb(34,34,34);
                    font-family:arial,sans-serif; font-size:12.8px">
                    488 Madison Ave.<br>
                    New York NY 10022<br>
                    United States of America</div>
                  <div style="color:rgb(34,34,34);
                    font-family:arial,sans-serif; font-size:12.8px">
                    Tel: <a moz-do-not-send="true" value="+12128041324"
                      tabindex="0" href="tel:%2B12128041324"
                      target="_blank" style="color:rgb(17,85,204)"
                      id="LPNoLP">+12128041324</a></div>
                  <span id="ms-rterangepaste-end"></span></div>
              </div>
            </div>
          </div>
          <hr style="display:inline-block;width:98%" tabindex="-1">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              color="#000000" face="Calibri, sans-serif"><b>From:</b>
              Bogdan-Andrei Iancu
              <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a><br>
              <b>Sent:</b> Tuesday, September 20, 2016 8:38:31 AM<br>
              <b>To:</b> Eric Freeman; OpenSIPS users mailling list<br>
              <b>Subject:</b> Re: [OpenSIPS-Users] Routing in opensips</font>
            <div> </div>
          </div>
          <div><tt>He Eric,<br>
              <br>
              In the script (generated by menuconfig), you have an IF
              block with :<br>
                  append_hf("P-hint: outbound\r\n");<br>
              <br>
              That block is executed if one of your users is dialing an
              external SIP domain. So, that is the place where the calls
              will break out to public internet.
              <br>
              <br>
              As your OpenSIPS has a private IP (not routable in
              internet), you need to configure it to advertise the
              public IP of your NAT via the set_advertise_address() -
              see:<br>
                  <a moz-do-not-send="true"
                class="moz-txt-link-freetext"
href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc46">http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc46</a><br>
              <br>
              Put there the public IP of your NAT. Also, be sure you
              create in your router (running the NAT) a port forwarding
              from the public IP port 5060 UDP to the private IP of your
              OpenSIPS port 5060 UDP.<br>
              <br>
              Best regards,</tt><br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>