<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes,<div>The main problem I'm have trouble with is tracking calls from a hunt group. &nbsp;I use a lua script to call multiple users at once. &nbsp;For example:</div><div>session:execute("bridge", "[leg_timeout=30]user/1001@"..domain_name..",".."[leg_timeout=30]user/1002@"..domain_name..",".."[leg_timeout=30]user/1003@"..domain_name);</div><div><br></div><div>It is impossible to know which user will be on the phone before the lua script is called. &nbsp;I can execute an api application from the directory dial-string but I am unaware of a way to execute another dialplan application from there. &nbsp;Since there is no transfer, I cannot do something like:</div><div>&lt;action application="limit" data="hash ${domain_name} ${dialed_extension} 100"/&gt;</div><div>before&nbsp;</div><div>&lt;action application="bridge" data="user/${dialed_extension}@${domain_name}"/&gt;</div><div><br></div><div>I hope that helps explain my problem :-)</div><div><br></div><div>Thanks,</div><div>Spencer</div><div><br></div><div><br><div><div><div>On May 17, 2012, at 11:49 AM, Yehavi Bourvine wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="rtl"><div dir="ltr">Sorry, I did not understand what you exactly mean. Can you give some example?</div><div dir="ltr">&nbsp;</div><div dir="ltr">About the bridge application - you have to check it in each bridge call, or do one centralized check before you enter the logic of the dialplan: If the user is above limit - make it busy; if not, continue with the dialplan as usuall.</div>
<div dir="ltr">&nbsp;</div><div dir="ltr">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __Yehavi:<br><br></div><div class="gmail_quote"><div dir="ltr">2012/5/17 Spencer Thomason <span dir="ltr">&lt;<a href="mailto:spencer@5ninesolutions.com" target="_blank">spencer@5ninesolutions.com</a>&gt;</span></div>
<blockquote style="margin:0px 0.8ex;padding-right:1ex;padding-left:1ex;border-right-color:rgb(204,204,204);border-left-color:rgb(204,204,204);border-right-width:1px;border-left-width:1px;border-right-style:solid;border-left-style:solid" class="gmail_quote">
<div dir="ltr"><div style="word-wrap:break-word">The problem is that I have now way of incrementing the number of calls that limit is keeping track of from an API command. &nbsp;I believe that I need to increment the call count from the directory dial-string because there are several places an extension could be called with a bridge directly to the user (i.e. bridge/user@${domain_name}) as apposed to a transfer. &nbsp;If a call is transferred then I can call the dialplan application limit before the bridge to the user and everything works great. &nbsp;Is there a way I can call a dialplan application from the directory dial-string? &nbsp;or is there any other way to make sure that limit is called on every bridge to a registered user?<div>
<br></div><div>Thanks again,</div><div>Spencer</div><div><div class="h5"><div><br></div><div><br><div><div>On May 17, 2012, at 9:52 AM, Yehavi Bourvine wrote:</div><br><blockquote type="cite"><div dir="rtl"><div dir="ltr">
You can call mod_limit by yourself or at the dialstring. Mod_limit counts all calls to/from an extension, so it is quite accurate.</div><div dir="ltr">&nbsp;</div><div dir="ltr">For example, we use:</div>
<div dir="ltr">&nbsp;</div><div dir="ltr">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="bridge" data="${cond(${limit_usage(max_calls ${destination_number})} &gt; ${MaxLimit} ?&nbsp; error/user_busy : ${RingAt})}" /&gt;<br></div>

<div dir="ltr">Which either returns "user busy" or calls the extension.</div><div dir="ltr">&nbsp;</div><div dir="ltr">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __Yehavi:<br><br></div><div dir="ltr" class="gmail_quote"><div>2012/5/17 Spencer Thomason <span dir="ltr">&lt;<a href="mailto:spencer@5ninesolutions.com" target="_blank">spencer@5ninesolutions.com</a>&gt;</span></div>

<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div><div style="word-wrap:break-word">Thanks that should work. &nbsp;How did you keep track of the calls? &nbsp;Calls from an extension are easy enough but an extension can be called many ways, i.e. hunts groups, transfers, etc that would need to be accounted using limit. &nbsp;Could you do this by modifying the dial-string?<span><font color="#888888"><div>

<br></div><div>Spencer</div></font></span><div><div><div><br></div><div><div><div>On May 17, 2012, at 9:09 AM, Yehavi Bourvine wrote:</div><br><blockquote type="cite"><div><div>Use the mod_limit to check whether there is already a call on his extension, and if so - do not try to bridge with auto answer.</div>

<div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __Yehavi:<br><br></div><div class="gmail_quote">
2012/5/17 Spencer Thomason <span dir="ltr">&lt;<a href="mailto:spencer@5ninesolutions.com" target="_blank">spencer@5ninesolutions.com</a>&gt;</span><br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">


Hello, I'm having a problem with Polycom endpoints where the phone auto answers a page even if another call is in progress. &nbsp;My dialplan looks like this:<br>
<br>
 &nbsp; &nbsp;&lt;extension name="extension-intercom"&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;condition field="destination_number" expression="^\*80(\d{3,7})$"&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="dialed_extension=$1"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="export" data="sip_auto_answer=true"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="bridge" data="user/${dialed_extension}@${domain_name}"/&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;/condition&gt;<br>
 &nbsp; &nbsp;&lt;/extension&gt;<br>
<br>
Does anyone have any suggestions for an elegant way to solve this?<br>
<br>
Thanks,<br>
Spencer<br>
<br>
<br>
<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>
Join Us At ClueCon - Aug 7-9, 2012<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>
</blockquote></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>Join Us At ClueCon - Aug 7-9, 2012<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>

</blockquote></div><br></div></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>
Join Us At ClueCon - Aug 7-9, 2012<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 dir="ltr"><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>Join Us At ClueCon - Aug 7-9, 2012<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>
</blockquote></div><br></div></div></div></div></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>
Join Us At ClueCon - Aug 7-9, 2012<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>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></div></body></html>