[asterisk-users] Re: Associating an Originate Request to a Channel before the call is answered

Tony Mountifield tony at softins.clara.co.uk
Mon Aug 14 03:01:55 MST 2006


In article <44E047C6.4030204 at reucon.net>, Stefan Reuter <srt at reucon.net> wrote:
> Janahan Vivekanandan wrote:
> > I know that I can use the ActionID to accomplish this once I receive
> > the OriginateSuccess event, but I need to be able to cancel the call
> > before it is answered(I'm pretty sure OriginateSuccess is only sent
> > after the  call is answered, correct me if I'm wrong...:-)
> 
> You are right and the canonical answer seems to be you can't.
> I had the same problem a few weeks ago for the development of
> Asterisk-Java and solved it by setting a channel variable in the
> Originate action which I check for with every NewChannel event.
> Not nice, but it a working hack.

An alternative to the approach I just wrote about in my other response
would be again to use the Local channel, but to set a channel variable
as Stefan describes, and then in the outgoing context, call UserEvent
to pass that value back to the manager application just before doing
the Dial.

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-users mailing list