[OpenSIPS-Users] Route calls based on CPS rate

rajib deka rajibdk at gmail.com
Thu Feb 25 18:10:34 CET 2010


Hi Ovidiu,

Thank you very much for your explanation. It cleared all my doubts.

Regards
Rajib

On 2/25/10, Ovidiu Sas <osas at voipembedded.com> wrote:
> http://www.opensips.org/html/docs/modules/1.6.x/ratelimit.html#id228149
> When you specify a limit in the definition of a pipe, that limit will
> be divided by the timer interval in order to get the cps.
> If you want accurate cps control, then you need to set the
> timer_interval to a low value.
>
> For example:
> modparam("ratelimit", "timer_interval", 1)
> modparam("ratelimit", "pipe", "0:TAILDROP:200")
> => 200/1=200cps
>
> modparam("ratelimit", "timer_interval", 5)
> modparam("ratelimit", "pipe", "0:TAILDROP:200")
> => 200/5=40cps
> In this case, you can have 200 messages in the first second and no
> messages for the next 4s and the cps limitation will not kick in.
> For the first second you will have a cps of 200 and for the next 4s
> the cps will be 0, but on average you will have 40cps.
>
>
> Hope this helps.
>
> Regards,
> Ovidiu Sas
>
> On Thu, Feb 25, 2010 at 3:45 AM, rajib deka <rajibdk at gmail.com> wrote:
>> Thanks to all. I have doubt again, what is the use of timer_interval and
>> how
>> we can utilize it with the CPS limit for pipes.
>>
>> Regards
>> Rajib
>>
>> On Mon, Feb 15, 2010 at 10:45 PM, Ovidiu Sas <osas at voipembedded.com>
>> wrote:
>>>
>>> Yes, you can use the ratelimit module to control the cps.
>>> You will need to assign a pipe for each outbound destination.
>>>
>>> Regards,
>>> Ovidiu Sas
>>>
>>> On Mon, Feb 15, 2010 at 11:50 AM, rajib deka <rajibdk at gmail.com> wrote:
>>> > Hi Bogdan,
>>> >
>>> > I agree with you. But I have seen that RATELIMIT module is doing
>>> > something
>>> > like that. Can we use that module for each gateway by identifying the
>>> > gateway at run-time, like
>>> >
>>> > after LB selected the destination, we can have something like
>>> > if($du == <sip:some gateway>) {
>>> >
>>> >
>>> > if (!rl_check_pipe("1") {
>>> >               rl_drop();
>>> >               exit;
>>> >       };
>>> >
>>> > }
>>> >
>>> > where the pipe is with some cps value and INVITE queue. Is this will be
>>> > efficient.
>>> >
>>> > Regards
>>> > Rajib
>>> >
>>> > On Mon, Feb 15, 2010 at 6:58 PM, Bogdan-Andrei Iancu
>>> > <bogdan at voice-system.ro> wrote:
>>> >>
>>> >> Hi Rajib,
>>> >>
>>> >> LB module is doing routing based on the load as current ongoing calls
>>> >> per
>>> >> destination.
>>> >>
>>> >> To compute the CPS for a destination can be a bit tricky  - there is
>>> >> no
>>> >> module for doing it, Probably you can try to count the call using some
>>> >> shared mem variable (directly in script) and to try to calculate on
>>> >> the
>>> >> fly
>>> >> the CPS, but as said, does not seams an easy one (from mathematical
>>> >> perspective).
>>> >>
>>> >> Regards,
>>> >> Bogdan
>>> >>
>>> >> rajib deka wrote:
>>> >>>
>>> >>> Hello all,
>>> >>> Is it possible to route calls based on cps rate using OpenSIPS load
>>> >>> balancer module. We have an enterprise implementation here using
>>> >>> OpsnSIPS
>>> >>> load_balancer, which is handling 100 cps using our different trunks.
>>> >>> So we
>>> >>> want to place calls according to trunks cps capacity. Is there any
>>> >>> other
>>> >>> module to handle this situation. your suggestion will be much
>>> >>> appreciable.
>>> >>> --
>>> >>> Rajib Deka
>>> >>> Software Engineer
>>> >>> Servion Global Solution
>>> >>> Chennai, India
>>> >>>
>>> >>> Mobile No: + 91 80157 09130
>>> >>
>>> >>
>>> >> --
>>> >> Bogdan-Andrei Iancu
>>> >> www.voice-system.ro
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Rajib Deka
>>> > Software Engineer
>>> > Servion Global Solution
>>> > Chennai, India
>>> >
>>> > Mobile No: + 91 80157 09130
>>> >
>>> > _______________________________________________
>>> > 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
>>
>>
>>
>> --
>> Rajib Deka
>> Software Engineer
>> Servion Global Solution
>> Chennai, India
>>
>> Mobile No: + 91 80157 09130
>>
>> _______________________________________________
>> 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
>


-- 
Rajib Deka
Software Engineer
Servion Global Solution
Chennai, India

Mobile No: + 91 80157 09130



More information about the Users mailing list