<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    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:<br>
    <br>
    <p class="MsoNormal"><span lang="EN-GB"><action
        application="limit" data="hash limit_by_profile ${</span><span
        lang="EN-GB">sofia_profile_name} 3/1
        !NORMAL_CIRCUIT_CONGESTION"/></span></p>
    <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>
    <pre class="moz-signature" cols="72">
</pre>
    <div class="moz-cite-prefix">On 2020-07-09 1:15 p.m., Igor
      Potjevlesh wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:002001d65614$7a8d8d00$6fa8a700$@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <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;}
/* 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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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]-->
      <div class="WordSection1">
        <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.<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">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.<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">Would it be possible to
            limit the flow on the destination IP (which is the sip-ip or
            ext-sip-ip in their profile)?<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">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).<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><action
            application="limit" data="hash ${sip_received_ip}
            ${sip_received_ip} 10/1 !NORMAL_CIRCUIT_CONGESTION"/><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">I'm not clear with what
            are possible realm and resources. <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">Thanks for your inputs!<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>
      </div>
      <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
        <br>
        <br>
        <hr style="border:none; color:#909090; background-color:#B0B0B0;
          height: 1px; width: 99%;">
        <table style="border-collapse:collapse;border:none;">
          <tbody>
            <tr>
              <td style="border:none;padding:0px 15px 0px 8px"> <a
                  href="https://www.avast.com/antivirus"
                  moz-do-not-send="true"> <img
                    src="http://static.avast.com/emails/avast-mail-stamp.png"
                    alt="Avast logo" moz-do-not-send="true" border="0">
                </a> </td>
              <td>
                <p style="color:#3d4d5a;
font-family:"Calibri","Verdana","Arial","Helvetica";
                  font-size:12pt;"> 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"
                    moz-do-not-send="true">www.avast.com</a> </p>
              </td>
            </tr>
          </tbody>
        </table>
        <br>
        <a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
          height="1" moz-do-not-send="true"> </a></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire <a class="moz-txt-link-freetext" href="https://signalwire.com">https://signalwire.com</a>
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 <a class="moz-txt-link-freetext" href="https://signalwire.community">https://signalwire.community</a>

Professional FreeSWITCH Services
<a class="moz-txt-link-abbreviated" href="mailto:sales@freeswitch.com">sales@freeswitch.com</a>
<a class="moz-txt-link-freetext" href="https://freeswitch.com">https://freeswitch.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="https://freeswitch.com/oss">https://freeswitch.com/oss</a>
<a class="moz-txt-link-freetext" href="https://freeswitch.org/confluence">https://freeswitch.org/confluence</a>
<a class="moz-txt-link-freetext" href="https://cluecon.com">https://cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="https://freeswitch.com">https://freeswitch.com</a></pre>
    </blockquote>
    <br>
  </body>
</html>