[OpenSIPS-Users] Call limit based on destination GW
Matine Tinthaitae
fehmfehmfehmfehmfehm at gmail.com
Wed Dec 13 10:13:29 EST 2017
Thanks a lot. I think i have solved it.
I moved the limit-check and set_dlg_profile below do_routing() in the
request route to be able to use gw_id_avp from drouting.
Now i'm tagging the calls with the profile "trunkCalls#office1" which i
think is what i need.
I'm off to test this in practice! :)
//Matine
2017-12-13 15:41 GMT+01:00 Jon Abrams <ffshoh at gmail.com>:
> Some ideas:
>
> In the ROUTE_REQUEST or BRANCH_ROUTE, you might do something like this to
> set the profile for the specific gateway:
>
> set_dlg_profile("dest_gw","$rd");
>
> Then you can check it in prior ROUTE_REQUEST logic before t_relay'ing the
> INVITE:
>
> if (get_profile_size("dest_gw","$rd","$var(dest_gw_count)"))
> {
> if ($var(dest_gw_count)>$avp(gw_max_call_limit)) {
> xlog("LIMIT: Call $ci - Max call limit hit on $rd \n");
>
> }
> }
>
> Make sure to clear the unset the profile in a FAILURE_ROUTE if you are
> using gateway failover.
>
>
>
> On Wed, Dec 13, 2017 at 8:20 AM, Matine Tinthaitae <
> fehmfehmfehmfehmfehm at gmail.com> wrote:
>
>> Thank you for replying.
>> That's what the tutorial i linked used so i'm still stuck. Do you have
>> anything more specific?
>> My problem is that i can filter on anything on the incoming invite, but i
>> don't see how i filter on destination gateway.
>>
>> //Matine
>>
>>
>> 2017-12-13 15:04 GMT+01:00 Aqs Younas <aqsyounas at gmail.com>:
>>
>>> Check profiling in dialog module
>>>
>>> http://www.opensips.org/html/docs/modules/2.3.x/dialog.html
>>>
>>> On 13 December 2017 at 18:53, Matine Tinthaitae <
>>> fehmfehmfehmfehmfehm at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have a opensips installation which receives calls from two gateways
>>>> and sends it out to a couple PBXes depending on dr_rules.
>>>>
>>>> I'd like to limit the concurrent calls depending on destination but i
>>>> can't find any way to do this. I've looked at
>>>> http://www.opensips.org/Documentation/Tutorials-ConcurrentCa
>>>> llsLimitation but as far as i understand this looks at the source ip
>>>> and blocks it there. I need to limit per destination.
>>>>
>>>> Even better would be to somehow limit per total from/to a gateway but
>>>> that isn't really necessary right now.
>>>>
>>>> I hope someone can point me in the right direction!
>>>>
>>>> //Matine
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> 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
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> 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/20171213/14a77266/attachment.html>
More information about the Users
mailing list