[asterisk-users] How to use an Application from inside an Application?
Alexandre Snarskii
snar at paranoia.ru
Fri Oct 12 05:19:12 CDT 2007
On Fri, Oct 12, 2007 at 11:28:42AM +0200, Pirlouwi wrote:
> Hello,
> I wonder if there is a way to build my own asterisk application (let us say
> apps/app_myappl.c),
> and to launch other existing applications from it (for example, doing an
> apps/app_dial.c, or others).
>
> Could someone highlight me on that?
grep pbx_exec apps/*.c
:)
For example, apps/app_queue.c calls MixMonitor in about that way
(lots of code skipped for clarity):
struct ast_app *mixmonapp = NULL;
mixmonapp = pbx_findapp("MixMonitor");
if (mixmonapp) {
ret = pbx_exec(qe->chan, mixmonapp, mixmonargs);
} else
ast_log(LOG_WARNING, "Asked to run MixMonitor on this call, but cannot find the MixMonitor app!\n");
More information about the asterisk-users
mailing list