That should work.  Can you open a jira against mod_limit and assign it to me?  Thanks.<br><br><div class="gmail_quote">On Wed, Mar 17, 2010 at 5:42 AM, ivdreg ivdreg <span dir="ltr">&lt;<a href="mailto:ivdreg@gmail.com">ivdreg@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;">Thanks again Rupa,<br><br>Is it possible to have more than one limit per call ? I have an issue in this case with calls per period limiting.<br>
<br>This is part of my dial-plan before bridge:<br><br>&lt;action application=&quot;limit_hash&quot; data=&quot;caller ${destination_number} 5 !INCOMING_CALL_BARRED&quot; /&gt;<br>
&lt;action application=&quot;limit_hash&quot; data=&quot;crcd_${destination_number} ${caller_id_number} 2 !OUTGOING_CALL_BARRED&quot; /&gt;<br>&lt;action application=&quot;limit_hash&quot; data=&quot;cr_${sip_h_X-SRC-Oper} ${caller_id_number} 20/86400 !OUTGOING_CALL_BARRED&quot; /&gt;<br>

<br>These are vars for 3 calls (not more than 10 sec between them):<br><br>variable_limit_usage_caller_111111111111: [1]<br>variable_limit_rate_caller_111111111111: [0]<br>variable_limit_usage_crcd_111111111111_99999999999: [1]<br>

variable_limit_rate_crcd_111111111111_99999999999: [0]<br>variable_limit_usage: [1]<br>variable_limit_usage_cr_TEST_99999999999: [1]<br>variable_limit_rate: [1]<br>variable_limit_rate_cr_TEST_99999999999: [1]<br>--<br>variable_limit_usage_caller_111111111111: [1]<br>

variable_limit_rate_caller_111111111111: [0]<br>variable_limit_usage_crcd_111111111111_99999999999: [1]<br>variable_limit_rate_crcd_111111111111_99999999999: [0]<br>variable_limit_usage: [1]<br>variable_limit_usage_cr_TEST_99999999999: [1]<br>

variable_limit_rate: [1]<br>variable_limit_rate_cr_TEST_99999999999: [1]<br>--<br>variable_limit_usage_caller_111111111111: [1]<br>variable_limit_rate_caller_111111111111: [0]<br>variable_limit_usage_crcd_111111111111_99999999999: [1]<br>

variable_limit_rate_crcd_111111111111_99999999999: [0]<br>variable_limit_usage: [1]<br>variable_limit_usage_cr_TEST_99999999999: [1]<br>variable_limit_rate: [1]<br>variable_limit_rate_cr_TEST_99999999999: [1]<br><br>I think that &quot;variable_limit_usage_cr_TEST_99999999999&quot; must be 3 in this case. Is it true ? Does limit_usage and limit_rate that have no realm need to exist also ?<br>

<br>Thanks<div><div></div><div class="h5"><br><br><div class="gmail_quote">2010/3/16 Rupa Schomaker <span dir="ltr">&lt;<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

limit and limit_hash should work the same with regards to disconnect cause.  If you see a difference, let me know.<div><div></div><div><br><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 1:58 PM, ivdreg ivdreg <span dir="ltr">&lt;<a href="mailto:ivdreg@gmail.com" target="_blank">ivdreg@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Thanks Rupa,<br><br>This was good clarification. I want to use mod_limit via 4 servers but because traffic is equally balanced between them I will use limit_hash and calculate how many calls every server will serve. <br>


<br>
One more question ? Is it necessary limit to transfer to limit_exceeded or there is a way to set directly disconnect cause like in limit_hash ?<br><br>Cheers<br><br><div class="gmail_quote">2010/3/16 Rupa Schomaker <span dir="ltr">&lt;<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.com</a>&gt;</span><div>


<div></div><div><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">1) limit_hash use an in-memory hash for it&#39;s storage. There is nor storing to a database when using limit_hash.  If you want to use the database, then use plain limit.<div>



<br></div><div>2) If you want a max calls in a 24hrs period use you rate with limit_hash.  This should be about a true max per period, not concurrent.</div>
<div><br></div><div>limit_hash realm id 50/86400</div><div><br></div><div>should do what you want -- from memory.  double check the wiki/help to verify syntax.<br><br><div class="gmail_quote"><div><div></div><div>
On Tue, Mar 16, 2010 at 10:20 AM, ivdreg ivdreg <span dir="ltr">&lt;<a href="mailto:ivdreg@gmail.com" target="_blank">ivdreg@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div>Hi All,<br>
<br>
I have some questions regarding mod_limit.<br>
<br>
1. I&#39;m using 16674 in production but tested and with 17001. I try
mod_limit with odbc/mysql and sqlite and have same problem: mod_limit
using limit_hash never tries to write data to SQL. It works (counts
sessions) on log screen but no data in MySQL/Sqlite. It seems that data
is cached but cache never flushed to DB. Is anyone has this problem. My limits are:<br><br>&lt;action application=&quot;limit_hash&quot; data=&quot;op_${sip_h_X-SRC-Cust} ${destination_number} 5 !INCOMING_CALL_BARRED&quot; /&gt;<br>





&lt;action application=&quot;limit_hash&quot; data=&quot;in_${sip_h_X-SRC-Cust} ${caller_id_number} 10/300 !OUTGOING_CALL_BARRED&quot; /&gt;<br><br>and they are applied on inbound call profile in same extension. <br><br>





<br>
2. I need to implement rule maximum of 50 calls per day/24h from the same
CLID (A NUMBER) after that calls to be limited. I&#39;m not sure but rule
in example &quot;Limit calls to 5 calls every 10 minutes&quot; is about
concurrent call but not calls processed as count. Any idea ?<br>
<br>
Thanks for any help<br>
<br></div></div>_______________________________________________<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"><br>-- <br>-Rupa<br>
</div>
<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>_______________________________________________<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"><br>-- <br>-Rupa<br>
</div></div><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><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><br clear="all"><br>-- <br>-Rupa<br>