[asterisk-users] Trigger Asterisk after data inserted in mysql

James Sharp james at fivecats.org
Tue Sep 18 15:09:08 CDT 2012


On 9/18/2012 3:41 PM, Ahmed Munir wrote:
> Hi all,
>
>
> I would like to know, is there a way to trigger Asterisk after data
> inserted into mysql DB? Like here what I'm trying to do, when the new
> data inserted into MySQL DB, it sends the request to Asterisk along with
> the new data (that is inserted in DB) for making outbound call i.e.
> Realtime.
>
> Currently I've set a cron job that execute my script every 30 seconds
> and checks for a new data in DB. If new data is inserted in 30 seconds
> that script will run and sends the data to Asterisk for making calls.
> (This is the case which I'm thinking to avoid)
>
> Please advise.

You could create a trigger in mysql that calls a shell script that pokes 
Asterisk properly.

Look here for a start:

http://forums.mysql.com/read.php?99,170973,236208#msg-236208



More information about the asterisk-users mailing list