Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Ovidiu Sas
Yup, wrong link! The module evolved and the doc was not updated! The limit
is given as a parameter now!

-ovidiu

On Mon, Mar 2, 2020 at 13:39 David Villasmil 
wrote:

> But that’s Kamaililio. He’s talking about openSIPS, and I can’t see that
> same param in opensips 2.4
>
> On Mon, 2 Mar 2020 at 18:24, Ovidiu Sas  wrote:
>
>> Take a look at the pipe parameter:
>> https://kamailio.org/docs/modules/5.4.x/modules/ratelimit.html#idp49883756
>>
>> # define pipe 4 with a limit of 1 pending bytes in the rx_queue
>> # using NETWORK algorithm
>> modparam("ratelimit", "pipe", "4:NETWORK:1")
>>
>> Hope this helps!
>>
>> Regards,
>> Ovidiu Sas
>>
>> On Mon, Mar 2, 2020 at 12:53 PM Jeff Pyle  wrote:
>> >
>> > But how does it work for the NETWORK algorithm?  The docs specifically
>> mention a modparam, but even if that's not the case anymore, what unit is
>> the limit one might specify with rl_check()?
>> >
>> > More generally, how does one implement the NETWORK algorithm?
>> >
>> >
>> > - Jeff
>> >
>> >
>> > On Mon, Mar 2, 2020 at 12:19 PM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>> >>
>> >> Jeff,
>> >>
>> >> Yep, you’re totally right. The limit should be set when calling the
>> check, I.e:
>> >>
>> >> if (!rl_check("$rU", "50", "TAILDROP")) {
>> >> sl_send_reply("503", "Server Unavailable");
>> >> exit;
>> >> };
>> >>
>> >>
>> >>
>> >> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:
>> >>>
>> >>> This doesn't appear to have anything to do with a any type of limit
>> or the network algorithm.  In fact, it says, "...and only affects the
>> Taildrop and RED algorithms."  ?
>> >>>
>> >>>
>> >>> - Jeff
>> >>>
>> >>>
>> >>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>> 
>> 
>> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
>> 
>> 
>>  On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
>> >
>> > Hello,
>> >
>> > The ratelimit doc page (v2.4) section 1.3.4 says the following:
>> "If the returned amount exceeds the limit specified in the modparam,
>> rl_check returns an error."  The problem is I don't see a modparam to
>> define the limit.
>> >
>> >
>> >
>> > - Jeff
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>>  --
>>  Regards,
>> 
>>  David Villasmil
>>  email: david.villasmil.w...@gmail.com
>>  phone: +34669448337
>> 
>>  
>> >>>
>> >>> ___
>> >>> Users mailing list
>> >>> Users@lists.opensips.org
>> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> David Villasmil
>> >> email: david.villasmil.w...@gmail.com
>> >> phone: +34669448337
>> >> ___
>> >> Users mailing list
>> >> Users@lists.opensips.org
>> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> --
>> VoIP Embedded, Inc.
>> http://www.voipembedded.com
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
VoIP Embedded, Inc.
http://www.voipembedded.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Jeff Pyle
This contradicts the documentation, which specifically mentions a
modparam.  I'll give it a shot anyway and see how it does.


- Jeff

