<div>I&#39;ve got 4 SIP phone lines with a call-limit of 2 for each.&nbsp; I&#39;ve written a handy macro to allow my users to dial a phone number and the macro will figure out the next available line to use by first checking if the GROUP() is over 2 and then checking to see if ChanIsAvail() as a backup, and if it can&#39;t use the line for either reason it goes to the next line.&nbsp; The problem is that there are enough situations that the Macro gets called twice without much time seperation.&nbsp; Both macros check the group() number, it comes back as free, they check the line availability and it&#39;s open, and they try dialing.&nbsp; But because they both started at more or less the same instant, they&#39;ve both at the same stage in the macro and sometimes (maybe 10% of the time) a macro will try dialing on a line that&#39;s already in use.
</div>
<div>&nbsp;</div>
<div>My question is this.&nbsp; Is it possible to tell Asterisk to execute part of a macro as a block without allowing any other commands to be processed during that time?&nbsp; Some way to LOCK the dialplan (as you&#39;d do in SQL).&nbsp; I want my macro to be able to execute the part of the code that checks line status and then sets the GROUP() without allowing any other dialplans from running during that time.&nbsp; Anyone know if this is a current feature?
<br clear="all"><br>-- <br>/Nick </div>