<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Victor,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-GB>Thank you for your input! That makes the thing so much clear now. Thank you.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>Igor.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:FR'>De :</span></b><span style='mso-fareast-language:FR'> FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> <b>De la part de</b> Victor Chukalovskiy<br><b>Envoyé :</b> jeudi 9 juillet 2020 19:32<br><b>À :</b> freeswitch-users@lists.freeswitch.org<br><b>Objet :</b> Re: [Freeswitch-users] Use of limit app<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>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:<span style='mso-fareast-language:FR'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB><action application="limit" data="hash limit_by_profile ${sofia_profile_name} 3/1 !NORMAL_CIRCUIT_CONGESTION"/></span><o:p></o:p></p><p class=MsoNormal><br>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)<br><br>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.<br><br><o:p></o:p></p><pre><o:p> </o:p></pre><div><p class=MsoNormal>On 2020-07-09 1:15 p.m., Igor Potjevlesh wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hello there!<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>I'm a bit confuse on how to properly use limit app to limit the call attempts per second.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>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.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>Would it be possible to limit the flow on the destination IP (which is the sip-ip or ext-sip-ip in their profile)?</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>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).</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB><action application="limit" data="hash ${sip_received_ip} ${sip_received_ip} 10/1 !NORMAL_CIRCUIT_CONGESTION"/></span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>I'm not clear with what are possible realm and resources. </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>Thanks for your inputs!</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>Regards,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-GB>Igor.</span><o:p></o:p></p><div id=DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2><p class=MsoNormal style='margin-bottom:12.0pt'><span style='mso-fareast-language:FR'><o:p> </o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span style='mso-fareast-language:FR'><hr size=1 width="99%" noshade style='color:#909090' align=center></span></div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'><tr><td style='padding:0cm 11.25pt 0cm 6.0pt'><p class=MsoNormal><a href="https://www.avast.com/antivirus"><span style='mso-fareast-language:FR;text-decoration:none'><img border=0 width=90 height=33 style='width:.9375in;height:.3437in' id="_x0000_i1026" src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo"></span></a><span style='mso-fareast-language:FR'><o:p></o:p></span></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p><span style='font-size:12.0pt;color:#3D4D5A'>L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. <br><a href="https://www.avast.com/antivirus">www.avast.com</a> <o:p></o:p></span></p></td></tr></table><p class=MsoNormal><span style='mso-fareast-language:FR'><br><br><o:p></o:p></span></p></div><p class=MsoNormal><span style='mso-fareast-language:FR'><br><br><o:p></o:p></span></p><pre>_________________________________________________________________________<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com">https://signalwire.com</a><o:p></o:p></pre><pre>Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<o:p></o:p></pre><pre>Build your next product on our scalable cloud platform.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Join our online community to chat in real time <a href="https://signalwire.community">https://signalwire.community</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Professional FreeSWITCH Services<o:p></o:p></pre><pre><a href="mailto:sales@freeswitch.com">sales@freeswitch.com</a><o:p></o:p></pre><pre><a href="https://freeswitch.com">https://freeswitch.com</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Official FreeSWITCH Sites<o:p></o:p></pre><pre><a href="https://freeswitch.com/oss">https://freeswitch.com/oss</a><o:p></o:p></pre><pre><a href="https://freeswitch.org/confluence">https://freeswitch.org/confluence</a><o:p></o:p></pre><pre><a href="https://cluecon.com">https://cluecon.com</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>FreeSWITCH-users mailing list<o:p></o:p></pre><pre><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><o:p></o:p></pre><pre><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><o:p></o:p></pre><pre>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><o:p></o:p></pre><pre><a href="https://freeswitch.com">https://freeswitch.com</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='mso-fareast-language:FR'><o:p> </o:p></span></p></div></body></html>