On Mon, Mar 2, 2020 at 1:46 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> There we go
>
> On Mon, 2 Mar 2020 at 18:43, Ben Newlin  wrote:
>
>> The limit is set when the pipe is created the first time you call
>> rl_check as mentioned earlier. OpenSIPS doesn’t use a modparam to create
>> the pipes; instead they are created the first time they are referenced.
>>
>>
>>
>> https://opensips.org/docs/modules/3.0.x/ratelimit.html#func_rl_check
>>
>>
>>
>> “Check the current request against the pipe identified by name and
>> changes/updates the limit. If no pipe is found, then a new one is created
>> with the specified limit and algorithm, if specified.”
>>
>>
>>
>> Ben Newlin
>>
>>
>>
>> *From: *Users  on behalf of David
>> Villasmil 
>> *Reply-To: *OpenSIPS users mailling list 
>> *Date: *Monday, March 2, 2020 at 1:40 PM
>> *To: *OpenSIPS users mailling list 
>> *Subject: *Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit
>>
>>
>>
>> But that’s Kamaililio. He’s talking about openSIPS, and I can’t see that
>> same param in opensips 2.4
>>
>>
>>
>> On Mon, 2 Mar 2020 at 18:24, Ovidiu Sas  wrote:
>>
>> Take a look at the pipe parameter:
>> https://kamailio.org/docs/modules/5.4.x/modules/ratelimit.html#idp49883756
>>
>> # define pipe 4 with a limit of 1 pending bytes in the rx_queue
>> # using NETWORK algorithm
>> modparam("ratelimit", "pipe", "4:NETWORK:1")
>>
>> Hope this helps!
>>
>> Regards,
>> Ovidiu Sas
>>
>> On Mon, Mar 2, 2020 at 12:53 PM Jeff Pyle  wrote:
>> >
>> > But how does it work for the NETWORK algorithm?  The docs specifically
>> mention a modparam, but even if that's not the case anymore, what unit is
>> the limit one might specify with rl_check()?
>> >
>> > More generally, how does one implement the NETWORK algorithm?
>> >
>> >
>> > - Jeff
>> >
>> >
>> > On Mon, Mar 2, 2020 at 12:19 PM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>> >>
>> >> Jeff,
>> >>
>> >> Yep, you’re totally right. The limit should be set when calling the
>> check, I.e:
>> >>
>> >> if (!rl_check("$rU", "50", "TAILDROP")) {
>> >> sl_send_reply("503", "Server Unavailable");
>> >> exit;
>> >> };
>> >>
>> >>
>> >>
>> >> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:
>> >>>
>> >>> This doesn't appear to have anything to do with a any type of limit
>> or the network algorithm.  In fact, it says, "...and only affects the
>> Taildrop and RED algorithms."  ?
>> >>>
>> >>>
>> >>> - Jeff
>> >>>
>> >>>
>> >>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>> 
>> 
>> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
>> 
>> 
>>  On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
>> >
>> > Hello,
>> >
>> > The ratelimit doc page (v2.4) section 1.3.4 says the following:
>> "If the returned amount exceeds the limit specified in the modparam,
>> rl_check returns an error."  The problem is I don't see a modparam to
>> define the limit.
>> >
>> >
>> >
>> > - Jeff
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>>  --
>>  Regards,
>> 
>>  David Villasmil
>>  email: david.villasmil.w...@gmail.com
>>  phone: +34669448337
>> 
>>  
>> >>>
>> >>> ___
>> >>> Users mailing list
>> >>> Users@lists.opensips.org
>> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> David Villasmil
>> >> email: david.villasmil.w...@gmail.com
>> >> phone: +34669448337
>> >> ___
>> >> Users mailing list
>> >> Users@lists.opensips.org
>> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> --
>> VoIP Embedded, Inc.
>> http://www.voipembedded.com
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> --
>>
>> Regards,
>>
>>
>>
>> David Villasmil
>>
>> email: david.villasmil.w...@gmail.com
>>
>> phone: +34669448337
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
___
Users mailing list
Users@lists.opensips.org

Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread David Villasmil
There we go

On Mon, 2 Mar 2020 at 18:43, Ben Newlin  wrote:

