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 <atuxn...@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