Hello, 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.
Cheers, Daniel On 17/09/15 19:02, José Seabra wrote: > Hi there, > > 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. > > 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. > > To count the number of concurrent calls I'm using the following logic > in main route: > > if (is_method("INVITE")) { > setflag(FLT_ACC); # do accounting > dlg_manage(); > > if(get_profile_size("concurrentcalls","local","$avp(s:size)")) > { > if($avp(s:size) != $null) > { > xlog("L_INFO", "Number of > calls for this server : $avp(s:size) - ID=$ci\n"); > if($avp(s:size) >= 15000) > { > xlog("L_INFO", > "Concurrent_max calls exceeded $avp(s:size) for caller '$fU' - R=$ru > ID=$ci\n"); > sl_send_reply("503", > "Channel limit exceeded\n"); > exit; > } > > } > } > set_dlg_profile("concurrentcalls","local"); > } > > > Please check out the attachment with logs. > > Best Regards > -- > José Seabra > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users