[asterisk-dev] [Code Review] New Application: Originate

Tony Mountifield tony at softins.clara.co.uk
Thu Dec 18 09:05:15 CST 2008


In article <38471.77.73.161.26.1229584935.squirrel at correo.diaple.com>,
 <roberto.casas at diaple.com> wrote:
> >> > My inspection of the code shows that even though the two function
> >> calls are made with the "sync" variable set to 0,
> >> ast_pbx_outgoing_exten and ast_pbx_outgoing_app will only return once
> >> the channel specified as the first parameter for Originate() has
> >> either answered or is determined to be busy or something.
> >> >
> >> > Feel free to reject this idea entirely or modify it in some way, but
> >> it seems like right now there's no way for someone originating a call
> >> in this manner to know if the originate actually succeeded or not.
> >
> > This is a great suggestion.
> >
> > I do have one modification.  I'll take a look at what is available as a
> > result code back from those API calls.  Whatever is available, I'd like to
> > expose via ORIGINATE_RESULT channel variables.  That way, from the
> > dialplan, you could play a sound as you suggest, or do whatever else the
> > dialplan author may want to do.
> >
> 
> Nice idea, because my original needs was for doing a callback macro, where
> nobody is listening the channel which does the originate, and the playback
> makes sense when someone dial an extension which triggers the originate.

Another suggestion: Add an option which corresponds to the Async:yes
paramater in the AMI, so that the dialplan doesn't need to wait for the
new call to be answered or failed if it doesn't want to.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list