> The limit is set when the pipe is created the first time you call rl_check
> as mentioned earlier. OpenSIPS doesn’t use a modparam to create the pipes;
> instead they are created the first time they are referenced.
>
>
>
> https://opensips.org/docs/modules/3.0.x/ratelimit.html#func_rl_check
>
>
>
> “Check the current request against the pipe identified by name and
> changes/updates the limit. If no pipe is found, then a new one is created
> with the specified limit and algorithm, if specified.”
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of David
> Villasmil 
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Monday, March 2, 2020 at 1:40 PM
> *To: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit
>
>
>
> But that’s Kamaililio. He’s talking about openSIPS, and I can’t see that
> same param in opensips 2.4
>
>
>
> On Mon, 2 Mar 2020 at 18:24, Ovidiu Sas  wrote:
>
> Take a look at the pipe parameter:
> https://kamailio.org/docs/modules/5.4.x/modules/ratelimit.html#idp49883756
>
> # define pipe 4 with a limit of 1 pending bytes in the rx_queue
> # using NETWORK algorithm
> modparam("ratelimit", "pipe", "4:NETWORK:1")
>
> Hope this helps!
>
> Regards,
> Ovidiu Sas
>
> On Mon, Mar 2, 2020 at 12:53 PM Jeff Pyle  wrote:
> >
> > But how does it work for the NETWORK algorithm?  The docs specifically
> mention a modparam, but even if that's not the case anymore, what unit is
> the limit one might specify with rl_check()?
> >
> > More generally, how does one implement the NETWORK algorithm?
> >
> >
> > - Jeff
> >
> >
> > On Mon, Mar 2, 2020 at 12:19 PM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
> >>
> >> Jeff,
> >>
> >> Yep, you’re totally right. The limit should be set when calling the
> check, I.e:
> >>
> >> if (!rl_check("$rU", "50", "TAILDROP")) {
> >> sl_send_reply("503", "Server Unavailable");
> >> exit;
> >> };
> >>
> >>
> >>
> >> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:
> >>>
> >>> This doesn't appear to have anything to do with a any type of limit or
> the network algorithm.  In fact, it says, "...and only affects the Taildrop
> and RED algorithms."  ?
> >>>
> >>>
> >>> - Jeff
> >>>
> >>>
> >>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
> 
> 
> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
> 
> 
>  On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
> >
> > Hello,
> >
> > The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If
> the returned amount exceeds the limit specified in the modparam, rl_check
> returns an error."  The problem is I don't see a modparam to define the
> limit.
> >
> >
> >
> > - Jeff
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
>  --
>  Regards,
> 
>  David Villasmil
>  email: david.villasmil.w...@gmail.com
>  phone: +34669448337
> 
>  
> >>>
> >>> ___
> >>> Users mailing list
> >>> Users@lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>
> >> --
> >> Regards,
> >>
> >> David Villasmil
> >> email: david.villasmil.w...@gmail.com
> >> phone: +34669448337
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> VoIP Embedded, Inc.
> http://www.voipembedded.com
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> --
>
> Regards,
>
>
>
> David Villasmil
>
> email: david.villasmil.w...@gmail.com
>
> phone: +34669448337
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Ben Newlin
The limit is set when the pipe is created the first time you call rl_check as 
mentioned earlier. OpenSIPS doesn’t use a modparam to create the pipes; instead 
they are created the first time they are referenced.

https://opensips.org/docs/modules/3.0.x/ratelimit.html#func_rl_check

“Check the current request against the pipe identified by name and 
changes/updates the limit. If no pipe is found, then a new one is created with 
the specified limit and algorithm, if specified.”

Ben Newlin

From: Users  on behalf of David Villasmil 

Reply-To: OpenSIPS users mailling list 
Date: Monday, March 2, 2020 at 1:40 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

But that’s Kamaililio. He’s talking about openSIPS, and I can’t see that same 
param in opensips 2.4

On Mon, 2 Mar 2020 at 18:24, Ovidiu Sas 
mailto:o...@voipembedded.com>> wrote:
Take a look at the pipe parameter:
https://kamailio.org/docs/modules/5.4.x/modules/ratelimit.html#idp49883756

# define pipe 4 with a limit of 1 pending bytes in the rx_queue
# using NETWORK algorithm
modparam("ratelimit", "pipe", "4:NETWORK:1")

