[SR-Users] Dialog module isn't decreasing the profile size, and isn't entering on event routes

José Seabra joseseabra4 at gmail.com
Fri Sep 18 16:16:56 CEST 2015


Hello,

Thank you for your explanation.
Have a good weekend

Best Regards
José Seabra

2015-09-18 15:03 GMT+01:00 Daniel-Constantin Mierla <miconda at gmail.com>:

> Hello,
>
> 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.
>
> Cheers,
> Daniel
>
>
> On 18/09/15 10:39, José Seabra wrote:
>
> Hi Daniel,
> I wasn't executing the dlg_manage on BYE requests I thought that i only
> needed execute it on INVITES messages.
>
> it's working now after adding:
>
>  if(is_known_dlg())
> {
>      dlg_manage();
> }
>
> Thank you for your support
>
> Best regards
> José Seabra
>
> 2015-09-18 8:24 GMT+01:00 Daniel-Constantin Mierla < <miconda at gmail.com>
> miconda at gmail.com>:
>
>> 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 listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://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 at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Cumprimentos
> José Seabra
>
>
> --
> Daniel-Constantin Mierlahttp://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
>
>


-- 
Cumprimentos
José Seabra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150918/bea54772/attachment.html>


More information about the sr-users mailing list