[asterisk-users] global variables and updates
Julian Lyndon-Smith
asterisk at dotr.com
Tue Jul 31 00:59:12 CDT 2007
Thanks for all the replies and help - For future reference I eventually
decided to go for a func_odbc solution and use a database sequence that
*is* atomic and gives me what I needed.
Julian.
Julian Lyndon-Smith wrote:
> Sorry if this appears twice - I originally sent it nearly 18 hours ago
> and never saw it ..
>
> I have a need to have a unique integer number that can be used by a
> dynamic meetme room (I am wanting to redirect a call into a meeting
> room, and need a unique number to make sure I don't put two people
> together !)
>
> I was going to use a global variable ${NEXTMEETME}, and add one every
> time I redirect.
>
> Is the changing of a global variable atomic ? That is, if I have two or
> more channels being redirected at the same time, and they all execute
>
> exten => _X.,n,Set(NEXTMEETME=${MATH(${NEXTMEETME}+1,i)})
> exten => _X.,n,Set(MYMEETME=${NEXTMEETME})
>
> if NEXTMEETME is initially 0, would channel A get MYMEETME as 1, channel
> B get 2 and channel C get 3, even if they execute the dialplan at the
> same time ?
>
> Julian.
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email for dotr.com has been scanned by MessageLabs
> ______________________________________________________________________
>
>
More information about the asterisk-users
mailing list