[asterisk-users] IVR: Dealing with database and returned variables

salaheddine elharit salah.elharit200 at gmail.com
Thu Mar 8 05:26:11 CST 2012


Hi Bilal

in my case i use an IVR menu using asterisk 1.4 an i can store the number
of the customer in my database and after i can select
 the phone number and the date_time of calling i use mysql

you must change database login password with yours and also the name of
table

regards

exten => 500xxxxxx,1,Ringing()
exten => 500xxxxxx,n,Wait(4)
exten => 500xxxxxx,n,Goto(support,s,1)



[support]
exten => s,1,NoOp(User chose support option)
exten => s,n,MYSQL(Connect connid localhost database login password)
exten => s,n,MYSQL(Query resultid ${connid} INSERT\ INTO\ table\  SET\
callerid='${CALLERID(num)}'\, calldate=now())
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,Dial(SIP/224, 30)


2012/3/7 bilal ghayyad <bilmar_gh at yahoo.com>

> Hi All;
>
> If I need to build IVR using Asterisk (so I will read and write to
> database), until now from my reading, I can understand that the best way is
> to use AGI to call external script like php which will manipulate every
> thing, correct?
>
> Well, the returned values from this script that I can use it to route the
> call to the proper queue or Phone, how I can handle these returned values?
> Do I have to store it in the database? Well, how I will read it from
> database and use it in the extensions.conf?
>
> From the other side, is there any tool to have IVR script (let us say,
> studio programing) that can be used in Asterisk? Any advise in this way?
>
> Regards
> Bilal
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> 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/20120308/8a9ddb73/attachment.htm>


More information about the asterisk-users mailing list