<div dir="ltr">Hello,<div><br></div><div>Thank you for your explanation.</div><div>Have a good weekend</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 15:03 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>
should work without dlg_manage() for bye, but it depends on dialog
matching mode and if did parameter is mirrored back in Route header.
If you can't trust the client or are not sure about dlg matching
mode, it is better to call dlg_manage() for BYE.<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
<div>On 18/09/15 10:39, José Seabra wrote:<br>
</div>
<blockquote type="cite">
<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"></a><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><br>
<br>
<div>On 17/09/15 19:02, José Seabra wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<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><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<pre cols="72">--
Daniel-Constantin Mierla
<a href="http://twitter.com/#%21/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" target="_blank">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>Cumprimentos
<div>José Seabra</div>
</div>
</div>
</blockquote>
<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>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cumprimentos<div>José Seabra</div></div>
</div>