<!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,<br>
    <br>
    Sorry Ryan, I might have went too fast through the PCAP and did not
    initially spot your actual problem.<br>
    <br>
    It seems that your problem is caused by the INVITE retransmission.
    When you reject the first INVITE you do it stateless-ly so the
    message does not ever reach TM level. When the retransmission comes,
    it is not absorbed by TM, so it is actually your retransmission that
    gets delivered to the other side.<br>
    <br>
    Please try to add a call to t_newtran() when starting to process the
    INVITEs to make sure that the TM is aware of them and can absorb
    retransmissions. This should fix your issue.<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer</pre>
    <br>
    On 11/11/2011 04:28 PM, Ryan Revels wrote:
    <blockquote
cite="mid:CAKFmOsE=hsEUz848znxR03hTp29OpOYVv=Mo++_n-8c98eprEg@mail.gmail.com"
      type="cite">Vlad,<br>
      <br>
      I'm a little confused by your response. I attached a pcap that
      shows the ACK being received. I'm trying to understand why
      OpenSIPS would continue to process the call after it replies with
      a 486 and exits the script. <br>
      <br>
      I would really appreciate any help.<br>
      <br>
      Thanks,<br>
      Ryan<br>
      <br>
      <br>
      <div class="gmail_quote">On Fri, Nov 4, 2011 at 5:37 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,<br>
            <br>
            From the output of dlg_list, I can see that the ACK was
            never received by OpenSIPS, so seems this is the source of
            your problem.<br>
            <br>
            You could try to set the dialog timeout to a lower value
            after the 200 OK is received ( couple of seconds ), and
            increase it after the ACK is received to a couple of hours.<br>
            <br>
            Regards,<br>
            <pre cols="72">Vlad Paiu
OpenSIPS Developer</pre>
            <div>
              <div class="h5"> <br>
                On 11/03/2011 10:36 PM, Ryan Revels wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">
                  <div>I've run into an issue where <i>very</i>&nbsp;rarely,
                    dialogs will "hang", that is, the dialog will
                    continue to exist even though the call never
                    connected. In the example I managed to track down,
                    the proxy should reject the call (because a limit of
                    concurrent calls has been reached) and at first, it
                    seems like it's going to... but then it sends a 100
                    Trying and continues to route the call to the
                    destination. From there, everything spirals and the
                    dialog doesn't die until it hits the global timeout.</div>
                  <div><br>
                  </div>
                  <div>The relevant portion of my script looks like:</div>
                  <div><br>
                  </div>
                  <div>
                    <div><font face="'courier new', monospace"># Check
                        gateway calls total</font></div>
                    <div><font face="'courier new', monospace">if
                        ($avp(custgwtotal_limit) != "0" &amp;&amp;
                        $avp(custgwtotal_limit) != NULL &amp;&amp;
                        $avp(custgwtotal_limit) != "")</font></div>
                    <div><font face="'courier new', monospace">{</font></div>
                    <div><font face="'courier new', monospace">&nbsp;
                        &nbsp;get_profile_size("custgwtotal","$rd","$avp(custgwtotal_count)");</font></div>
                    <div><font face="'courier new', monospace">&nbsp; &nbsp;if
                        (!$avp(custgwtotal_count) &lt;
                        $avp(custgwtotal_limit))</font></div>
                    <div><font face="'courier new', monospace">&nbsp; &nbsp;{</font></div>
                    <div><font face="'courier new', monospace">&nbsp; &nbsp; &nbsp;
                        sl_send_reply("486","Endpoint Session Limit");</font></div>
                    <div><font face="'courier new', monospace">&nbsp; &nbsp; &nbsp;
                        exit;</font></div>
                    <div><font face="'courier new', monospace">&nbsp; &nbsp;}</font></div>
                    <div><font face="'courier new', monospace">}</font></div>
                  </div>
                  <div><font face="'courier new', monospace">set_dlg_profile("custgwtotal","$rd");
                      #count total calls to customer's IP</font></div>
                  <div><font face="'courier new', monospace"><br>
                    </font></div>
                  <div><span style="font-family:
                      arial,helvetica,sans-serif;">I've attached a pcap
                      example of what the signaling looks like when the
                      dialog hangs. For this example, the output in
                      dlg_list looks like:</span></div>
                  <div><font face="arial, helvetica, sans-serif"><br>
                    </font></div>
                  <div>
                    <div><font face="'courier new', monospace">dialog::
                        &nbsp;hash=629:349156783</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>state::
                        3</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>user_flags::
                        0</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>timestart::
                        1320336333</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>timeout::
                        1320357957</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>callid::
                        did2.139.1120741</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>from_uri::
                        <a moz-do-not-send="true"
                          href="mailto:sip%3A16034299966@64.136.174.30"
                          target="_blank">sip:16034299966@64.136.174.30</a></font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>to_uri::
                        <a moz-do-not-send="true"
                          href="mailto:sip%3A16038869119@184.106.218.8"
                          target="_blank">sip:16038869119@184.106.218.8</a></font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>caller_tag::

                        1ae26ee84c61df6b84baef371d2bf5e4</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>caller_contact::

                        sip:184.106.219.203:5060;transport=udp</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>callee_cseq::
                        0</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>caller_route_set::&nbsp;</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>caller_bind_addr::
                        udp:<a moz-do-not-send="true"
                          href="http://184.106.218.8:5060"
                          target="_blank">184.106.218.8:5060</a></font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>callee_tag::
                        as58f4e19a</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>callee_contact::
                        <a moz-do-not-send="true"
                          href="mailto:sip%3A16038869119@71.168.70.47"
                          target="_blank">sip:16038869119@71.168.70.47</a></font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>caller_cseq::
                        2</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>callee_route_set::&nbsp;</font></div>
                    <div><font face="'courier new', monospace"><span
                          style="white-space: pre-wrap;"> </span>callee_bind_addr::
                        udp:<a moz-do-not-send="true"
                          href="http://184.106.218.8:5060"
                          target="_blank">184.106.218.8:5060</a></font></div>
                    <div style="font-family:
                      arial,helvetica,sans-serif;"><br>
                    </div>
                  </div>
                  <div><font face="arial, helvetica, sans-serif">Any
                      help would be appreciated.</font></div>
                  <div><font face="arial, helvetica, sans-serif"><br>
                    </font></div>
                  <div><font face="arial, helvetica, sans-serif">Thanks,</font></div>
                  <div><font face="arial, helvetica, sans-serif">Ryan</font></div>
                </div>
              </div>
              <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>
          <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>
      <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>