Hi. i have an asterisk 11 installation that i run in my soho environment. My system has mysql to store all the cdrs. I would like make use of the mysql and store numbers and names. eg +4922123456789 "Atux Null". So when the +4922123456789 calls in my system the name "Atux Null" will pop up next to the number. at the moment i have a database called MyNames in mysql that has this information, but i do not know how to make the dialplan read from this database. I would like to ask if there is a way to implement this easily in my dialplan, please. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180117/05d0e0a9/attachment.html>
On Wed, Jan 17, 2018 at 03:16:04PM +0200, Atux Atux wrote: [asterisk dialplan mysql]> I would like to ask if there is a way to implement this easily in my > dialplan, please.The answer is: yes If you'd search for "asterisk dialplan mysql", you'get something like https://www.voip-info.org/wiki/view/Asterisk+cmd+MYSQL You might want to look into AGI plus your favorite scriptinglanguage though.
use func_odbc, create a new function that does a lookup. [CALLERID] prefix=LOOKUP dsn=MyDB readsql=SELECT CALLERID from MyNames where CallerIdNum '${SQL_ESC(${ARG1})}' exten => s,n,Set(CALLERID(NAME)=LOOKUP_CALLERID(${CALLERID(NUM)})) On Wed, Jan 17, 2018 at 6:16 AM, Atux Atux <atuxnull at gmail.com> wrote:> Hi. i have an asterisk 11 installation that i run in my soho environment. > My system has mysql to store all the cdrs. > I would like make use of the mysql and store numbers and names. eg > +4922123456789 "Atux Null". So when the +4922123456789 calls in my system > the name "Atux Null" will pop up next to the number. > at the moment i have a database called MyNames in mysql that has this > information, but i do not know how to make the dialplan read from this > database. > I would like to ask if there is a way to implement this easily in my > dialplan, 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180117/7f8258ea/attachment.html>
On Wed, 17 Jan 2018 09:26:28 -0700 John Kiniston <johnkiniston at gmail.com> wrote:> use func_odbc, create a new function that does a lookup. > > [CALLERID] > prefix=LOOKUP > dsn=MyDB > readsql=SELECT CALLERID from MyNames where CallerIdNum > '${SQL_ESC(${ARG1})}' > > exten => s,n,Set(CALLERID(NAME)=LOOKUP_CALLERID(${CALLERID(NUM)})) > > > On Wed, Jan 17, 2018 at 6:16 AM, Atux Atux <atuxnull at gmail.com> wrote: > > > Hi. i have an asterisk 11 installation that i run in my soho > > environment. My system has mysql to store all the cdrs. > > I would like make use of the mysql and store numbers and names. eg > > +4922123456789 "Atux Null". So when the +4922123456789 calls in my > > system the name "Atux Null" will pop up next to the number. > > at the moment i have a database called MyNames in mysql that has > > this information, but i do not know how to make the dialplan read > > from this database. > > I would like to ask if there is a way to implement this easily in my > > dialplan, please. > > > >that is a good approach.. thinking over implementing this too.. and filling the numbers using a trigger on cdr table.. is there a good manual how to set up odbc connection to mysql? I actually never used odbc on non microscrap systems..