<div dir="ltr">Hi Daniel,<div>I wasn't executing the dlg_manage on BYE requests I thought that i only needed execute it on INVITES messages.</div><div><br></div><div>it's working now after adding:</div><div><br></div><div><div> if(is_known_dlg())</div><div>{</div><div> dlg_manage();</div><div>}</div></div><div><br></div><div>Thank you for your support</div><div><br></div><div>Best regards</div><div>José Seabra</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-18 8:24 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<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>
do you execute dlg_manage() for BYE requests? Or, if you rely on the
parameters to route headers, look at the BYE and see if it is there.<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
<div>On 17/09/15 19:02, José Seabra wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi there,
<div><br>
</div>
<div>I'm using a dialog module in a small kamailio script that
only does routing based on prefix, and relay the invite from
one ipaddr to another ip addr (diferent interfaces) using $fs
variavel.</div>
<div><br>
</div>
<div>
<div>Now i was introducing the dialog module to limit the
number of concurrent calls, and i noticed that it only can
increasing the number of dialogs, and it isn't decreasing
when receives the "BYE", I also noticed that when kamailio
receives "BYE" the dialog event route for state "end" is
not executed.</div>
</div>
<div><br>
</div>
<div>To count the number of concurrent calls I'm using the
following logic in main route:</div>
<div><br>
</div>
<div>
<div>if (is_method("INVITE")) {</div>
<div> setflag(FLT_ACC); # do accounting</div>
<div> dlg_manage();</div>
<div>
if(get_profile_size("concurrentcalls","local","$avp(s:size)"))</div>
<div> {</div>
<div> if($avp(s:size) != $null)</div>
<div> {</div>
<div> xlog("L_INFO",
"Number of calls for this server : $avp(s:size) -
ID=$ci\n"); </div>
<div> if($avp(s:size)
>= 15000)</div>
<div> {</div>
<div>
xlog("L_INFO", "Concurrent_max calls exceeded $avp(s:size)
for caller '$fU' - R=$ru ID=$ci\n");</div>
<div>
sl_send_reply("503", "Channel limit exceeded\n");</div>
<div> exit;</div>
<div> }</div>
<div><br>
</div>
<div> }</div>
<div> }</div>
<div>
set_dlg_profile("concurrentcalls","local");</div>
<div> }</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Please check out the attachment with logs.<br>
</div>
<div><br>
</div>
<div>Best Regards</div>
<div>-- <br>
</div>
<div>
<div>
<div>José Seabra</div>
</div>
</div>
</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>
Book: SIP Routing With Kamailio - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</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" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cumprimentos<div>José Seabra</div></div>
</div>