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

roberto.casas at diaple.com roberto.casas at diaple.com
Thu Dec 18 01:22:15 CST 2008


>
>
>> On 2008-12-17 13:11:59, Mark Michelson wrote:
>> > The code appears to be error-free by my eyes, but I do have a
>> suggestion, though.
>> >
>> > I'm wondering if it would be a good idea to use the return value from
>> ast_pbx_outgoing_exten and ast_pbx_outgoing_app in conjunction with
>> the output parameter "res" to play a sound back to the channel running
>> app_originate to indicate if the call was successful. Something like
>> "Originate successful," "Originate failed. Channel was busy," or
>> "Originate failed. Channel could not be requested."
>> >
>> > 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.




More information about the asterisk-dev mailing list