[OpenSIPS-Users] Managing Concurrent Calls

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Sep 4 12:42:49 CEST 2015


Hi Schneur,

Do you originally load the limit from the subscriber table ?

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 04.09.2015 12:36, Schneur Rosenberg wrote:
>
> I limit mine on account and I used memcache to store the limits 
> because its not something that changes on a constant basis, so it only 
> does a db query maximum once a hour per device.
>
> On Sep 4, 2015 4:52 AM, "Bogdan-Andrei Iancu" <bogdan at opensips.org 
> <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Terrance,
>
>     That check is not expensive as it is done in memory cache (the
>     "address" table is cached at startup).
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>     OpenSIPS Founder and Developer
>     http://www.opensips-solutions.com
>
>     On 03.09.2015 21:42, Terrance Devor wrote:
>
>         Lovely!
>
>         For those that need to limit concurrent call on OpenSIPS, here
>         is the solution:
>
>         route[limit] {
>                 set_dlg_profile("ip","$si");
>                 get_profile_size("ip","$si","$var(calls)");
>         check_address("0","$si","$sp","$proto","$avp(ctx)");
>                 xlog("$avp(ctx)\n");
>                 xlog("L_INFO","Customer IP $si has $var(calls)
>         concurrent calls, and limit is 12\n");
>
>                 if($var(calls)>$avp(ctx)) {
>                         xlog("Customer IP $si exceeded number of calls
>         $var(calls)/12\n");
>                         send_reply("486", "Busy here, channel limit
>         exceeded.");
>                         exit;
>                 }
>         }
>
>         Bogdan, how expensive is
>         `check_address("0","$si","$sp","$proto","$avp(ctx)")`?
>
>         Terrance
>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150904/8b4af1be/attachment.htm>


More information about the Users mailing list