[asterisk-users] AMI: anything to glue originate to events?

Yaroslav Panych panych.y at gmail.com
Thu Nov 17 06:11:43 CST 2011


After origination successfully complete and channel will be created
you probably should link ActionID and channel name.
Origination action will be next:
Action: Originate
Channel: Local/00001 at internal
Exten: 384087
Context: SIP-UA-00128
Priority: 1
CallerID: 601
ActionID: FFA02C6A03
Variable: ActionID=FFA02C6A03
[SIP-UA-00128]

exten => 384087,1,UserEvent(LinkOriginate,CHANNEL:${CHANNEL(name),ACTIONID:${ActionID}}
....
UserEvent application will generate event into AMI in form
Event: LinkOriginate
CHANNEL: channle-name (channel id created by asterisk)
ACTIONID: FFA02C6A03 (action id you set in originate)

They you(AMI client side) should associate received CHANNLE value with
ActionID, so later when you receive any event which contains channel
name you can easily find ActionID and do your work.



More information about the asterisk-users mailing list