Hope this helps!

Regards,
Ovidiu Sas

On Mon, Mar 2, 2020 at 12:53 PM Jeff Pyle mailto:j...@ugnd.org>> 
wrote:
>
> But how does it work for the NETWORK algorithm?  The docs specifically 
> mention a modparam, but even if that's not the case anymore, what unit is the 
> limit one might specify with rl_check()?
>
> More generally, how does one implement the NETWORK algorithm?
>
>
> - Jeff
>
>
> On Mon, Mar 2, 2020 at 12:19 PM David Villasmil 
> mailto:david.villasmil.w...@gmail.com>> wrote:
>>
>> Jeff,
>>
>> Yep, you’re totally right. The limit should be set when calling the check, 
>> I.e:
>>
>> if (!rl_check("$rU", "50", "TAILDROP")) {
>> sl_send_reply("503", "Server Unavailable");
>> exit;
>> };
>>
>>
>>
>> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle mailto:j...@ugnd.org>> 
>> wrote:
>>>
>>> This doesn't appear to have anything to do with a any type of limit or the 
>>> network algorithm.  In fact, it says, "...and only affects the Taildrop and 
>>> RED algorithms."  ?
>>>
>>>
>>> - Jeff
>>>
>>>
>>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil 
>>> mailto:david.villasmil.w...@gmail.com>> 
>>> wrote:

 https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval


 On Mon, 2 Mar 2020 at 15:54, Jeff Pyle 
 mailto:j...@ugnd.org>> wrote:
>
> Hello,
>
> The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If the 
> returned amount exceeds the limit specified in the modparam, rl_check 
> returns an error."  The problem is I don't see a modparam to define the 
> limit.
>
>
>
> - Jeff
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 --
 Regards,

 David Villasmil
 email: 
 david.villasmil.w...@gmail.com
 phone: +34669448337

 
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> --
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
VoIP Embedded, Inc.
http://www.voipembedded.com

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread David Villasmil
But that’s Kamaililio. He’s talking about openSIPS, and I can’t see that
same param in opensips 2.4

On Mon, 2 Mar 2020 at 18:24, Ovidiu Sas  wrote:

> Take a look at the pipe parameter:
> https://kamailio.org/docs/modules/5.4.x/modules/ratelimit.html#idp49883756
>
> # define pipe 4 with a limit of 1 pending bytes in the rx_queue
> # using NETWORK algorithm
> modparam("ratelimit", "pipe", "4:NETWORK:1")
>
> Hope this helps!
>
> Regards,
> Ovidiu Sas
>
> On Mon, Mar 2, 2020 at 12:53 PM Jeff Pyle  wrote:
> >
> > But how does it work for the NETWORK algorithm?  The docs specifically
> mention a modparam, but even if that's not the case anymore, what unit is
> the limit one might specify with rl_check()?
> >
> > More generally, how does one implement the NETWORK algorithm?
> >
> >
> > - Jeff
> >
> >
> > On Mon, Mar 2, 2020 at 12:19 PM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
> >>
> >> Jeff,
> >>
> >> Yep, you’re totally right. The limit should be set when calling the
> check, I.e:
> >>
> >> if (!rl_check("$rU", "50", "TAILDROP")) {
> >> sl_send_reply("503", "Server Unavailable");
> >> exit;
> >> };
> >>
> >>
> >>
> >> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:
> >>>
> >>> This doesn't appear to have anything to do with a any type of limit or
> the network algorithm.  In fact, it says, "...and only affects the Taildrop
> and RED algorithms."  ?
> >>>
> >>>
> >>> - Jeff
> >>>
> >>>
> >>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
> 
> 
> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
> 
> 
>  On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
> >
> > Hello,
> >
> > The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If
> the returned amount exceeds the limit specified in the modparam, rl_check
> returns an error."  The problem is I don't see a modparam to define the
> limit.
> >
> >
> >
> > - Jeff
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
>  --
>  Regards,
> 
>  David Villasmil
>  email: david.villasmil.w...@gmail.com
>  phone: +34669448337
> 
>  
> >>>
> >>> ___
> >>> Users mailing list
> >>> Users@lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>
> >> --
> >> Regards,
> >>
> >> David Villasmil
> >> email: david.villasmil.w...@gmail.com
> >> phone: +34669448337
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> VoIP Embedded, Inc.
> http://www.voipembedded.com
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Ovidiu Sas
Take a look at the pipe parameter:
https://kamailio.org/docs/modules/5.4.x/modules/ratelimit.html#idp49883756

