I have a customer who has just started operating a dialer. Over the past couple of days this dialer has been creating some minor issues with our US48 termination. We are currently running Server:: Kamailio (1.5.1-notls (x86_64/linux)).
I would like to limit on a subscriber by subscriber basis the amount of outgoing calls per second that they can do. I am reading through the ratelimit module documentation, but haven't been able to determine if I can use it to limit one particular subscriber outgoing activity. I have also looked at the pike module, and think that I may be able to use it in order to limit calls per second by IP. Does anyone have any recommendations, suggestions, or examples that can be used to control the calls per second based on the kamailio subscriber name.
Stagg Shelton VocalCloud
The ratelimit module will do the job here. It was designed for something like that. You will need to define a pipe with the desired cps and then run all the incoming INVITEs from that specific subscriber through your pipe: http://kamailio.org/docs/modules/1.5.x/ratelimit.html#id2467664
Regards, Ovidiu Sas
On Thu, Jun 24, 2010 at 9:42 AM, Stagg Shelton stagg@vocalcloud.com wrote:
I have a customer who has just started operating a dialer. Over the past couple of days this dialer has been creating some minor issues with our US48 termination. We are currently running Server:: Kamailio (1.5.1-notls (x86_64/linux)).
I would like to limit on a subscriber by subscriber basis the amount of outgoing calls per second that they can do. I am reading through the ratelimit module documentation, but haven't been able to determine if I can use it to limit one particular subscriber outgoing activity. I have also looked at the pike module, and think that I may be able to use it in order to limit calls per second by IP. Does anyone have any recommendations, suggestions, or examples that can be used to control the calls per second based on the kamailio subscriber name.
Stagg Shelton VocalCloud
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Does the call to rl_check_pipe add the invite to the pipe, and update the counters before returning. Also would I need to define multiple pipes for multiple subscribers who I wish to rate limit? ie. The cps from subscriber A does not affect the cps from subscriber B
Stagg Shelton VocalCloud
On 6/24/10 9:52 AM, Ovidiu Sas wrote:
The ratelimit module will do the job here. It was designed for something like that. You will need to define a pipe with the desired cps and then run all the incoming INVITEs from that specific subscriber through your pipe: http://kamailio.org/docs/modules/1.5.x/ratelimit.html#id2467664
Regards, Ovidiu Sas
On Thu, Jun 24, 2010 at 9:42 AM, Stagg Sheltonstagg@vocalcloud.com wrote:
I have a customer who has just started operating a dialer. Over the past couple of days this dialer has been creating some minor issues with our US48 termination. We are currently running Server:: Kamailio (1.5.1-notls (x86_64/linux)).
I would like to limit on a subscriber by subscriber basis the amount of outgoing calls per second that they can do. I am reading through the ratelimit module documentation, but haven't been able to determine if I can use it to limit one particular subscriber outgoing activity. I have also looked at the pike module, and think that I may be able to use it in order to limit calls per second by IP. Does anyone have any recommendations, suggestions, or examples that can be used to control the calls per second based on the kamailio subscriber name.
Stagg Shelton VocalCloud
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Define a pipe for each subscriber that you want to limit. Each pipe will have it's one settings. Keep in mind that there is a limitation (only 16 pipes): http://kamailio.org/docs/modules/1.5.x/ratelimit.html#id2506247
If you want more then 16 pipes, you will need to modify the code and recompile. In upcoming 3.1 there will be a pipelimit module that will get rid of the above limitation.
Regards, Ovidiu Sas
On Thu, Jun 24, 2010 at 10:26 AM, Stagg Shelton stagg@vocalcloud.com wrote:
Does the call to rl_check_pipe add the invite to the pipe, and update the counters before returning. Also would I need to define multiple pipes for multiple subscribers who I wish to rate limit? ie. The cps from subscriber A does not affect the cps from subscriber B
Stagg Shelton VocalCloud
On 6/24/10 9:52 AM, Ovidiu Sas wrote:
The ratelimit module will do the job here. It was designed for something like that. You will need to define a pipe with the desired cps and then run all the incoming INVITEs from that specific subscriber through your pipe: http://kamailio.org/docs/modules/1.5.x/ratelimit.html#id2467664
Regards, Ovidiu Sas
On Thu, Jun 24, 2010 at 9:42 AM, Stagg Sheltonstagg@vocalcloud.com wrote:
I have a customer who has just started operating a dialer. Over the past couple of days this dialer has been creating some minor issues with our US48 termination. We are currently running Server:: Kamailio (1.5.1-notls (x86_64/linux)).
I would like to limit on a subscriber by subscriber basis the amount of outgoing calls per second that they can do. I am reading through the ratelimit module documentation, but haven't been able to determine if I can use it to limit one particular subscriber outgoing activity. I have also looked at the pike module, and think that I may be able to use it in order to limit calls per second by IP. Does anyone have any recommendations, suggestions, or examples that can be used to control the calls per second based on the kamailio subscriber name.
Stagg Shelton VocalCloud
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Thursday 24 June 2010, Stagg Shelton wrote:
I would like to limit on a subscriber by subscriber basis the amount of outgoing calls per second that they can do. I am reading through the ratelimit module documentation, but haven't been able to determine if I can use it to limit one particular subscriber outgoing activity. I have also looked at the pike module, and think that I may be able to use it in order to limit calls per second by IP. Does anyone have any recommendations, suggestions, or examples that can be used to control the calls per second based on the kamailio subscriber name.
Hi Stagg,
another idea to throttle specific/ all customers to a certain load would be to use the dialog profiles functionality. This would allows you to limit concurrent dialogs, albeit its more heavywight (on CPU and RAM terms) then the mentioned modules.
An example (taken from an old mail), limit to two concurrent calls per user:
modparam("dialog","profiles_with_value","caller") .... /* do some checking */ get_dialog_size("caller","$fu","$avp(cnt)"); if ( $avp(cnt) > 2 ) { sl_send_reply("403","Not allowed"); exit; } set_dlg_profile("caller","$fu"); /* route the call */
Cheers,
Henning
With dialers, it's the cps that is causing issues (the calls are very short). Actually, both cps and channel limitation can be implemented simultaneously (via ratelimit and dialog module). The burden on the server is not high even at high cps (>150cps) with channel limitation in place (i.e. dialog profiling enabled).
Regards, Ovidiu Sas
On Thu, Jun 24, 2010 at 10:36 AM, Henning Westerholt henning.westerholt@1und1.de wrote:
On Thursday 24 June 2010, Stagg Shelton wrote:
I would like to limit on a subscriber by subscriber basis the amount of outgoing calls per second that they can do. I am reading through the ratelimit module documentation, but haven't been able to determine if I can use it to limit one particular subscriber outgoing activity. I have also looked at the pike module, and think that I may be able to use it in order to limit calls per second by IP. Does anyone have any recommendations, suggestions, or examples that can be used to control the calls per second based on the kamailio subscriber name.
Hi Stagg,
another idea to throttle specific/ all customers to a certain load would be to use the dialog profiles functionality. This would allows you to limit concurrent dialogs, albeit its more heavywight (on CPU and RAM terms) then the mentioned modules.
An example (taken from an old mail), limit to two concurrent calls per user:
modparam("dialog","profiles_with_value","caller") .... /* do some checking */ get_dialog_size("caller","$fu","$avp(cnt)"); if ( $avp(cnt) > 2 ) { sl_send_reply("403","Not allowed"); exit; } set_dlg_profile("caller","$fu"); /* route the call */
Cheers,
Henning
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Thursday 24 June 2010, Ovidiu Sas wrote:
With dialers, it's the cps that is causing issues (the calls are very short). Actually, both cps and channel limitation can be implemented simultaneously (via ratelimit and dialog module). The burden on the server is not high even at high cps (>150cps) with channel limitation in place (i.e. dialog profiling enabled).
Hi Ovidiu,
you're right. I had in my mind more fraud traffic patterns, where you too have many short calls, but they're setup also concurrently.
Cheers,
Henning