Not sure what you are doing with meetme but, <br>i Always used AstDB() for this type of needs.<br><br><br><div><span class="gmail_quote">On 7/28/07, <b class="gmail_sendername">Lee Jenkins</b> &lt;<a href="mailto:lee@datatrakpos.com">
lee@datatrakpos.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Watkins, Bradley wrote:<br>&gt; The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
<br>&gt;<br>&gt;&gt; From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>&gt;&gt; [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com
</a>] On Behalf Of<br>&gt;&gt; Julian Lyndon-Smith<br>&gt;&gt; Sent: Saturday, July 28, 2007 5:18 AM<br>&gt;&gt; To: <a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>&gt;&gt; Subject: [asterisk-users] global variables and updates
<br>&gt;&gt;<br>&gt;&gt; Sorry if this appears twice - I originally sent it nearly 18<br>&gt;&gt; hours ago<br>&gt;&gt; and never saw it ..<br>&gt;&gt;<br>&gt;&gt; I have a need to have a unique integer number that can be used by a
<br>&gt;&gt; dynamic meetme room (I am wanting to redirect a call into a meeting<br>&gt;&gt; room, and need a unique number to make sure I don&#39;t put two people<br>&gt;&gt; together !)<br>&gt;&gt;<br>&gt;&gt; I was going to use a global variable ${NEXTMEETME}, and add one every
<br>&gt;&gt; time I redirect.<br>&gt;&gt;<br>&gt;&gt; Is the changing of a global variable atomic ? That is, if I<br>&gt;&gt; have two or<br>&gt;&gt; more channels being redirected at the same time, and they all execute<br>
&gt;&gt;<br>&gt;&gt; exten =&gt; _X.,n,Set(NEXTMEETME=${MATH(${NEXTMEETME}+1,i)})<br>&gt;&gt; exten =&gt; _X.,n,Set(MYMEETME=${NEXTMEETME})<br>&gt;&gt;<br>&gt;&gt; if NEXTMEETME is initially 0, would channel A get MYMEETME as
<br>&gt;&gt; 1, channel<br>&gt;&gt; B get 2 and channel C get 3, even if they execute the dialplan at the<br>&gt;&gt; same time ?<br>&gt;&gt;<br>&gt;<br>&gt; The changing of variables is not atomic as would hope, but there is a
<br>&gt; solution for you.&nbsp;&nbsp;Look the application MacroExclusive.&nbsp;&nbsp;Put your Set to<br>&gt; increment the global variable inside of a macro and call it using this,<br>&gt; and you will get the behavior you desire.&nbsp;&nbsp;One caveat, however, is that
<br>&gt; you will want as little logic as possible inside of this macro.<br>&gt; MacroExclusive will block all other calls to this macro until the first<br>&gt; one exits.&nbsp;&nbsp;But this is not an issue if all you are doing is a quick
<br>&gt; var++ and then leaving.<br>&gt;<br><br>That&#39;s a very nice feature.&nbsp;&nbsp;A quick Google search on the wiki didn&#39;t<br>turn up any topics.&nbsp;&nbsp;Does it queue subsequent calls or just block them<br>and then logic in the dialplan must be used against a return value?
<br><br>---<br>Warm Regards,<br><br>Lee<br><br><br><br>_______________________________________________<br>--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--">http://www.api-digital.com--</a><br><br>
asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div>
<br>