# define pipe 4 with a limit of 1 pending bytes in the rx_queue
# using NETWORK algorithm
modparam("ratelimit", "pipe", "4:NETWORK:1")

Hope this helps!

Regards,
Ovidiu Sas

On Mon, Mar 2, 2020 at 12:53 PM Jeff Pyle  wrote:
>
> But how does it work for the NETWORK algorithm?  The docs specifically 
> mention a modparam, but even if that's not the case anymore, what unit is the 
> limit one might specify with rl_check()?
>
> More generally, how does one implement the NETWORK algorithm?
>
>
> - Jeff
>
>
> On Mon, Mar 2, 2020 at 12:19 PM David Villasmil 
>  wrote:
>>
>> Jeff,
>>
>> Yep, you’re totally right. The limit should be set when calling the check, 
>> I.e:
>>
>> if (!rl_check("$rU", "50", "TAILDROP")) {
>> sl_send_reply("503", "Server Unavailable");
>> exit;
>> };
>>
>>
>>
>> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:
>>>
>>> This doesn't appear to have anything to do with a any type of limit or the 
>>> network algorithm.  In fact, it says, "...and only affects the Taildrop and 
>>> RED algorithms."  ?
>>>
>>>
>>> - Jeff
>>>
>>>
>>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil 
>>>  wrote:

 https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval


 On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
>
> Hello,
>
> The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If the 
> returned amount exceeds the limit specified in the modparam, rl_check 
> returns an error."  The problem is I don't see a modparam to define the 
> limit.
>
>
>
> - Jeff
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 --
 Regards,

 David Villasmil
 email: david.villasmil.w...@gmail.com
 phone: +34669448337

 
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> --
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Jeff Pyle
But how does it work for the NETWORK algorithm?  The docs specifically
mention a modparam, but even if that's not the case anymore, what unit is
the limit one might specify with rl_check()?

More generally, how does one implement the NETWORK algorithm?


- Jeff


On Mon, Mar 2, 2020 at 12:19 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Jeff,
>
> Yep, you’re totally right. The limit should be set when calling the check,
> I.e:
>
> if (!rl_check("$rU", "50", "TAILDROP")) {
>   sl_send_reply("503", "Server Unavailable");
>   exit;
>   };
>
>
>
> On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:
>
>> This doesn't appear to have anything to do with a any type of limit or
>> the network algorithm.  In fact, it says, "...and only affects the Taildrop
>> and RED algorithms."  ?
>>
>>
>> - Jeff
>>
>>
>> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>>
>>> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
>>>
>>>
>>> On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
>>>
 Hello,

 The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If
 the returned amount exceeds the limit specified in the modparam, rl_check
 returns an error."  The problem is I don't see a modparam to define the
 limit.



 - Jeff

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

>>> --
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.w...@gmail.com
>>> phone: +34669448337
>>>
>> 
>>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread David Villasmil
Jeff,

Yep, you’re totally right. The limit should be set when calling the check,
I.e:

if (!rl_check("$rU", "50", "TAILDROP")) {
sl_send_reply("503", "Server Unavailable");
exit;
};



On Mon, 2 Mar 2020 at 16:19, Jeff Pyle  wrote:

