<div dir="ltr"><div>i have last question regarding this thread </div>
<div> </div>
<div>with exten =&gt; 3,n,MYSQL(Query resultid ${connid} insert into test ( option_name ) values (&#39;${CALLERID(num)}&#39;))</div>
<div> </div>
<div>i can store the phone number without issue</div>
<div> </div>
<div>i need also the date and hour fo call in the &quot;count coulum&quot;</div>
<div> </div>
<div>could you please give me the syntex</div>
<div> </div>
<div>best regards<br><br></div>
<div class="gmail_quote">2011/11/30 salaheddine elharit <span dir="ltr">&lt;<a href="mailto:salah.elharit200@gmail.com">salah.elharit200@gmail.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 dir="ltr">
<div>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman"><font size="3">thank you so much for you help,i have <span lang="EN-US">flowed</span> your email and installed <span lang="EN-US">theses</span> add-ons all <span lang="EN-US">works</span><span lang="EN-US"> </span><span lang="EN-US">perfectly</span> i can store the phone_number of the Customer ,now i can do what i want :)</font></font></p>

<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman"><font size="3"> </font></font></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman">thanks <span lang="EN-US">every</span> one for your support </font><span style="FONT-FAMILY: Wingdings"><span>J</span></span></font></p>
<br></div>
<div>
<div></div>
<div class="h5">
<div class="gmail_quote">2011/11/30 Dale Noll <span dir="ltr">&lt;<a href="mailto:dnoll@wi.rr.com" target="_blank">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>On 11/28/2011 08:24 AM, salaheddine elharit wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">thank you for your help<br></blockquote></div>You are welcome. 
<div><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">i would to ask you please, i want to store the phone number of the customer  in the option_name column when he press 3 in context menu<br>
i have created a database &quot;aheevacss&quot; with user &quot;aheevaccs&quot; and password &quot;aheevaccs&quot; and also i have creatd a table in this database name of table test with two columns:<br>option_name    varchar(15)<br>
count                int<br>1-how can i check if the app_mysql module compiled and loaded  i use asterisk 1.4 and if not installed how can ido in order to install and loaded it<br></blockquote></div>I saw in some other message threads, it looks like you are working out getting the mysql connectivity working in 1.4.  In this version, it is an &#39;add on&#39; that you have to download separately from the Asterisk source tree.  The instructions given by Warren Selby are correct.<br>
When you do the &#39;make menuselect&#39;, you are presented with a menu with 5 options.  Under &#39;Applications&#39; you need to check app_addon_sql_mysql. Under &#39;Call Detail Recording&#39; select cdr_addon_mysql. Under &#39;Resource Modules&#39; check res_config_mysql.  Exit from menuselect and type &#39;make&#39;.  You probably do not need the res_config_mysql, but it does not hurt anything to compile it.<br>
<br>Aslo as mentioned in another thread, you do need to have mysql-devel package installed.<br><br>Then run &#39;make&#39; and &#39;make install&#39; and &#39;make samples&#39;.  This will build the modules app_addon_sql_mysql.so, cdr_addon_mysql.so and res_config_mysql.so and install them in /usr/lib/asterisk/modules.  This does not change any existing modules, just adds the new ones.<br>
<br>Start an Asterisk cli (asterisk -r) and issue the command &#39;module load app_addon_sql_mysql&#39;.  This should load the module and the MYSQL app will be available in your dialplan.  To verify it is loaded, you can issue the command &#39;module show like sql&#39;<br>
<br>You should also check the /etc/asterisk/modules.conf file.  There should be a line that says &#39;autoload=yes&#39;.  If it says no, you will have to add a line &#39;load =&gt; app_addon_sql_mysql&#39; (do not include the quotes).  Note:  If you want to load cdr_addon_mysql, you will have to add a &#39;load =&gt; cdr_addon_mysql&#39; line as well.  This file is read by asterisk at startup, so after you restart asterisk for the first time after these changes, make sure the module is loaded with the module show command. 
<div>
<div></div>
<div><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">2- can you please veify the menu below and tell me waht is wrong<br>thanks and regards<br>[default]<br>exten =&gt; 529,1,Ringing()<br>
exten =&gt; 529,2,Wait(4)<br>exten =&gt; 529,3,Goto(accueil,s,1)<br><br>[accueil] ; définition d’un contexte pour l’accueil<br>exten =&gt; s,1,SetGlobalVar(sounds_path=/<u></u>var/lib/asterisk/sounds/)<br>exten =&gt; s,2,Background(${sounds_path}<u></u>welcome)<br>
exten =&gt; s,3,goto(accueil,s,1)<br>exten =&gt; #,1,Goto(menu,s,1)<br>exten =&gt; i,1,Playback(${sounds_path}<u></u>erreur-saisie)<br>exten =&gt; i,2,goto(accueil,s,1)<br>exten =&gt; t,1,Goto(accueil,s,1)<br>[menu]<br>exten =&gt; s,1,Background(${sounds_path}<u></u>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>exten =&gt; 3,1,NoOp(User chose support option)<br>exten =&gt; 3,n,MYSQL(Connect connid localhost aheevaccs aheevaccs aheevaccs)<br>
exten =&gt; 3,n,MYSQL(Query resultid ${connid}  update test set count = count + 1 where option_name = &#39;support&#39;)<br>exten =&gt; 3,n,MYSQL(Clear ${resultid})<br>exten =&gt; 3,n,MYSQL(Disconnect ${connid})<br>exten =&gt; 3,n,Goto(support,s,1)<br>
exten =&gt; s,2,goto(menu,s,1)<br>exten =&gt; i,1,Playback(${sounds_path}<u></u>erreur-saisie)<br>exten =&gt; i,2,Goto(menu,s,1)<br>exten =&gt; t,1,Goto(menu,s,1)<br>[appel] ; définition d’un contexte pour le menu d’appel<br>
exten =&gt; s,1,Background(${sounds_path}<u></u>appel)<br>exten =&gt; s,2,WaitExten(10)<br>exten =&gt; 0,1,Goto(menu,s,1)<br>exten =&gt; 223,1,Dial(SIP/${EXTEN},20,tr)<br>exten =&gt; i,1,Playback(${sounds_path}<u></u>erreur-saisie)<br>
exten =&gt; i,2,Goto(appel,s,1)<br>exten =&gt; t,1,Goto(appel,s,1)<br>[message] ; définition d’un contexte pour la messagerie<br>exten =&gt; s,1,VoiceMailMain(${<u></u>CALLERIDNUM})<br>exten =&gt; t,1,Hangup()<br><br>[support] ; définition d’un contexte pour le support<br>
exten =&gt; s,1,GoToIfTime(09:00-17:00|<u></u>mon-fri|*|*?s,4)<br>exten =&gt; s,2,Playback(${sounds_path}no-<u></u>relation-support)<br>exten =&gt; s,3,Goto(menu,s,1)<br>exten =&gt; s,4,Playback(${sounds_path}<u></u>relation-support)<br>
exten =&gt; s,5,Queue(default)<br>exten =&gt; t,1,Hangup()<br></blockquote></div></div>In the [accueil] context, you call Background with the name of the file to play, then immediately return to the top and play the message again, and again and again.  It will never stop until the caller hangs up.  Also, you are asking the caller to press the &#39;#&#39; key to get past the welcome greeting before getting to the main menu.   I would recommend playing the welcome followed immediately by the Background() for the menu.  The call the WaitExten() to give the caller a chance to enter a selection.  The if a timeout or invalid entry occurs, go back to the point where the menu is played.  You should also think about a look so that after a few failed attempts, you hangup the line and do not tie up that channel.<br>
<br>To save the telephone number that you when option 3 is pressed, change the MYSQL query line to be something like this:<br><br> exten =&gt; 3,n,MYSQL(Query resultid ${connid} insert into test ( option_name ) values (&#39;${CALLERID(num)}&#39;))<br>
<br><br>I noticed that in your dialplan, you have the database, username and password the same, aheevaccs . However in your email, you spelled the database &quot;aheevacss&quot;.  Probably a typo, but in case you have connect errors, that is a place to look.<br>
<font color="#888888"><br><br>Dale</font> 
<div>
<div></div>
<div><br><br>-- <br>&quot;The truth speaks for itself. I&#39;m just the messenger.&quot;<br>    Lyta Alexander - Babylon 5<br><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>
</div></div></blockquote></div><br></div></div></div></blockquote></div><br></div>