<div dir="ltr">Hi Kevin, <div><br></div><div>I'm using/abusing limit for limiting incoming calls *to* an extension, although I'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's id.</div><div><br></div><div><div> <condition></div><div> <action inline="true" application="log" data="INFO Dialed number ${destination_number} is ${user_id}@${domain_name} in XML User Directory."/></div>
<div><br></div><div> <!-- Get current limit, if >0 then callee is in a call --></div><div> <action inline="true" application="set" data="user_busy=${cond(${limit_usage(db ${domain_name} ${user_id})} > 0 ? true : false)}"/></div>
<div><br></div><div> <!-- Don't use limit if caller=callee! (handover to own DECT etc.)--></div><div> <action inline="true" application="set" data="user_busy=${cond(&quot;${user_name}&quot; == &quot;${user_id}&quot; ? false : ${user_busy})}"/></div>
<div> </condition><br></div></div><div><br></div><div><div> <condition field="${user_busy}" expression="false" break="never"></div><div> <!-- 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> --></div>
<div> <action application="set" data="bridge_pre_execute_bleg_app=limit"/><br></div><div> <action application="set" data="bridge_pre_execute_bleg_data=db ${domain_name} ${user_id} 100 !USER_BUSY"/></div>
<div><br></div><div> <action application="limit" data="db ${domain_name} ${user_id} 100 !USER_BUSY"/></div><div><br></div><div> <action application="set" data="fail_on_single_reject=USER_BUSY"/></div>
<div> <action application="bridge" data="user/${user_id}@${domain_name}"/></div><div><br></div><div> <anti-action application="log" data="INFO ${user_id}@${domain_name} is busy, not bridging call!"/></div>
<div> </condition></div></div><div><br></div><div>Now if I replace this:</div><div><br></div><div><div> <action application="set" data="bridge_pre_execute_bleg_app=limit"/></div>
<div> <action application="set" data="bridge_pre_execute_bleg_data=db ${domain_name} ${user_id} 100 !USER_BUSY"/></div></div><div><br></div><div>with that:</div><div><br></div>
<div><div> <action application="limit" data="db ${domain_name} ${user_id} 100 !USER_BUSY"/></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'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"><<a href="mailto:avi@avimarcus.net" target="_blank">avi@avimarcus.net</a>></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, "Kevin Mathy" <<a href="mailto:k.mathy@hexanet.fr" target="_blank">k.mathy@hexanet.fr</a>> 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'm trying to find something on freeswitch to make a "per-user" limitation of concurrent "RINGING" calls (or more generally, calls in PROCEEDING state).</div>
<div><br></div><div>I've found the "max-proceeding" value I can set in switch.conf.xml, but it's a system's wide parameter, and I'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't get any answer : <a href="http://marc.info/?l=freeswitch-users&m=134375187528797" target="_blank">http://marc.info/?l=freeswitch-users&m=134375187528797</a></div>
<div><br></div><div>So, today, is there anything to achieve this ? Maybe something based on the "limit" 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>