On 8/3/07, <b class="gmail_sendername">bilal ghayyad</b> &lt;<a href="mailto:bilmar_gh@yahoo.com">bilmar_gh@yahoo.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At the extensions.conf file, at [demo] context, there<br>is a line:<br><br>exten =&gt; 1234,n,Macro(stdexten, 1234,<br>${GLOBAL(CONSOLE)})<br><br>In this line, I understand that it calls the macro<br>name stdexten [macro-stdexten] but about the other
<br>variables, do we consider 1234 is ARG1 and the<br>${GLOBAL(CONSOLE)} is the ARG2? This is important to<br>distinguish the arguments inside the macro.</blockquote><div><br>Correct.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>From the other side, why it used ${GLOBAL(CONSOLE)} to<br>retreive the variable and did not write it directly<br>${CONSOLE} as already CONSOLE is configured in the<br>[global] or what is the storey :) - ?</blockquote><div>
<br>Using ${CONSOLE} relies on magic - it looks for a channel variable, and when one is not found, it falls back to the global var.&nbsp; If CONSOLE happened to be defined on the channel, it would be returned instead of the global var.
<br><br>Using the GLOBAL dialplan function lets you get at global variables whether or not direct access to them is occluded by a like-named local or channel variable.<br></div></div><br>-- <br>j.