<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 style="mso-ansi-language: EN-US" lang="EN-US">flowed</span> your email and installed <span style="mso-ansi-language: EN-US" lang="EN-US">theses</span> add-ons all <span style="mso-ansi-language: EN-US" lang="EN-US">works</span><span lang="EN-US"> </span><span style="mso-ansi-language: EN-US" 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 style="mso-ansi-language: EN-US" lang="EN-US">every</span> one for your support </font><span style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</span></span></font></p>
<br></div>
<div class="gmail_quote">2011/11/30 Dale Noll <span dir="ltr"><<a href="mailto:dnoll@wi.rr.com">dnoll@wi.rr.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">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 class="im"><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 "aheevacss" with user "aheevaccs" and password "aheevaccs" 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 'add on' that you have to download separately from the Asterisk source tree. The instructions given by Warren Selby are correct.<br>
When you do the 'make menuselect', you are presented with a menu with 5 options. Under 'Applications' you need to check app_addon_sql_mysql. Under 'Call Detail Recording' select cdr_addon_mysql. Under 'Resource Modules' check res_config_mysql. Exit from menuselect and type 'make'. 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 'make' and 'make install' and 'make samples'. 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 'module load app_addon_sql_mysql'. 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 'module show like sql'<br>
<br>You should also check the /etc/asterisk/modules.conf file. There should be a line that says 'autoload=yes'. If it says no, you will have to add a line 'load => app_addon_sql_mysql' (do not include the quotes). Note: If you want to load cdr_addon_mysql, you will have to add a 'load => cdr_addon_mysql' 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 class="h5"><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 => 529,1,Ringing()<br>
exten => 529,2,Wait(4)<br>exten => 529,3,Goto(accueil,s,1)<br><br>[accueil] ; définition d’un contexte pour l’accueil<br>exten => s,1,SetGlobalVar(sounds_path=/<u></u>var/lib/asterisk/sounds/)<br>exten => s,2,Background(${sounds_path}<u></u>welcome)<br>
exten => s,3,goto(accueil,s,1)<br>exten => #,1,Goto(menu,s,1)<br>exten => i,1,Playback(${sounds_path}<u></u>erreur-saisie)<br>exten => i,2,goto(accueil,s,1)<br>exten => t,1,Goto(accueil,s,1)<br>[menu]<br>exten => s,1,Background(${sounds_path}<u></u>menu)<br>
exten => 0,1,Goto(menu,s,1)<br>exten => 1,1,Goto(appel,s,1)<br>exten => 2,1,Goto(message,s,1)<br>exten => 3,1,NoOp(User chose support option)<br>exten => 3,n,MYSQL(Connect connid localhost aheevaccs aheevaccs aheevaccs)<br>
exten => 3,n,MYSQL(Query resultid ${connid} update test set count = count + 1 where option_name = 'support')<br>exten => 3,n,MYSQL(Clear ${resultid})<br>exten => 3,n,MYSQL(Disconnect ${connid})<br>exten => 3,n,Goto(support,s,1)<br>
exten => s,2,goto(menu,s,1)<br>exten => i,1,Playback(${sounds_path}<u></u>erreur-saisie)<br>exten => i,2,Goto(menu,s,1)<br>exten => t,1,Goto(menu,s,1)<br>[appel] ; définition d’un contexte pour le menu d’appel<br>
exten => s,1,Background(${sounds_path}<u></u>appel)<br>exten => s,2,WaitExten(10)<br>exten => 0,1,Goto(menu,s,1)<br>exten => 223,1,Dial(SIP/${EXTEN},20,tr)<br>exten => i,1,Playback(${sounds_path}<u></u>erreur-saisie)<br>
exten => i,2,Goto(appel,s,1)<br>exten => t,1,Goto(appel,s,1)<br>[message] ; définition d’un contexte pour la messagerie<br>exten => s,1,VoiceMailMain(${<u></u>CALLERIDNUM})<br>exten => t,1,Hangup()<br><br>[support] ; définition d’un contexte pour le support<br>
exten => s,1,GoToIfTime(09:00-17:00|<u></u>mon-fri|*|*?s,4)<br>exten => s,2,Playback(${sounds_path}no-<u></u>relation-support)<br>exten => s,3,Goto(menu,s,1)<br>exten => s,4,Playback(${sounds_path}<u></u>relation-support)<br>
exten => s,5,Queue(default)<br>exten => 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 '#' 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 => 3,n,MYSQL(Query resultid ${connid} insert into test ( option_name ) values ('${CALLERID(num)}'))<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 "aheevacss". 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 class="h5"><br><br>-- <br>"The truth speaks for itself. I'm just the messenger."<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>