> This doesn't appear to have anything to do with a any type of limit or the
> network algorithm.  In fact, it says, "...and only affects the Taildrop and
> RED algorithms."  ?
>
>
> - Jeff
>
>
> On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>>
>> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
>>
>>
>> On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
>>
>>> Hello,
>>>
>>> The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If the
>>> returned amount exceeds the limit specified in the modparam, rl_check
>>> returns an error."  The problem is I don't see a modparam to define the
>>> limit.
>>>
>>>
>>>
>>> - Jeff
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> --
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>>
> 
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Jeff Pyle
This doesn't appear to have anything to do with a any type of limit or the
network algorithm.  In fact, it says, "...and only affects the Taildrop and
RED algorithms."  ?


- Jeff


On Mon, Mar 2, 2020 at 11:05 AM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

>
> https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval
>
>
> On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:
>
>> Hello,
>>
>> The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If the
>> returned amount exceeds the limit specified in the modparam, rl_check
>> returns an error."  The problem is I don't see a modparam to define the
>> limit.
>>
>>
>>
>> - Jeff
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> 
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread David Villasmil
https://opensips.org/html/docs/modules/2.4.x/ratelimit.html#param_limit_per_interval


On Mon, 2 Mar 2020 at 15:54, Jeff Pyle  wrote:

> Hello,
>
> The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If the
> returned amount exceeds the limit specified in the modparam, rl_check
> returns an error."  The problem is I don't see a modparam to define the
> limit.
>
>
>
> - Jeff
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ratelimit network algorithm traffic limit

2020-03-02 Thread Jeff Pyle
Hello,

The ratelimit doc page (v2.4) section 1.3.4 says the following:  "If the
returned amount exceeds the limit specified in the modparam, rl_check
returns an error."  The problem is I don't see a modparam to define the
limit.



- Jeff
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Saving CDR to a database via unixodbc

2020-03-02 Thread Saint Michael
I am new to Opensips. So my far my app works but I need to save the CDR to
any ODBC database, and I cannot find an example anywhere on the Internet.
Can somebody point me to some code? I loaded the module db_unixodbc but
don't know how to go from there.

Philip
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Dispatcher Status Problem while OpenSIPS is in Dialog Replication and HA with Virtual IP.

2020-03-02 Thread Dipteshkumar Patel
Hello Guys,

I am using OpenSIPS HA(High Availability) with Virtual IPs in Active-Active
mode with dialog replication so I can manage(recover) dialogs and CDRs
whenever server failover.

I am also using Virtual IP as a socket in dispatcher module. When the
Virtual IP is bind with the 1st Server then the second one can't bind the
socket so the secondary server gives the same errors and mark the probing
for all the destinations which is also update in mysql database. As we are
using database replication so all the destinations are looking(database) as
in probing due to this.

Can anyone suggest how can i eliminate this issue?

Thanks & Regards
*Diptesh Patel*
Software Developer
Ecosmob Technologies Ltd,
Ahmedabad
Mo:*+919898962659*

-- 
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely those of 
the originator and do not necessarily represent those of the Company or its 
sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.



*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister concerns shall not be liable for 
any damage that may incur to you as a result of viruses, incompleteness of 
this message, a delay in receipt of this message or any other computer 
problems. 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about qrouting module

2020-03-02 Thread Liviu Chircu

On 02.03.2020 10:05, Abdoul Osséni wrote:
If I understand well, with dynamic-weights algorithm, for example if I 
set:

- warn_threshold_asr = 40
- warn_penalty_asr = 1

So, if the gateway defined on each rule has an ASR < 40, so the 
gateway will have a penality = 1.


Hey, Abdoul!

Thank you for the feedback.  Let me add a new section in the 
documentation which

explains the threshold limits and penalties, as they are not at all obvious.

In short:

ASR, CCR: floating point numbers in [0 - 1] interval (percentages)
PDD, AST: amount of time in milliseconds
ACD: amount of time in seconds

