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. -- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi Victor, Thank you for your input! That makes the thing so much clear now. Thank you. Regards, Igor. De : FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> De la part de Victor Chukalovskiy Envoyé : jeudi 9 juillet 2020 19:32 À : freeswitch-users@lists.freeswitch.org Objet : Re: [Freeswitch-users] Use of limit app 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. _____ <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> _________________________________________________________________________ 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@freeswitch.com <mailto:sales@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@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com -- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus
participants (2)
-
Igor Potjevlesh
-
Victor Chukalovskiy