<div dir="ltr">Ah!<div><br></div><div>You&#39;re using the same hash value for each user.</div><div>it&#39;s $backend $realm $resource.</div><div>So if you want each user to <i>different</i> limits, you need to name their realm/resource differently.</div>

<div><br></div><div>E.g. I use &lt;action application=&quot;limit&quot; data=&quot;hash outbound 1000 2&quot;/&gt; which limits outbound <i>for user 1000</i> to only 2 calls.</div><div><br></div><div>So do something like: <span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px">&lt;action application=&quot;limit&quot; data=&quot;hash fraud_protection calls_max_intl_1000 1 !NORMAL_TEMPORARY_FAILURE&quot; /&gt;</span></div>

<div><br></div><div>ALSO:</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px;background-color:rgb(255,255,255)">This is a BAD idea! &lt;condition field=&quot;caller_id_number&quot; expression=&quot;1000$&quot; /&gt;</span></div>

<div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px;background-color:rgb(255,255,255)">1) it matches any number that ends in 1000 -- you meant to do ^1000$</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px;background-color:rgb(255,255,255)">2) Anybody can set the caller ID number to anything they want (unless your system is completely firewalled and they can&#39;t access it, except internally and you TRUST everyone...) and then get access to this route.</span></div>

<div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px;background-color:rgb(255,255,255)">The suggestion is to create users and set passwords or ACL for them, and then set a variable accountcode. That variable is added internally so is as safe as the credentials. Use ${accountcode} for your match then.</span></div>

<div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px;background-color:rgb(255,255,255)">See: </span><a href="http://wiki.freeswitch.org/wiki/XML_User_Directory_Guide">http://wiki.freeswitch.org/wiki/XML_User_Directory_Guide</a> -- I&#39;ll update it a bit...<span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.571428298950195px"> </span></div>

<div><br></div><div><span style="font-family:Verdana,Arial,Helvetica,sans-serif">-Avi Marcus</span><br><div><div dir="ltr">BestFone</div></div><br><div class="gmail_quote">On Fri, Mar 29, 2013 at 9:30 AM, Tomasz Szuster <span dir="ltr">&lt;<a href="mailto:tomasz.szuster@gmail.com" target="_blank">tomasz.szuster@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>&lt;extension name=&quot;test1&quot; &gt;</div><div>   &lt;condition field=&quot;caller_id_number&quot; expression=&quot;1000$&quot; /&gt;</div>

<div>   &lt;condition field=&quot;destination_number&quot; expression=&quot;^(61\d{7})$&quot; &gt;</div>

<div>       &lt;action application=&quot;limit&quot; data=&quot;hash fraud_protection calls_max_intl 3 !NORMAL_TEMPORARY_FAILURE&quot; /&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}&quot; /&gt;</div>



<div>       &lt;action application=&quot;set&quot; data=&quot;media_bug_answer_req=true&quot; /&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;recording_follow_transfer=true&quot; /&gt;</div><div>


       &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot; /&gt;</div>
