<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Why not just kill the call and have billing fix up for minimum duration occur during CDR creation?  Does not make sense to delay Hangup just to meet minimum duration.<br><br>Sent from my iPhone</div><div><br>On Jan 28, 2015, at 5:37 PM, Will Ferrer <<a href="mailto:will.ferrer@switchsoft.com">will.ferrer@switchsoft.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi <span style="font-size:12.8000001907349px;white-space:nowrap">Daniel</span><div><br></div><div>Yeah I am happy to be able to report the success. Thanks for everything as always!</div><div><br></div><div>I hope you are well.</div><div><br></div><div>Will</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 28, 2015 at 5:54 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    great that it was sorted out and it was not on Kamailio side :-)<br>
    <br>
    Also, glad to hear that async processing did increase capacity to
    handle more concurrent calls, even it was causing troubles to other
    applications ...<br>
    <br>
    Cheers,<br>
    Daniel<div><div class="h5"><br>
    <br>
    <div>On 28/01/15 05:40, Will Ferrer wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello
        <div><br>
        </div>
        <div>I wanted to give an update on this.</div>
        <div><br>
        </div>
        <div>My business partner that found the issue and has been
          monitoring the problem has tracked down the issue. It turns
          out that the features we implemented using the async module
          were leading to more calls going on con currently (as they
          were intended to) and this was causing and issue with voip
          monitor. So the issue was not with the Async module.</div>
        <div><br>
        </div>
        <div>All the best.</div>
        <div><br>
        </div>
        <div>Will Ferrer</div>
        <div><br>
        </div>
        <div>Switchsoft</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Jan 19, 2015 at 8:43 PM, Will
          Ferrer <span dir="ltr"><<a href="mailto:will.ferrer@switchsoft.com" target="_blank">will.ferrer@switchsoft.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi All<br>
              <br>
              We are trying to use the async module to to delay sending
              a bye on from one end of the call to the other.<br>
              <br>
              We are using async_route(routename, seconds) to delay
              the WITHINDLG route. The idea is that in the future we
              want to be able to have our billing min duration enforced
              (though currently we are having issues with the dialog
              module that we are discussing in another thread).
              <div><br>
              </div>
              <div>After running this on our deploy servers, the delays
                before sending on the byes get longer and longer, and
                then kamailio goes down. Then the receive udp buffer
                fills up.<br>
                <br>
                We tried it with both 4 and 400 async workers, and it
                made no difference.</div>
              <div><br>
              </div>
              <div>I am including a screen capture of the servers stats
                when this happens taken from voip monitor.</div>
              <div><br>
              </div>
              <div>Here are the relevant parts of the config:</div>
              <div><br>
              </div>
              <div>...</div>
              <div>loadmodule "async.so"<br>
              </div>
              <div>...</div>
              <div>modparam("async", "workers", ASYNC_THREADS)<br>
              </div>
              <div>...</div>
              <div>request_route {<br>
                ...</div>
              <div>route(DELAYED_BYE_STATIC);<br>
              </div>
              <div>...</div>
              <div>
                <div>route[DELAYED_BYE_STATIC] {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC");</div>
                <div><span style="white-space:pre-wrap"> </span>#!ifdef
                  WITH_DELAYED_BYE_STATIC</div>
                <div><span style="white-space:pre-wrap"> </span>if
                  (is_method("BYE")) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC, from self \n");</div>
                <div><span style="white-space:pre-wrap"> </span>#if
                  (from_uri == myself) {</div>
                <div><span style="white-space:pre-wrap"> </span>if
                  ((allow_trusted() || allow_source_address())
                  && from_uri == myself) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC, Bye detected, from self \n");</div>
                <div><span style="white-space:pre-wrap"> </span>send_reply("200",
                  "OK");</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC, sent 200 about to sleep \n");</div>
                <div><span style="white-space:pre-wrap"> </span>setflag(FLT_ACC);
                  # do accounting ...</div>
                <div><span style="white-space:pre-wrap"> </span>setflag(FLT_ACCFAILED);
                  # ... even if the transaction fails</div>
                <div><span style="white-space:pre-wrap"> </span>if
                  (has_totag()) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC, sleeping to WITHINDLG_DELAYED
                  \n");</div>
                <div><span style="white-space:pre-wrap"> </span>async_route("WITHINDLG_DELAYED",
                  MIN_DURATION);</div>
                <div><span style="white-space:pre-wrap"> </span>} else
                  {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC, sleeping to WITHINDLG \n");</div>
                <div><span style="white-space:pre-wrap"> </span>async_route("WITHINDLG",
                  MIN_DURATION);</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  DELAYED_BYE_STATIC, slept\n");</div>
                <div><span style="white-space:pre-wrap"> </span>exit;</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>#!endif</div>
                <div><span style="white-space:pre-wrap"> </span>return;</div>
                <div>}</div>
              </div>
              <div>...</div>
              <div>
                <div>route[WITHINDLG_DELAYED] {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG_DELAYED: triggered \n");</div>
                <div><span style="white-space:pre-wrap"> </span>$avp(was_delayed)
                  = 1;</div>
                <div><span style="white-space:pre-wrap"> </span>route(WITHINDLG);</div>
                <div>}</div>
              </div>
              <div>...</div>
              <div>
                <div>route[WITHINDLG] {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG triggered, request
                  method: $rm \n");</div>
                <div><span style="white-space:pre-wrap"> </span>#!ifdef
                  WITH_DISPATCHER</div>
                <div><span style="white-space:pre-wrap"> </span>if(is_method("BYE|CANCEL"))
                  {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  WITHINDLG:  cancel or bye detected, request method:
                  $rm \n");</div>
                <div><span style="white-space:pre-wrap"> </span>#!ifdef
                  WITH_DISPATCHER_LOAD_AWARE</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  WITHINDLG: running ds_load_update, request method: $rm
                  \n");</div>
                <div><span style="white-space:pre-wrap"> </span>ds_load_update();</div>
                <div><span style="white-space:pre-wrap"> </span>#dlg_get
                  ("$ci","$ft","$tt"); </div>
                <div><span style="white-space:pre-wrap"> </span>      
                           <span style="white-space:pre-wrap"> </span>#dlg_bye
                  ("all");</div>
                <div>        <span style="white-space:pre-wrap"> </span>#!endif</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>#!endif</div>
                <div><br>
                </div>
                <div><span style="white-space:pre-wrap"> </span>if
                  (has_totag() || $avp(was_delayed) == 1) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG has totag or
                  was_delayed: $avp(was_delayed)  \n");</div>
                <div><span style="white-space:pre-wrap"> </span>#
                  sequential request withing a dialog should</div>
                <div><span style="white-space:pre-wrap"> </span># take
                  the path determined by record-routing</div>
                <div><span style="white-space:pre-wrap"> </span>if
                  (loose_route()) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG has loose route \n");</div>
                <div><span style="white-space:pre-wrap"> </span>route(DLGURI);</div>
                <div><span style="white-space:pre-wrap"> </span>if
                  (is_method("BYE")) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  WITHINDLG: BYE detected");</div>
                <div><span style="white-space:pre-wrap"> </span>setflag(FLT_ACC);
                  # do accounting ...</div>
                <div><span style="white-space:pre-wrap"> </span>setflag(FLT_ACCFAILED);
                  # ... even if the transaction fails</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG","route
                  WITHINDLG: ACC flag set");</div>
                <div><span style="white-space:pre-wrap"> </span></div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>else if
                  ( is_method("ACK") ) {</div>
                <div><span style="white-space:pre-wrap"> </span># ACK
                  is forwarded statelessy</div>
                <div><span style="white-space:pre-wrap"> </span>route(NATMANAGE);</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>else if
                  ( is_method("NOTIFY") ) {</div>
                <div><span style="white-space:pre-wrap"> </span># Add
                  Record-Route for in-dialog NOTIFY as per RFC 6665.</div>
                <div><span style="white-space:pre-wrap"> </span>record_route();</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG RELAY 1\n");</div>
                <div><span style="white-space:pre-wrap"> </span>route(RELAY);</div>
                <div><span style="white-space:pre-wrap"> </span>} else
                  {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG else \n");</div>
                <div><span style="white-space:pre-wrap"> </span>if
                  (is_method("SUBSCRIBE") && uri == myself) {</div>
                <div><span style="white-space:pre-wrap"> </span>#
                  in-dialog subscribe requests</div>
                <div><span style="white-space:pre-wrap"> </span>route(PRESENCE);</div>
                <div><span style="white-space:pre-wrap"> </span>exit;</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>if (
                  is_method("ACK") ) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG is ack \n");</div>
                <div><span style="white-space:pre-wrap"> </span>if (
                  t_check_trans() ) {</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG t_check_trans \n");</div>
                <div><span style="white-space:pre-wrap"> </span># no
                  loose-route, but stateful ACK;</div>
                <div><span style="white-space:pre-wrap"> </span># must
                  be an ACK after a 487</div>
                <div><span style="white-space:pre-wrap"> </span># or
                  e.g. 404 from upstream server</div>
                <div><span style="white-space:pre-wrap"> </span>xlog("L_DEBUG",
                  "route WITHINDLG: will -- DLG RELAY 2\n");</div>
                <div><span style="white-space:pre-wrap"> </span>route(RELAY);</div>
                <div><span style="white-space:pre-wrap"> </span>exit;</div>
                <div><span style="white-space:pre-wrap"> </span>} else
                  {</div>
                <div><span style="white-space:pre-wrap"> </span># ACK
                  without matching transaction ... ignore and discard</div>
                <div><span style="white-space:pre-wrap"> </span>exit;</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>sl_send_reply("404","Not
                  here");</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div><span style="white-space:pre-wrap"> </span>exit;</div>
                <div><span style="white-space:pre-wrap"> </span>}</div>
                <div>}</div>
              </div>
              <div>...</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>Does any one know if this is a bug or a leak with in
                the async module, or perhaps something I am doing in my
                config?</div>
              <div><br>
              </div>
              <div>Thanks in advance for an assistance you can offer me.</div>
              <div><br>
              </div>
              <div>All the best.</div>
              <span><font color="#888888">
                  <div><br>
                  </div>
                  <div>Will Ferrer</div>
                  <div>Switchsoft</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list</span><br><span><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></span><br><span><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></span><br></div></blockquote></body></html>