[asterisk-users] AMI: anything to glue originate to events?
giovanni.v
iax at keybits.org
Thu Nov 17 12:58:08 CST 2011
Il 17/11/2011 15.46, Danny Nicholas ha scritto:
> You have two items to "join with" in the example you provided; #1
> local/00001 at 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.
Yes, I know. The only thing on which I disagree is that as far as my
knowledge part 2 is a side of a call leg not a sequence.
I think that, unfortunately, tracing the channel+call+leg isn't reliable
because a channel will turn up other channels (e.g. on a trunk):
---
Event: Newchannel
Privilege: call,all
Channel: DAHDI/1-1
ChannelState: 1
ChannelStateDesc: Rsrvd
CallerIDNum:
CallerIDName:
AccountCode:
Exten:
Context: ISDN-TE-B00-incoming
Uniqueid: 1321366075.182
Event: Newstate
Privilege: call,all
Channel: DAHDI/1-1
ChannelState: 3
ChannelStateDesc: Dialing
CallerIDNum: 601
CallerIDName:
Uniqueid: 1321366075.182
Event: Dial
Privilege: call,all
SubEvent: Begin
Channel: Local/00001 at internal-99fd;1
Destination: DAHDI/1-1
CallerIDNum: 601
CallerIDName: <unknown>
UniqueID: 1321366075.180
DestUniqueID: 1321366075.182
Dialstring: g3/384087
Event: Newstate
Privilege: call,all
Channel: DAHDI/1-1
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 601
CallerIDName:
Uniqueid: 1321366075.182
---
Seems that I need to hold all channel+call+leg+UniqueID and also the
DestUniqueID in the Dial event because the ring event will be fired
using that value as UniqueID (semantically painful exception).
All this equals to make a non trivial finite state machine... that was
what I wanted to avoid.
More information about the asterisk-users
mailing list