<div>       &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot; /&gt;</div><div>       &lt;action application=&quot;bridge&quot; data=&quot;{codec_string=&#39;PCMA&#39;}sofia/gateway/${distributor(distributor1)}/$1&quot; loop=&quot;2&quot; /&gt;</div>



<div>   &lt;/condition&gt;</div><div>&lt;/extension&gt;</div><div><br></div><div><br></div><div>&lt;extension name=&quot;test2&quot; &gt;</div><div>   &lt;condition field=&quot;caller_id_number&quot; expression=&quot;2000&quot; /&gt;</div>



<div>   &lt;condition field=&quot;destination_number&quot; expression=&quot;^(61\d{7})$&quot; &gt;</div><div>       &lt;action application=&quot;limit&quot; data=&quot;hash fraud_protection calls_max_intl 1 !NORMAL_TEMPORARY_FAILURE&quot; /&gt;</div>



<div>       &lt;action application=&quot;set&quot; data=&quot;media_bug_answer_req=true&quot; /&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;recording_follow_transfer=true&quot; /&gt;</div><div>


       &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot; /&gt;</div>
<div>       &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot; /&gt;</div><div>       &lt;action application=&quot;bridge&quot; data=&quot;{codec_string=&#39;PCMA&#39;}sofia/gateway/${distributor(distributor2)}/$1&quot; loop=&quot;3&quot; /&gt;</div>



<div>   &lt;/condition&gt;</div><div>&lt;/extension&gt;</div><div><br></div><div><br></div><div>logs:</div><div><br></div><div>first call:</div><div><br></div><div>EXECUTE sofia/internal/<a href="mailto:1000@sip1.linuxtechnology.com.pl" target="_blank">1000@sip1.linuxtechnology.com.pl</a> limit(hash fraud_protection calls_max_intl 3 !NORMAL_TEMPORARY_FAILURE)</div>



<div>2013-03-29 06:12:22.954993 [INFO] switch_limit.c:126 incr called: fraud_protection_calls_max_intl max:3, interval:0</div><div>2013-03-29 06:12:22.954993 [INFO] mod_hash.c:202 Usage for fraud_protection_calls_max_intl is now 1/3</div>



<div><br></div><div><br></div><div>During first call, I&#39;ve tried to establish second call:</div><div><br></div><div>EXECUTE sofia/internal/<a href="mailto:2000@sip1.linuxtechnology.com.pl" target="_blank">2000@sip1.linuxtechnology.com.pl</a> limit(hash fraud_protection calls_max_intl 1 !NORMAL_TEMPORARY_FAILURE)</div>



<div>2013-03-29 06:12:31.915022 [INFO] switch_limit.c:126 incr called: fraud_protection_calls_max_intl max:1, interval:0</div><div>2013-03-29 06:12:31.915022 [INFO] mod_hash.c:189 Usage for fraud_protection_calls_max_intl is already at max value (1)</div>



<div>2013-03-29 06:12:31.915022 [DEBUG] switch_channel.c:3011 (sofia/internal/<a href="mailto:2000@sip1.linuxtechnology.com.pl" target="_blank">2000@sip1.linuxtechnology.com.pl</a>) Callstate Change RINGING -&gt; HANGUP</div>

<div>2013-03-29 06:12:31.915022 [NOTICE] mod_dptools.c:4326 Hangup sofia/internal/<a href="mailto:2000@sip1.linuxtechnology.com.pl" target="_blank">2000@sip1.linuxtechnology.com.pl</a> [CS_EXECUTE] [NORMAL_TEMPORARY_FAILURE]</div>



<div><br></div><div>Regards.</div><div>Tom</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Thu, Mar 28, 2013 at 11:59 PM, Avi Marcus <span dir="ltr">&lt;<a href="mailto:avi@avimarcus.net" target="_blank">avi@avimarcus.net</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can you give some of your dialplan and logs? It sounds like you&#39;re using it fine.<div>Do you have transfers going on in the dialplan?</div>



<div><span><font color="#888888"><br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi</span><br>

</div></div></font></span><div><div><br><div class="gmail_quote">On Fri, Mar 29, 2013 at 12:36 AM, Tomasz Szuster <span dir="ltr">&lt;<a href="mailto:tomasz.szuster@gmail.com" target="_blank">tomasz.szuster@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<p dir="ltr">Hi Nick.</p>
<p dir="ltr">I used different gateways.</p>
<p dir="ltr">Regards<br>
Tom</p><div><div>
<div class="gmail_quote">On 28 Mar 2013 23:21, &quot;Nick Vines&quot; &lt;<a href="mailto:jnvines@gmail.com" target="_blank">jnvines@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div dir="ltr">Try changing &quot;<span style="font-family:arial,sans-serif;font-size:12px">gateway&quot; to something like &quot;gateway_dialplan1&quot; and &quot;gateway_dialplan2&quot;.</span> You are just querying the same limit data otherwise. </div>








<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 28, 2013 at 3:02 PM, Tomasz Szuster <span dir="ltr">&lt;<a href="mailto:tomasz.szuster@gmail.com" target="_blank">tomasz.szuster@gmail.com</a>&gt;</span> wrote:<br>








<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div><br></div><div>I&#39;ve set up limit for outgoing calls using <a href="http://wiki.freeswitch.org/wiki/FS_weekly_2010_12_01" target="_blank">http://wiki.freeswitch.org/wiki/FS_weekly_2010_12_01</a>, especially by adding:</div>








<div>

<br></div><div><span style="color:rgb(255,255,255);font-size:12px;background-color:rgb(95,95,95)">limit hash fraud_protection calls_max_intl 32 !NORMAL_TEMPORARY_FAILURE</span><span style="color:rgb(255,255,255);font-size:12px"> </span><span style="font-size:12px">to the dialplan.</span></div>










<div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">When I created second dialplan with different call_max_intl value freeswitch did not get it.</span></div><div><span style="font-size:12px">It has still remember call_max_intl 32 from first dialplan.</span></div>










<div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">At console I&#39;ve got:</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px"><font color="#33cc00"><b>Usage for fraud_protection_calls_max_intl is already at max value (32)</b></font></span></div>










<div><br></div><div><span style="font-size:12px">I&#39;ve also try with:</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">&lt;action application=&quot;limit_execute&quot; data=&quot;hash outbound gateway 12 bridge sofia/gateway/gateway/$1&quot; /&gt;</span></div>










<div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">Result was the same as for limit hash.</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">My goal is to create dialplans with different calls max where calls max value are treated separately.</span><span style="font-size:12px"> </span></div>










<div><div><br></div><div>Can you please advice how to proceed, where to look ?</div><span><font color="#888888">-- <br>Regards.<br>Tom</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Pozdrawiam<br>Tomasz
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>