Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-18 Thread Cibin Paul
Hi, Thank you for all your suggestions. I tried the code in route[RELAY] and is working as expected. Need to do couple of tests and will move to production. Regards Cibin > On 18-Dec-2016, at 12:14 PM, Aqs Younas wrote: > > in this case you have to manually take care of in dialog reques

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-17 Thread Aqs Younas
in this case you have to manually take care of in dialog requests and when the call terminate so you can unset the variable. Dailog with profiling is the better way to go. On Sun, 18 Dec 2016 at 5:27 AM David Villasmil < david.villasmil.w...@gmail.com> wrote: > Just thinking out loud, if you use m

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-17 Thread David Villasmil
Just thinking out loud, if you use memcached maybe simply storing a variable with the username and checking whether it is set before allowing a call from that user. That would work. David ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mai

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread Cibin Paul
Hi, I defined the following two parameters and the error was gone. Still fighting to make the logic work modparam("dialog", "dlg_flag", 4) modparam("dialog", "profiles_with_value", "caller ; callee") Thanks & Regards Cibin > On 17-Dec-2016, at 10:57 AM, Cibin Paul wrote: > > Hi, > > I tr

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread Cibin Paul
Hi, I tried using dialog module and was throwing the following error. dialog module was loaded after tm and rr modules. Kamailio 4.1.7 ERROR: dialog [dialog.c:524]: mod_init(): no dlg flag set!! ERROR: [sr_module.c:970]: init_mod(): init_mod(): Error while initializing module dialog (/usr/lo

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread Cibin Paul
Thanks Alex, I will try your suggestion and update here. Regards Cibin On 16-Dec-2016, at 8:38 PM, Alex Balashov wrote: > > The dialog module (dialog, not dialog_ng) would be a cleaner and more > natural solution, since it handles most possible eventualities of dialog > state transition for

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread Alex Balashov
The dialog module (dialog, not dialog_ng) would be a cleaner and more natural solution, since it handles most possible eventualities of dialog state transition for you more cleanly than if you keep state yourself via htable. -- Alex -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-70

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread Cibin Paul
Hi, Thanks David, I was trying an alternate way as Mr. Daniel presented in ClueCon. Pasting below the snippet from my configuration. Somehow the code is not working. kacmd htable.dump acalls returning empty results. What might be wrong? modparam("htable", "htable", "acalls=>size=8;autoexpire=

Re: [SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread David Villasmil
you can achieve that with the dialog module. http://www.kamailio.org/docs/modules/4.4.x/modules/dialog_ng.html Regards, David Villasmil email: david.villasmil.w...@gmail.com phone: +34669448337 On Fri, Dec 16, 2016 at 10:33 AM, Cibin Paul wrote: > Hi, > > Is there a way to limit the number of

[SR-Users] Limiting calls based on CLI and dst number

2016-12-16 Thread Cibin Paul
Hi, Is there a way to limit the number of active calls per cli or dst number basis? Yesterday my system had a ddos attack in which 123456 (CLI) was hitting 2345 (DID) at a rate of 100-200 calls per minute. I would like to restrict to 2-4 simultaneous calls per CLI/DST. Any help would be apprec