<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hello Duane,<br>
    <br>
    Got them.<br>
    <br>
    The problem with your script is that the dialog gets created before
    the time you fix the nated contact. In your script, you call
    trace_dialog() before fixing the contacts, which internally creates
    the dialog. Thus, when the script reaches the create_dialog("PpB")
    part, the dialog is already there, with the old Contact info.<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
    <br>
    On 03/20/2012 06:17 PM, Duane Larson wrote:
    <blockquote
cite="mid:CAFcM1EpePgfLTAm6b1=xGkCvffP9Mj9u9Un2Q4t_W8Nk1Fuy2w@mail.gmail.com"
      type="cite">Vlad,<br>
      <br>
      I just sent you three attachments to your email directly.&nbsp; Let me
      know if you don't get them.<br>
      <br>
      <br>
      <br>
      <br>
      <div class="gmail_quote">On Tue, Mar 20, 2012 at 10:05 AM, Vlad
        Paiu <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:vladpaiu@opensips.org">vladpaiu@opensips.org</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> Hello Duane,<br>
            <br>
            It seems the dialog module still sees the caller leg's
            initial contact ( with private IP), as the Options pings as
            well as the BYE when terminating the call are generated with
            the caller's original contact.<br>
            <br>
            Can you please, privately, send to me your OpenSIPS script
            so I can take a look ?<br>
            Also, it would help a lot if you could send me the full
            OpenSIPS debug log for the call where the Options messages
            are generated to the private IP.
            <div class="im"><br>
              <br>
              Regards,<br>
              <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre>
              <br>
            </div>
            <div>
              <div class="h5"> On 03/20/2012 05:00 PM, Duane Larson
                wrote:
                <blockquote type="cite">Saul,<br>
                  <br>
                  I did make that one change.&nbsp; Thanks for the info.<br>
                  <br>
                  I still have the same issue.&nbsp; Here is a NGREP of the
                  client registering and then calling someone.<br>
                  <br>
                  <a moz-do-not-send="true"
                    href="http://pastebin.com/gC0LPASn" target="_blank">http://pastebin.com/gC0LPASn</a><br>
                  <br>
                  You will see that all messages to the softphone client
                  are good except for the OPTIONS keepalive messages.<br>
                  <br>
                  Here is how the softphone shows up in the location
                  table<br>
                  <br>
                  | 13808 | 9XX6XX6XX4 | <a moz-do-not-send="true"
                    href="http://irock.com" target="_blank">irock.com</a>&nbsp;&nbsp;&nbsp;&nbsp;
                  | <a moz-do-not-send="true"
                    href="http://sip:abjtcqvr@192.168.20.101:63407"
                    target="_blank">sip:abjtcqvr@192.168.20.101:63407</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                  | <a moz-do-not-send="true"
                    href="http://sip:9XX6XX6XX4@75.65.149.20:63407"
                    target="_blank">sip:9XX6XX6XX4@75.65.149.20:63407</a>&nbsp;
                  | NULL | 2012-03-20 10:01:28 | 0.38 |
                  9111814c105f4183a0cff673dcf55389&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;
                  2 | 2012-03-20 09:51:28 |&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp;&nbsp; 64 | Blink 0.2.7
                  (Windows)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
                  udp:50.XXX.XXX.156:5060 |&nbsp;&nbsp;&nbsp; NULL | NULL <br>
                  <br>
                  <br>
                  Vlad,<br>
                  <br>
                  In my INVITE route I do my NAT stuff before calling
                  create_dialog()<br>
                  <br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (client_nat_test("7")) {<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf("P-hint:
                  route(3)|setflag7,forcerport,fix_contact\r\n");<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setbflag(7);&nbsp;&nbsp;&nbsp; <br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport();<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
                  <br>
                  <br>
                  and then further down the script I do<br>
                  <br>
                  create_dialog("PpB");<br>
                  <br>
                  I'm not saying this is a bug because its very possible
                  I have something misconfigured.&nbsp; Would just like to
                  figure out what is wrong.<br>
                  <br>
                  <br>
                  <br>
                  <div class="gmail_quote">On Tue, Mar 20, 2012 at 4:34
                    AM, Vlad Paiu <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:vladpaiu@opensips.org"
                        target="_blank">vladpaiu@opensips.org</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin: 0pt
                      0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                      204, 204); padding-left: 1ex;">Hello Duane,<br>
                      <br>
                      Aside from the script miss-configurations that
                      Sa&uacute;l mentioned, please make sure that within your
                      script, you first make alterations to NAT-ed
                      contacts in INVITEs, and only after should you
                      call create_dialog(), so that the dialog module
                      gets the chance to see the modifications.<br>
                      <br>
                      Regards,<br>
                      <br>
                      Vlad Paiu<br>
                      OpenSIPS Developer<br>
                      <a moz-do-not-send="true"
                        href="http://www.opensips-solutions.com"
                        target="_blank">http://www.opensips-solutions.com</a>
                      <div><br>
                        <br>
                        <br>
                        On 03/20/2012 10:12 AM, Sa&uacute;l Ibarra Corretg&eacute;
                        wrote:<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin: 0pt
                        0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                        204, 204); padding-left: 1ex;">
                        <div> Hi,<br>
                          <br>
                          On Mar 19, 2012, at 10:34 PM, <a
                            moz-do-not-send="true"
                            href="mailto:duane.larson@gmail.com"
                            target="_blank">duane.larson@gmail.com</a>
                          wrote:<br>
                          <br>
                          <blockquote class="gmail_quote" style="margin:
                            0pt 0pt 0pt 0.8ex; border-left: 1px solid
                            rgb(204, 204, 204); padding-left: 1ex;"> I
                            don't think I am having any other issues. I
                            used the "Bye on timeout" option very
                            shortly before version 1.7 came out. I don't
                            think I am doing anything when it comes to
                            NOTIFY. This is a test user that is behind a
                            Vontage router and for whatever reason the
                            Blink client isn't finding out its Public
                            IP. When he calls someone you can see from
                            the NGREP that OpenSIPS keeps sending
                            OPTIONS to the private IP and then after a
                            while OpenSIPS sends BYES to both clients,
                            but since the BYE for the caller is sent to
                            a 192.168 private address he thinks he is
                            still on the call even after the callee got
                            the BYE and hung up. What version of
                            OpenSIPS are you currently running?<br>
                            <br>
                            This is what I have configured when it comes
                            to Register and Invites with NAT<br>
                            <br>
                          </blockquote>
                          Blink will not attempt to put your public IP
                          address in the Contact header. It's
                          unreliable, so your server should take care of
                          fixing the NAT.<br>
                          <br>
                        </div>
                        <blockquote class="gmail_quote" style="margin:
                          0pt 0pt 0pt 0.8ex; border-left: 1px solid
                          rgb(204, 204, 204); padding-left: 1ex;"> FOR
                          REGISTERS<br>
                          if(!search("^Contact:[ ]*\*")&amp;&amp;
                          &nbsp;client_nat_test("7")) {
                          <div>
                            <div><br>
                              setbflag(6);<br>
                              fix_nated_contact(); #### - This is needed
                              so that the contact address<br>
                              #### - in the location table never has a
                              private<br>
                              #### - IP address in it<br>
                              <br>
                            </div>
                          </div>
                        </blockquote>
                        <div>
                          <div> ^^^ This comment here (and the
                            associated code) is wrong. You must not fix
                            the contact for a REGISTER. Instead, just
                            call fix_nated_register, which will populate
                            the received field.<br>
                            <br>
                            <blockquote class="gmail_quote"
                              style="margin: 0pt 0pt 0pt 0.8ex;
                              border-left: 1px solid rgb(204, 204, 204);
                              padding-left: 1ex;"> fix_nated_register();<br>
                              <br>
                              force_rport();<br>
                              <br>
                              $avp(rcv) = "sip:" + $tU + "@" + $si + ":"
                              + $sp;<br>
                              };<br>
                              <br>
                              FOR INVITES<br>
                              if (client_nat_test("7")) {<br>
                              <br>
                              setbflag(7);<br>
                              force_rport();<br>
                              fix_nated_contact(); #### - This is needed
                              so that the contact address<br>
                              #### - in the location table never has a
                              private<br>
                              #### - IP address in it<br>
                              <br>
                              #fix_contact();<br>
                              };<br>
                              <br>
                            </blockquote>
                            <br>
                            Your problem doesn't seem to be related to
                            bugs in the dialog module, but to
                            miss-configuration.<br>
                            <br>
                            <br>
                            Regards,<br>
                            <br>
                            --<br>
                            Sa&uacute;l Ibarra Corretg&eacute;<br>
                            AG Projects<br>
                            <br>
                            <br>
                            <br>
                            <br>
_______________________________________________<br>
                            Users mailing list<br>
                            <a moz-do-not-send="true"
                              href="mailto:Users@lists.opensips.org"
                              target="_blank">Users@lists.opensips.org</a><br>
                            <a moz-do-not-send="true"
                              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                          </div>
                        </div>
                      </blockquote>
                      <div>
                        <div> <br>
_______________________________________________<br>
                          Users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Users@lists.opensips.org"
                            target="_blank">Users@lists.opensips.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                            target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <br>
                  -- <br>
                  --<br>
                  *--*--*--*--*--*<br>
                  Duane<br>
                  *--*--*--*--*--*<br>
                  --<br>
                  <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                </blockquote>
              </div>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          Users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
            target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      --<br>
      *--*--*--*--*--*<br>
      Duane<br>
      *--*--*--*--*--*<br>
      --<br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>