[Freeswitch-users] Use of limit app

Victor Chukalovskiy victor.chukalovskiy at gmail.com
Thu Jul 9 17:31:39 UTC 2020


Hey, you can do it based on any channel variable you want. If you want 
to do it by external SIP profile you can do something like this:

<action application="limit" data="hash limit_by_profile 
${sofia_profile_name} 3/1 !NORMAL_CIRCUIT_CONGESTION"/>


If you want to get more granular you can do anything you want based on 
any other channel variable. Just do an "info" dump of all channel 
variables on your box and pick the channel variable that makes most 
sense. Or you can first set some new variables based on your dialplan 
logic and then run limit app on that new variable (e.g. some kind of 
account code etc)

Conceptually you can think of it as a huge SQL tables with call 
variables being columns and calls being rows. And you are doing "GROUP 
BY" statement based on whatever column you like. Hope this analogy makes 
some sense.

On 2020-07-09 1:15 p.m., Igor Potjevlesh wrote:
>
> Hello there!
>
> I'm a bit confuse on how to properly use limit app to limit the call 
> attempts per second.
>
> I have a customer with 3 IP addresses trusted and declared into an 
> external SIP profile. All these 3 IPs are sending their calls to 1 IP 
> on the Freeswitch.
>
> Would it be possible to limit the flow on the destination IP (which is 
> the sip-ip or ext-sip-ip in their profile)?
>
> The first thing I found and which seems to work, is doing that based 
> on their IP, but it's divided by 3 (because they have 3 IP).
>
> <action application="limit" data="hash ${sip_received_ip} 
> ${sip_received_ip} 10/1 !NORMAL_CIRCUIT_CONGESTION"/>
>
> I'm not clear with what are possible realm and resources.
>
> Thanks for your inputs!
>
> Regards,
>
> Igor.
>
>
>
> ------------------------------------------------------------------------
> Avast logo <https://www.avast.com/antivirus> 	
>
> L'absence de virus dans ce courrier électronique a été vérifiée par le 
> logiciel antivirus Avast.
> www.avast.com <https://www.avast.com/antivirus>
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200709/8cf09f98/attachment-0001.html>


More information about the FreeSWITCH-users mailing list