<div dir="ltr"><div><br>thanks for your response </div>
<div> </div>
<div>i use mysql like a database and my question when the customer press 3 in context menu i want to stok this variable in a table in my database and i want to get this variable after</div>
<div>could you please give an exemple like below</div>
<div> </div>
<div>thanks and regards</div>
<div> </div>
<div>[menu]<br>exten =&gt; s,1,Background(${sounds_path}menu)<br>exten =&gt; 0,1,Goto(menu,s,1)<br>exten =&gt; 1,1,Goto(appel,s,1)<br>exten =&gt; 2,1,Goto(message,s,1)<br>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="COLOR: red"><font size="3"><font face="Times New Roman">exten =&gt; 3,1,Goto(support,s,1) </font></font></span></p>exten =&gt; s,2,goto(menu,s,1)<br>exten =&gt; i,1,Playback(${sounds_path}erreur-saisie)<br>
exten =&gt; i,2,Goto(menu,s,1)<br>exten =&gt; t,1,Goto(menu,s,1)<br></div>
<div class="gmail_quote">2011/11/25 Dale Noll <span dir="ltr">&lt;<a href="mailto:dnoll@wi.rr.com">dnoll@wi.rr.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im"><br><br>On 11/25/2011 09:32 AM, salaheddine elharit wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">hello list,<br>i have created one menu like below all work without issue, what i want to do is ,<br>when the customer press  3 in menu context  exten =&gt; 3,1,Goto(support,s,1) i want to stok this variable (3) in database or file instead to go to support context<br>
<br></blockquote><br></div>You can save a value to a global variable like you did within your sample dialplan, although I do not recommend this approach, you should read the note below as to why.<br><br>You can save a value to a channel variable with the Set() command and use it later within the same call.<br>
<br>You can save a value into the AstDB with the Set(${DB())) and access the value from any channel even after an Asterisk restart.<br><br>You can setup ODBC, func_odbc and  a database then access the variables via the functions defined within the func_odbc.conf<br>
<br>The method you choose should be determined by your needs.<br><br><br>Note:  You set the global variable at the start of your dialplan. This global variable is available to ALL channels. If you set it for every call, you are doing so needlessly.  If you have multiple applications accessing the same variable and each one sets it with a different value, you will have problems. Global variables should be used to store information needed in the majority of calls.  The way you are using the global variable, I believe you may be better off removing the SetGlobalVar() call and instead set the variable in the [globals] section of extensions.conf.<br>
<br><br>I hope that helps.<br><br>Dale<br><br>-- <br>&quot;The truth speaks for itself. I&#39;m just the messenger.&quot;<br>    Lyta Alexander - Babylon 5<br><font color="#888888"><br><br>--<br>______________________________<u></u>______________________________<u></u>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br>             <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<u></u>mailman/listinfo/asterisk-<u></u>users</a><br>
</font></blockquote></div><br></div>