[asterisk-dev] app_xxx help

Russell Bryant russell at digium.com
Mon Feb 15 19:27:01 CST 2010


----- "David Bowerman" <david at iclogix.com.au> wrote:

> Im playing with app_alarmreciever for a custom installation.
> What Id like to do is instead of just dump events in a text file and
> exec an executable is have app_alarmreciever set some channel vars and
> enter the dialplan just like chan_mobile does on incoming SMS.
> app_alarmreciever obviously isnt a channel driver so it doesnt have
> the necessaries to do this.
> Is there a correct way to achieve what I want to do? or does someone
> know of an existing app or res that does this that I can use for
> inspiration?

If you'd like to fire off a new thread running the dialplan, you can originate a call to do that.  Take a look at res_clioriginate or pbx_spool for examples on originating calls.

Since this isn't a channel driver, you'll have to get creative with the endpoints for the call.  Use a Local channel as one side of the call to go execute the dialplan bits you want.  Then, just connect the Local channel to a blocking application.  Echo() should do the trick.

--
Russell Bryant
Digium, Inc. | Engineering Manager, Open Source Software
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org



More information about the asterisk-dev mailing list