[asterisk-dev] Feature Request: Macro LOCK
John Todd
jtodd at loligo.com
Wed Aug 8 12:23:29 CDT 2007
At 4:01 PM -0700 2007/8/7, Nicholas Blasgen wrote:
>MacroExclusive was discussed in my orginal post. Can't make a
>Dial() application MacroExclusive or no one will be able to execute
>the Dial() command. I was just looking for a way to make it so part
>of my code was Exclusive and part of it wasn't. I'm trying to keep
>all the code in the macro defined section, but I can't tell Asterisk
>which sections should be exclusive and which not. I guess I could
>always call an exclusive macro inside a normal macro.
>
>On 8/7/07, Russell Bryant
><<mailto:russell at digium.com>russell at digium.com> wrote:
>
>Donny Kavanagh wrote:
>> see func_lock in asterisk-trunk.
>
>And the MacroExclusive application in Asterisk 1.4
A truly awful way of managing your problem might be to create a
number of identical macros, each with a different numeric suffix
(macro-foo-1, macro-foo-2, macro-foo-3, etc.) and then use the group
counter to keep track of what is the highest macro being used, and
then run MacroExclusive to jump and lock whatever the "free" macro
was.
Feel free to grind sand in your eyes and claim ignorance of this
particularly ugly method if you don't want to defile your dialplan in
this way. I know I wouldn't want to.
JT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070808/67d2b5ed/attachment.htm
More information about the asterisk-dev
mailing list