[asterisk-dev] Need to run an AGI from dialplan only upon call hold

Tilghman Lesher tilghman at meg.abyt.es
Fri Aug 31 12:58:26 CDT 2012


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



More information about the asterisk-dev mailing list