[asterisk-users] Originate Status Monitoring

Essien Ita Essien me at essienitaessien.com
Mon Aug 11 11:10:28 CDT 2008


Hi all,

I'm writing an application to Queue and Manage AMI Originate actions. 
Basically, callfiles on steroids if you may :)

I'm facing the following challenges, and any ideas or pointers will be 
hugely appreciated.

1. When I successfully Queue an Originate... (Response is Success), how 
will i know when the channel has been freed up? I had initially been 
monitoring the Response/Message/ActionID trio, but i discovered that 
this returns immedietly asterisk queues the command.

  I've also noticed that Events keep popping up during the life-time of 
the Origination. I'm guessingthe solution would be to monitor for a 
particular event. My question then is... can i _always_ count on Even: 
Hangup, always being present, _nomatter_ what? (As i've noticed Hangup 
is raised even on failed events)

2. I have noticed that in version 1.4.21, the events do not carry any 
associated ActionID (which is understandable, as they may not be in 
response to any AMI commands). My question then i how can i reliably 
detect which events have to do with me?

If i have a channel SIP/foo, i notice that the events carry a channel 
tag: SIP/foo-xxxxxxx, where xxxxxxx is a hex number that I don't know 
how to generate, so if i have to channels, SIP/foo and SIP/foo1, it gets 
tricky knowing which events belong to which channel. Especially when 
trying to multiplex just one socket connection.

3. Uhh.... there is really no #3 :), but any other tips or problems 
hints at solutions to problems I *may* face, from experience, are very 
much welcome.

Thnx.

cheers,
Essien

OS: Linux 2.6.25
Asterisk: 1.4.21



More information about the asterisk-users mailing list