<div dir="ltr">Hi Kevin, <div><br></div><div>I&#39;m using/abusing limit for limiting incoming calls *to* an extension, although I&#39;ve just discovered that I would have the same problem, in my current implementation the limit for the callee is raised when the call is bridged:</div>

<div><br></div><div>First I do a inline lookup from the user directory and populate ${user_id} with the callee&#39;s id.</div><div><br></div><div><div>                &lt;condition&gt;</div><div>                        &lt;action inline=&quot;true&quot; application=&quot;log&quot; data=&quot;INFO Dialed number ${destination_number} is ${user_id}@${domain_name} in XML User Directory.&quot;/&gt;</div>

<div><br></div><div>                        &lt;!-- Get current limit, if &gt;0 then callee is in a call --&gt;</div><div>                        &lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;user_busy=${cond(${limit_usage(db ${domain_name} ${user_id})} &gt; 0 ? true : false)}&quot;/&gt;</div>

<div><br></div><div>                        &lt;!-- Don&#39;t use limit if caller=callee! (handover to own DECT etc.)--&gt;</div><div>                        &lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;user_busy=${cond(&amp;quot;${user_name}&amp;quot; == &amp;quot;${user_id}&amp;quot; ? false : ${user_busy})}&quot;/&gt;</div>

<div>                &lt;/condition&gt;<br></div></div><div><br></div><div><div>                &lt;condition field=&quot;${user_busy}&quot; expression=&quot;false&quot; break=&quot;never&quot;&gt;</div><div>                        &lt;!-- On bridge increase Call-Limit for the callee (B-Leg).</div>

<div>                             Limit for outgoing Calls will be increased in  dialplan/default.xml</div><div>                             See <a href="http://wiki.freeswitch.org/wiki/Limit">http://wiki.freeswitch.org/wiki/Limit</a> --&gt;</div>

<div>                        &lt;action application=&quot;set&quot; data=&quot;bridge_pre_execute_bleg_app=limit&quot;/&gt;<br></div><div>                        &lt;action application=&quot;set&quot; data=&quot;bridge_pre_execute_bleg_data=db ${domain_name} ${user_id} 100 !USER_BUSY&quot;/&gt;</div>

<div><br></div><div>                        &lt;action application=&quot;limit&quot; data=&quot;db ${domain_name} ${user_id} 100 !USER_BUSY&quot;/&gt;</div><div><br></div><div>                        &lt;action application=&quot;set&quot; data=&quot;fail_on_single_reject=USER_BUSY&quot;/&gt;</div>

<div>                        &lt;action application=&quot;bridge&quot; data=&quot;user/${user_id}@${domain_name}&quot;/&gt;</div><div><br></div><div>                        &lt;anti-action application=&quot;log&quot; data=&quot;INFO ${user_id}@${domain_name} is busy, not bridging call!&quot;/&gt;</div>

<div>                &lt;/condition&gt;</div></div><div><br></div><div>Now if I replace this:</div><div><br></div><div><div>                        &lt;action application=&quot;set&quot; data=&quot;bridge_pre_execute_bleg_app=limit&quot;/&gt;</div>

<div>                        &lt;action application=&quot;set&quot; data=&quot;bridge_pre_execute_bleg_data=db ${domain_name} ${user_id} 100 !USER_BUSY&quot;/&gt;</div></div><div><br></div><div>with that:</div><div><br></div>

<div><div>                        &lt;action application=&quot;limit&quot; data=&quot;db ${domain_name} ${user_id} 100 !USER_BUSY&quot;/&gt;</div></div><div><br></div><div>the callee is marked as busy directly before i try to bridge to the user. as soon as the call ends, the limit is reset. I just did a quick test though and didn&#39;t try all the corner cases. </div>

<div><br></div><div>best regards, markus</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 10, 2014 at 12:11 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"><p>Just thinking out loud: you can use limit and an execute on answer to decrease the count, and also make sure it decreases it it fails.</p>


<p>I assume your ringing limit will be lower than channel limit? Otherwise the channel limit should suffice.</p>
<p>-Avi</p>
<div class="gmail_quote"><div><div class="h5">On Jun 10, 2014 10:52 AM, &quot;Kevin Mathy&quot; &lt;<a href="mailto:k.mathy@hexanet.fr" target="_blank">k.mathy@hexanet.fr</a>&gt; wrote:<br type="attribution"></div></div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">Hi List, <div><br></div><div>I&#39;m trying to find something on freeswitch to make a &quot;per-user&quot; limitation of concurrent &quot;RINGING&quot; calls (or more generally, calls in PROCEEDING state).</div>




<div><br></div><div>I&#39;ve found the &quot;max-proceeding&quot; value I can set in switch.conf.xml, but it&#39;s a system&#39;s wide parameter, and I&#39;d like more granularity... </div><div><br></div><div>So, after some time spent on the mailing list and with my friend Google, it seems that someone asked for quite the same thing 2 years ago, but didn&#39;t get any answer : <a href="http://marc.info/?l=freeswitch-users&amp;m=134375187528797" target="_blank">http://marc.info/?l=freeswitch-users&amp;m=134375187528797</a></div>




<div><br></div><div>So, today, is there anything to achieve this ? Maybe something based on the &quot;limit&quot; module ?</div><div><br></div><div>Thanks a lot, </div><div>Kevin</div><div><br></div><div><br clear="all">



<div>
<b><div><span style="font-weight:normal">Bien cordialement, </span></div><div><span style="font-weight:normal">Best Regards, </span></div><div><span style="font-weight:normal"><br></span></div></b><b>Kevin MATHY</b> |<b> </b>Ingénieur VoIP<br>




<div><div><b><br></b></div></div></div>
</div></div>

<br>
<img src="http://www.hexanet.fr/sites/files/hexanet/files/20130205_signature_hexanet.gif"><br></div></div>_________________________________________________________________________<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>
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>