AMI 1.2 JOIN event


I’ve one small question: how can I get a destionation number (channel) in AMI’s “Join” event?

Simple schema: Caller make call -> comes into Queue -> member’s phone ring

I need to get destination ID (member’s phone number) then the caller in queue and member’s phone is ring (BRIDGE event not raised yet)

Is it possible?

The destination channel doesn’t exist at that point. It doesn’t exist until just before the AgentCalled event.

Checked in obsolete 1.4 source code. 1.2 is even more obsolete.

In 1.4, the called channel isn’t actually identified in the AgentCalled event, but adding it to the event would be an easy source code change.

I have Asterisk v.10. and AMI 1.2.

And in docs (and in fact) for my Asterisk’s version AgentCalled event is missed.

I’m so sad(

I don’t know what you mean by AMI 1.2. As far as I am concerned, AMI is part of Asterisk and shares the same version number.

The AgentCalled event does exist in Asterisk V10 and it includes the destination channel:

manager_event(EVENT_FLAG_AGENT, "AgentCalled", "Queue: %s\r\n" "AgentCalled: %s\r\n" "AgentName: %s\r\n" "ChannelCalling: %s\r\n" "DestinationChannel: %s\r\n" "CallerIDNum: %s\r\n" "CallerIDName: %s\r\n" "ConnectedLineNum: %s\r\n" "ConnectedLineName: %s\r\n" "Context: %s\r\n" "Extension: %s\r\n" "Priority: %d\r\n" "Uniqueid: %s\r\n" "%s", qe->parent->name, tmp->interface, tmp->member->membername, qe->chan->name, tmp->chan->name, S_COR(qe->chan->, qe->chan->, "unknown"), S_COR(qe->chan->, qe->chan->, "unknown"), S_COR(qe->chan->, qe->chan->, "unknown"), S_COR(qe->chan->, qe->chan->, "unknown"), qe->chan->context, qe->chan->exten, qe->chan->priority, qe->chan->uniqueid, qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");