<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span></span></div><div>Thanks for the suggestions. I made changes to res_agi to save the PID of the app into a channel variable (struct ast_chan). Upon UNHOLD event, I could kill() with that PID.<br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Tilghman Lesher <tilghman@meg.abyt.es><br> <b><span style="font-weight: bold;">To:</span></b> Asterisk Developers Mailing List <asterisk-dev@lists.digium.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, August 31, 2012 10:58 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [asterisk-dev] Need
to run an AGI from dialplan only upon call hold<br> </font> </div> <br>
On Fri, Aug 31, 2012 at 12:49 PM, Steve Edwards<br><<a ymailto="mailto:asterisk.org@sedwards.com" href="mailto:asterisk.org@sedwards.com">asterisk.org@sedwards.com</a>> wrote:<br>> UN-TOP-POSTING...<br>><br>>> > From: Steve Edwards <<a ymailto="mailto:asterisk.org@sedwards.com" href="mailto:asterisk.org@sedwards.com">asterisk.org@sedwards.com</a>><br>>><br>>> > man 2 kill ?<br>><br>><br>> On Fri, 31 Aug 2012, uma udupi wrote:<br>><br>>> Yes it works for me, however I somehow need to get the pid of my AGI<br>>> instance (I can not use killall, as I may not want to kill all the instances<br>>> of my AGI), which is only available in res_agi (upon fork() of the AGI) or<br>>> the AGI instance itself.<br>><br>><br>> Just thinking out loud...<br>><br>> How about if your AGI stuffed it's PID in a channel variable?<br><br>Alternatively, since res_agi already knows this
information, he could<br>create a dialplan function or simply an ast_agi_ api call to retrieve<br>that value. It's currently only passed into the agi processing loop,<br>but it could be very easily stored in a channel datastore.<br><br>-Tilghman<br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br> http://lists.digium.com/mailman/listinfo/asterisk-dev<br><br><br> </div> </div> </div></body></html>