<div dir="ltr"><div><div><div>Thanks a lot for the reply. <br></div>I did follow that already, but i do have a problem. Here is my extensions.conf part for that particular number<br>exten => 6912345678,1,Answer()<br>exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd asterisk)<br>exten => 6912345678,n,MYSQL(Query resultid ${connid} SET NAMES utf8)<br>exten => 6912345678,n,GotoIf($["${connid}" = ""]?nodb)<br>exten => 6912345678,n,MYSQL(Query resultid ${connid} SELECT displayname FROM root WHERE phonenumber="${CALLERID(num)}" LIMIT 1)<br>exten => 6912345678,n,MYSQL(Fetch fetchid ${resultid} displayname)<br>exten => 6912345678,n,MYSQL(Clear ${resultid})<br>exten => 6912345678,n,Set(CALLERID(name)=${displayname})<br>exten => 6912345678,n,MYSQL(Disconnect ${connid})<br>exten => 6912345678,n(nodb),NoOp(DoneDB)<br>exten => 6912345678,n,Dial(SIP/450&SIP/451,20)<br>exten => 6912345678,n,VoiceMail(450@Office,su)<br>exten => 6912345678,n,Busy(3)<br><br></div>6912345678 is my DID<br><br><br><br></div>and here is the error i am getting<br>[Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, 6951921078, 2)<br>  == Spawn extension (DialIn, 6912345678, 2) exited non-zero on 'Dongle/dongle0-0100000002'<br><br><div><div><br></div><div>Any ideas please?<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 21, 2017 at 10:22 PM, John Kiniston <span dir="ltr"><<a href="mailto:johnkiniston@gmail.com" target="_blank">johnkiniston@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can use func_odbc to do this.<br><br><a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Asterisk+Connected+to+MySQL+via+ODBC2" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Asterisk+Connected+to+MySQL+<wbr>via+ODBC2</a><br><br>There is a good chapter in the Asterisk book about using ODBC for hotdesking that may help you understand ODBC as well.<br><br><a href="http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/getting_funky.html" target="_blank">http://www.asteriskdocs.org/<wbr>en/3rd_Edition/asterisk-book-<wbr>html-chunk/getting_funky.html</a></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Apr 21, 2017 at 12:12 PM, Atux Atux <span dir="ltr"><<a href="mailto:atuxnull@gmail.com" target="_blank">atuxnull@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div>hi. currently i am running the phonebook in astdb with <br><b style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">database put cidname 0123456789 "name_surname"<br><br></b></div><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">and i retrive it with </span><b style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br>exten =>9876543210,1,Set(CALLERID(na<wbr>me)=${DB(cidname/${CALLERID(nu<wbr>m)})})<br><br></b></div><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Now, my system has mysql and i got all my contacts in there in a database is called <b>asterisk </b>and a table called <b>addressbook</b></span><b style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">. </b><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">password of the mysql is </span><b style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">whateverpasswd<br><br></b></div><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">how do i alter the above section of the extensions.conf code to query mysql everytime there is a call, please?<br><br><br></span></div>
<br></div></div><span class="HOEnZb"><font color="#888888">--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org<wbr>/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki<wbr>/display/AST/Getting+Started</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" rel="noreferrer" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-7811300377566641214gmail_signature" data-smartmail="gmail_signature">A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein</div>
</font></span></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.<wbr>org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</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" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br></blockquote></div><br></div>