Thanks a lot for the reply.
I did follow that already, but i do have a problem. Here is my
extensions.conf part for that particular number
exten => 6912345678,1,Answer()
exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd asterisk)
exten => 6912345678,n,MYSQL(Query resultid ${connid} SET NAMES utf8)
exten => 6912345678,n,GotoIf($["${connid}" = ""]?nodb)
exten => 6912345678,n,MYSQL(Query resultid ${connid} SELECT displayname
FROM root WHERE phonenumber="${CALLERID(num)}" LIMIT 1)
exten => 6912345678,n,MYSQL(Fetch fetchid ${resultid} displayname)
exten => 6912345678,n,MYSQL(Clear ${resultid})
exten => 6912345678,n,Set(CALLERID(name)=${displayname})
exten => 6912345678,n,MYSQL(Disconnect ${connid})
exten => 6912345678,n(nodb),NoOp(DoneDB)
exten => 6912345678,n,Dial(SIP/450&SIP/451,20)
exten => 6912345678,n,VoiceMail(450 at Office,su)
exten => 6912345678,n,Busy(3)
6912345678 is my DID
and here is the error i am getting
[Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991
pbx_extension_helper: No application 'MYSQL' for extension
(IncomingDial,
6951921078, 2)
== Spawn extension (DialIn, 6912345678, 2) exited non-zero on
'Dongle/dongle0-0100000002'
Any ideas please?
On Fri, Apr 21, 2017 at 10:22 PM, John Kiniston <johnkiniston at
gmail.com>
wrote:
> You can use func_odbc to do this.
>
> https://wiki.asterisk.org/wiki/display/AST/Getting+
> Asterisk+Connected+to+MySQL+via+ODBC2
>
> There is a good chapter in the Asterisk book about using ODBC for
> hotdesking that may help you understand ODBC as well.
>
> http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-
> html-chunk/getting_funky.html
>
> On Fri, Apr 21, 2017 at 12:12 PM, Atux Atux <atuxnull at gmail.com>
wrote:
>
>> hi. currently i am running the phonebook in astdb with
>>
>>
>> *database put cidname 0123456789 "name_surname"*
>> and i retrive it with
>>
>>
>> *exten
=>9876543210,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})*
>> Now, my system has mysql and i got all my contacts in there in a
database
>> is called *asterisk *and a table called *addressbook**. *password of
the
>> mysql is
>>
>> *whateverpasswd*
>> how do i alter the above section of the extensions.conf code to query
>> mysql everytime there is a call, please?
>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
>
> --
> 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.
> ---Heinlein
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20170422/9a783769/attachment.html>
On Saturday 22 April 2017 at 22:25:52, Atux Atux wrote:> Thanks a lot for the reply. > I did follow that already, but i do have a problem. Here is my > extensions.conf part for that particular number > exten => 6912345678,1,Answer() > exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd > asterisk)...snip...> and here is the error i am getting > [Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 > pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, > 6951921078, 2) > == Spawn extension (DialIn, 6912345678, 2) exited non-zero on > 'Dongle/dongle0-0100000002' > > > Any ideas please?What have you put into func_odbc.conf? ie: what's the definition of MYSQL? Antony. -- Software development can be quick, high quality, or low cost. The customer gets to pick any two out of three. Please reply to the list; please *don't* CC me.
In article <CACoLBwUid-NOos3Qp9x3CP+fFmrKzk+QJuYXTQnnOw4BS2thaw at mail.gmail.com>, Atux Atux <atuxnull at gmail.com> wrote:> > Thanks a lot for the reply. > I did follow that already, but i do have a problem. Here is my > extensions.conf part for that particular number > exten => 6912345678,1,Answer() > exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd asterisk) > exten => 6912345678,n,MYSQL(Query resultid ${connid} SET NAMES utf8) > exten => 6912345678,n,GotoIf($["${connid}" = ""]?nodb) > exten => 6912345678,n,MYSQL(Query resultid ${connid} SELECT displayname > FROM root WHERE phonenumber="${CALLERID(num)}" LIMIT 1) > exten => 6912345678,n,MYSQL(Fetch fetchid ${resultid} displayname) > exten => 6912345678,n,MYSQL(Clear ${resultid}) > exten => 6912345678,n,Set(CALLERID(name)=${displayname}) > exten => 6912345678,n,MYSQL(Disconnect ${connid}) > exten => 6912345678,n(nodb),NoOp(DoneDB) > exten => 6912345678,n,Dial(SIP/450&SIP/451,20) > exten => 6912345678,n,VoiceMail(450 at Office,su) > exten => 6912345678,n,Busy(3) > > 6912345678 is my DID > > > and here is the error i am getting > [Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 > pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, > 6951921078, 2) > == Spawn extension (DialIn, 6912345678, 2) exited non-zero on > 'Dongle/dongle0-0100000002'That means that your copy of asterisk does not have the "app_mysql" module. If you compiled asterisk yourself, you need to go into menuselect and make sure app_mysql is selected, and then recompile. You will probably find app_mysql under "Addons". If it does not let you select app_mysql, you will need to install the mysql development package (e.g. mysql-devel) to get the headers and libraries. Cheers Tony -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
Well, My suggestion was to use FUNC_ODBC but instead you went with APP_MYSQL which has been depricated. Did you compile APP_MYSQL? It's not enabled by default. On Sat, Apr 22, 2017 at 1:25 PM, Atux Atux <atuxnull at gmail.com> wrote:> Thanks a lot for the reply. > I did follow that already, but i do have a problem. Here is my > extensions.conf part for that particular number > exten => 6912345678,1,Answer() > exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd > asterisk) > > and here is the error i am getting > [Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 > pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, > 6951921078, 2) > == Spawn extension (DialIn, 6912345678, 2) exited non-zero on > 'Dongle/dongle0-0100000002' > > > Any ideas please? >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170424/ef270c24/attachment.html>
I will try to reinstall everything according to your instructions and i will come back. I might need a couple of weeks due to a business trip though ???? 24 ??? 2017 6:54 ?.?., ? ??????? "John Kiniston" < johnkiniston at gmail.com> ??????:> Well, My suggestion was to use FUNC_ODBC but instead you went with > APP_MYSQL which has been depricated. > > Did you compile APP_MYSQL? It's not enabled by default. > > On Sat, Apr 22, 2017 at 1:25 PM, Atux Atux <atuxnull at gmail.com> wrote: > >> Thanks a lot for the reply. >> I did follow that already, but i do have a problem. Here is my >> extensions.conf part for that particular number >> exten => 6912345678,1,Answer() >> exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd >> asterisk) >> >> and here is the error i am getting >> [Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 >> pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, >> 6951921078, 2) >> == Spawn extension (DialIn, 6912345678, 2) exited non-zero on >> 'Dongle/dongle0-0100000002' >> >> >> Any ideas please? >> > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170425/d45bdf3c/attachment.html>