The penalty is a traffic reduction factor, in the [0 - 1] interval.  For 
example,
if I set a 0.5 "ASR warning" penalty, that gateway will receive 50% less 
traffic
if the ASR goes below the "warning" limit.  All penalties are multiplied 
so if, for
example, both ASR and PDD are below "warning" limit, it will receive 
only 25% traffic.


Expect the new doc section this week and thank you for the help! :)

Regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020
  www.opensips.org/events
OpenSIPS Bootcamp, Miami, March 2020
  www.opensips.org/training


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about qrouting module

2020-03-02 Thread Abdoul Osséni
Hello Liviu,

Thank you for your mail.

If I understand well, with dynamic-weights algorithm, for example if I set:
- warn_threshold_asr = 40
- warn_penalty_asr = 1

So, if the gateway defined on each rule has an ASR < 40, so the gateway
will have a penality = 1.

and when I call do_routing() function, qrouting choose the gw that has the
lowest score.

am I right?

Regards

Abdoul.
https://www.africallshop.com/


Le jeu. 27 févr. 2020 à 16:45, Liviu Chircu  a écrit :

> On 27.02.2020 17:26, Abdoul Osséni wrote:
>
> I want to test qrouting module.
> Do you have some qrouting configs examples?
> Regards
>
> Hey, Abdoul!
>
> It's quite an "out-of-the-box" solution, you'd be surprised.  Here are
> some provisioning tips:
>
> * provision any qrouting profiles you want to play with in the
> "qr_profiles" table [1]
> * in dr_rules, make sure to set the "sort_alg" column to 'Q' in order to
> enable qrouting for each rule
> * in dr_rules, for each 'Q'-enabled rule, set the "sort_profile" to your
> desired profile "id" taken from the "qr_profiles" table
>
> From here on, it's just a matter of loading up the modules and setting up
> the "db_url" modparams.  The modules will complain if something is missing
> and tell you what to load anyway! :)
>
> Regarding the script: nothing changes.  Just call do_routing() [2] as
> usual, and it will both collect stats and sort the destinations based on
> quality.  If you want to integrate with custom stats, check out the module
> docs [3], there is plenty of help.  Below is the module configuration --
> everything else is just drouting!
>
> Best regards,
>
> [1]:
> https://github.com/OpenSIPS/opensips/blob/master/scripts/mysql/qrouting-create.sql
>
> [2]: https://opensips.org/docs/modules/3.1.x/drouting.html#func_do_routing
>
> [3]: https://opensips.org/docs/modules/3.1.x/qrouting.html
>
> --- qrouting.cfg
>
> loadmodule "db_mysql.so"
>
> loadmodule "drouting.so"
> modparam("drouting", "use_partitions", 1)
> modparam("drouting", "rule_id_avp", "$avp(ruleid)")
> modparam("drouting", "gw_id_avp", "$avp(gwid)")
> modparam("drouting", "db_partitions_url",
> "mysql://root:xx@10.0.0.10/opensips"
> )
>
> loadmodule "qrouting.so"
> modparam("qrouting", "algorithm", "dynamic-weights")
> modparam("qrouting", "history_span", 30)
> modparam("qrouting", "extra_stats", "+mos/1; +r_factor/1")
>
> # for fast testing
> modparam("qrouting", "min_samples_asr", 0)
> modparam("qrouting", "min_samples_ccr", 0)
> modparam("qrouting", "min_samples_pdd", 0)
> modparam("qrouting", "min_samples_ast", 0)
> modparam("qrouting", "min_samples_acd", 0)
> modparam("qrouting", "decimal_digits", 3)
>
> modparam("qrouting", "db_url",
> "mysql://root:xx@10.0.0.10/opensips"
> )
>
> --
> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>   www.opensips.org/events
> OpenSIPS Bootcamp, Miami, March 2020
>   www.opensips.org/training
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users