No subject


Fri Sep 2 03:59:05 CDT 2011


Clearly there would be a heavy penalty to launching a shell so you would 
want to carefully evaluate the frequency this is executed on your system.

DELIMITER @@   CREATE TRIGGER Test_Trigger  AFTER INSERT ON MyTable  FOR 
EACH ROW  BEGIN  DECLARE cmd CHAR(255);  DECLARE result int(10);  SET 
cmd=CONCAT('sudo /home/sarbac/hello_world ','Sarbajit');  SET result = 
sys_exec(cmd); END; @@ DELIMITER ;

  -dbc

 Message: 1 Date: Tue, 18 Sep 2012 15:41:46 -0400 From: Ahmed Munir 
<ahmedmunir007 at gmail.com> Subject: [asterisk-users] Trigger Asterisk after 
data inserted in 	mysql To: asterisk-users at lists.digium.com Message-ID: 
	<CAGMN=JdbE5FdDSQXxZ9OrWXu3Pvgc-hj-EnPxUrG=RJHGSD-eg at mail.gmail.com> 
Content-Type: text/plain; charset="iso-8859-1"  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.   



------=_NextPart_000_0001_296978FA.5782D02
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<span style=3D"font-family: Arial, Helvetica, sans-serif; font-size: 10pt">=
David<br />
<br />
The way we do this is&nbsp;to have a trigger insert into a batch table. Thi=
s table can be polled from a secondary process. That&nbsp;process/service i=
s responsible for monitoring, working and cleanup. This allows for you to p=
oll a highly optimized table without taking the db performance hit from lar=
ger tables that will grow over time. We process millions of cdr and process=
 records a day this way. It also allows you balanced process loads across m=
ultiple servers. This can be extremely important on systems that are more h=
eavily loaded. It also allows you to remove process load and latencies from=
 the database servers. <br />
<br />
<div>Thanks<br />
<br />
Bryant&nbsp;Zimmerman (ZK Tech Inc.)<br />
616-855-1030 Ext. 2003</div>
<br />
<br />
<span style=3D"font-family: tahoma,arial,sans-serif; font-size: 10pt;"><hr =
width=3D"100%" size=3D"2" align=3D"center" />
<b>From</b>: "David Cook" &lt;dbc_asterisk at advan.ca&gt;<br />
<b>Sent</b>: Wednesday, September 19, 2012 2:04 PM<br />
<b>To</b>: asterisk-users at lists.digium.com<br />
<b>Subject</b>: Re: [asterisk-users] Trigger Asterisk after data inserted i=
n mysql</span><br />
<br />
It looks like the answer is yes.<br />
<br />
<a href=3D"http://crazytechthoughts.blogspot.ca/2011/12/call-external-progr=
am-from-mysql.html" class=3D"moz-txt-link-freetext">http://crazytechthought=
s.blogspot.ca/2011/12/call-external-program-from-mysql.html</a><br />
<br />


More information about the asterisk-users mailing list