[asterisk-dev] Need to run an AGI from dialplan only upon call hold
uma udupi
umaudupi at yahoo.com
Fri Aug 31 14:01:51 CDT 2012
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.
________________________________
From: Tilghman Lesher <tilghman at meg.abyt.es>
To: Asterisk Developers Mailing List <asterisk-dev at lists.digium.com>
Sent: Friday, August 31, 2012 10:58 AM
Subject: Re: [asterisk-dev] Need to run an AGI from dialplan only upon call hold
On Fri, Aug 31, 2012 at 12:49 PM, Steve Edwards
<asterisk.org at sedwards.com> wrote:
> UN-TOP-POSTING...
>
>> > From: Steve Edwards <asterisk.org at sedwards.com>
>>
>> > man 2 kill ?
>
>
> On Fri, 31 Aug 2012, uma udupi wrote:
>
>> Yes it works for me, however I somehow need to get the pid of my AGI
>> instance (I can not use killall, as I may not want to kill all the instances
>> of my AGI), which is only available in res_agi (upon fork() of the AGI) or
>> the AGI instance itself.
>
>
> Just thinking out loud...
>
> How about if your AGI stuffed it's PID in a channel variable?
Alternatively, since res_agi already knows this information, he could
create a dialplan function or simply an ast_agi_ api call to retrieve
that value. It's currently only passed into the agi processing loop,
but it could be very easily stored in a channel datastore.
-Tilghman
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120831/d35e1df6/attachment.htm>
More information about the asterisk-dev
mailing list