Nic Bellamy
2006-Aug-21 14:15 UTC
[asterisk-users] Manager API: matching an Originate to the Newchannel event
Hi, I'm having a bit of trouble matching up Newchannel (and Newexten, etc. etc.) events with the Originate that created them. Basically, what I want to do is have software automatically initiate a call, and then track the status of that call through to completion. I can match to some degree with the Channel name in later events, but I can't see a way to do this that isn't inherently racey - ie. the person dials out, or someone calls in, at the same time as I'm doing my Originate, I'm not going to be able to match the events with any degree of certainty. Am I missing the obvious somewhere? Cheers, Nic. -- Nic Bellamy, Head Of Engineering, Vadacom Ltd - http://www.vadacom.co.nz/
Tony Mountifield
2006-Aug-21 14:35 UTC
[asterisk-users] Re: Manager API: matching an Originate to the Newchannel event
In article <44EA2284.1090703@vadacom.co.nz>, Nic Bellamy <nicb-lists@vadacom.co.nz> wrote:> Hi, > I'm having a bit of trouble matching up Newchannel (and Newexten, > etc. etc.) events with the Originate that created them. > > Basically, what I want to do is have software automatically initiate a > call, and then track the status of that call through to completion. > > I can match to some degree with the Channel name in later events, but I > can't see a way to do this that isn't inherently racey - ie. the person > dials out, or someone calls in, at the same time as I'm doing my > Originate, I'm not going to be able to match the events with any degree > of certainty. > > Am I missing the obvious somewhere?No, there isn't a clean way to do it. This was discussed here a week ago; see my suggestions at http://lists.digium.com/pipermail/asterisk-users/2006-August/162581.html and at http://lists.digium.com/pipermail/asterisk-users/2006-August/162582.html Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org