You have two items to "join with" in the example you provided; #1 local/00001@internal-99fd,1 is call 99fd on local/00001. If you started 10 calls from local/00001, they would all have differing -xxxx (99fd). #2 UniqueID - part 1 is a constant. Part 2 is a sequence so you can join events using the constant part 1 and order them with the sequence part 2.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of giovanni.v Sent: Thursday, November 17, 2011 5:00 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] AMI: anything to glue originate to events? Hi all, I'm trying to write an application to dialout something then forward the call to a context/exten depending on some parameters. These questions may be trivial, not for me ;-) --- Action: Originate Channel: Local/00001@internal Exten: 384087 Context: SIP-UA-00128 Priority: 1 CallerID: 601 ActionID: FFA02C6A03 Response: Success ActionID: FFA02C6A03 Message: Originate successfully queued --- Ok, the /Response/ is clearly related to the /Originate/ action via ActionID, but the next events? --- Event: Newchannel Privilege: call,all Channel: Local/00001@internal-99fd;1 ChannelState: 0 ChannelStateDesc: Down CallerIDNum: CallerIDName: AccountCode: Exten: 00001 Context: internal Uniqueid: 1321366075.180 Event: Newchannel Privilege: call,all Channel: Local/00001@internal-99fd;2 ChannelState: 4 ChannelStateDesc: Ring CallerIDNum: CallerIDName: AccountCode: Exten: 00001 Context: internal Uniqueid: 1321366075.181 --- The only glue I can see here is the first part in the Channel variable but what if issuing parallel Originate actions using the same channel? I will also need to re build the leg between the events raised from my Originate action using Channel, Uniqueid, DestUniqueID event values which sounds a bit tricky. Actually the thing is even more complex because the ami connection get also events from any other concurrent call in the system. The task could be easy if it were possible to propagate the action from the /Originate/ ActionID (or anything else) to the resulting events but unfortunately it is not so. What am I missing? Thanks! -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
