AMI Event without data

Hello.
I’m using my VitalPBX to capture events in a local queue though AMI interface. The information of my VitalPBX is:
Hardware Info

Virtualization VMWARE
CPU Model AMD Opteron™ Processor 6174
CPU Cores 2
RAM 2 GB / 2 GB

System Information

Distro CentOS Linux release 7.9.2009 (Core)
Kernel 3.10.0-1160.31.1.el7.x86_64
Asterisk 18.6.0
VitalPBX 3.1.6-1

I have created an AMI user with the next permissions:
read=call,agent
write=call,agent

What i wanted to do is capture two events:

  1. When an agent answer a call in the queue, with AgentConnectEvent.
  2. When an agent/caller hangup a call in the queue, with AgentComplete

When a call is answered i’m getting the event AgentConnectEvent as i needed, so far so good.

But when the call is hungup either by the agent or the caller i get not always the AgentComplete event with ALL the information. This issue is not always constant, most of the time i get the full “AgentComplete” event but from time to time i get the incomplete “AgentComplete” event.
This is an example of the FULL “AgentComplete” event:

Event: AgentComplete
Privilege: agent,all
Channel: PJSIP/PROV.ST.02-0000001c
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 11223344556
CallerIDName: 11223344556
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1647613911.79
Linkedid: 1647613911.79
DestChannel: Local/120@queue-call-to-agents-00000011;1
DestChannelState: 6
DestChannelStateDesc: Up
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 11223344556
DestConnectedLineName: 11223344556
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 755
DestPriority: 1
DestUniqueid: 1647613911.80
DestLinkedid: 1647613911.79
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120
HoldTime: 6
TalkTime: 9
Reason: agent

But as i mention before… i’m getting this “AgentComplete” event from time to time:

Event: AgentComplete
Privilege: agent,all
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120
HoldTime: 8
TalkTime: 37
Reason: agent

As you can notice it lacks a lot of information, and in particular the “Uniqueid” and “Linkedid”, which are important to match the initial “AgentConnectEvent”.

Could this be a bug? or maybe i’m missing something?.

Thanks in advance.
Best Regards,
Ricardo

You should check the documentation of the AMI library you are using. Additionally, you should open a thread in the Asterisk forum and the AMI library you are using.

Hi.
Thanks for the information. So, if you could give me a hand here. Are you saying that this could be a problem with Asterisk core rather that the VitalPBX?. Looking for help in other forums someone pointed the next information:

EVERY event in asterisk SHOULD have uniqueid field.

If you not see that field, something wrong with your library or program. If you see it, you always can catch info from join event based on uniqueid.

And looking for Asterisk 18 AMI documentation i have:

AgentComplete

Synopsis

Raised when a queue member has finished servicing a caller in the queue.

Description

Syntax

Event: AgentComplete Channel: ChannelState: ChannelStateDesc: CallerIDNum: CallerIDName: ConnectedLineNum: ConnectedLineName: Language: AccountCode: Context: Exten: Priority: Uniqueid: Linkedid: DestChannel: DestChannelState: DestChannelStateDesc: DestCallerIDNum: DestCallerIDName: DestConnectedLineNum: DestConnectedLineName: DestLanguage: DestAccountCode: DestContext: DestExten: DestPriority: DestUniqueid: DestLinkedid: Queue: MemberName: Interface: HoldTime: TalkTime: Reason:

Arguments
  • Channel
  • ChannelState - A numeric code for the channel’s current state, related to ChannelStateDesc
  • ChannelStateDesc
    • Down
    • Rsrvd
    • OffHook
    • Dialing
    • Ring
    • Ringing
    • Up
    • Busy
    • Dialing Offhook
    • Pre-ring
    • Unknown
  • CallerIDNum
  • CallerIDName
  • ConnectedLineNum
  • ConnectedLineName
  • Language
  • AccountCode
  • Context
  • Exten
  • Priority
  • Uniqueid
  • Linkedid - Uniqueid of the oldest channel associated with this channel.
  • DestChannel
  • DestChannelState - A numeric code for the channel’s current state, related to DestChannelStateDesc
  • DestChannelStateDesc
    • Down
    • Rsrvd
    • OffHook
    • Dialing
    • Ring
    • Ringing
    • Up
    • Busy
    • Dialing Offhook
    • Pre-ring
    • Unknown
  • DestCallerIDNum
  • DestCallerIDName
  • DestConnectedLineNum
  • DestConnectedLineName
  • DestLanguage
  • DestAccountCode
  • DestContext
  • DestExten
  • DestPriority
  • DestUniqueid
  • DestLinkedid - Uniqueid of the oldest channel associated with this channel.
  • Queue - The name of the queue.
  • MemberName - The name of the queue member.
  • Interface - The queue member’s channel technology or location.
  • HoldTime - The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
  • TalkTime - The time the queue member talked with the caller in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
  • Reason
    • caller
    • agent
    • transfer

Class

AGENT

So, i think i should have a Uniqueid and Linkedid parameters in the AgentComplet Event.
In case this is a problem with Asterisk, do i need to look for help in Asterisk forums?. Could you please point me where can i do that?.

Thanks!
Ricardo

In my opinion, is not an issue with Asterisk but your AMI library. Check with them if you are doing something wrong in your implementation.

Hi.
Sorry to ask this, but i’m not an expert in Asterisk…i’m just using the VitalPBX installation as i mention. So, how can i check the AMI library that asterisk is using? Because, in order to check this issue i’m just making a “telnet localhost 5038” to see the events… i’m not using any external client libraries to capture the events. The incomplete “AgentComplete” event is sent by Asterisk directly in the telnet session. So … this still will be a problem with the AMI library?.. or something else?

Hope you can help me.

Regards,
Ricardo

With AMI Library, I meant the library you are using to monitor the Asterisk events from your Application. I assumed you were trying to integrate your application with Asterisk.

What’s the point to monitor Asterisk with Telnet? What are you trying to achieve?

Hi.
In fact i’m using PAMI as part of my php program to monitor Asterisk queues. But just to debug the current issue, and discard any other problem, I’m using telnet directly to the server on localhost port 5038. If i use this, i’m getting the event AgentComplete as indicated.

Hi
This is a complete call with the event AgentComplete without the Uniqueid and the Linkedid, taken through telnet. At the end you can see the event i mention.

[root@vc7desa ~]# telnet localhost 5038
Trying localhost…
Connected to localhost.
Escape character is ‘^]’.
Asterisk Call Manager/7.0.1
Action: Login
Username: qcmonitor
Secret: ***************

Response: Success
Message: Authentication accepted

Event: Newchannel
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trk-1-in
Exten: 56225940356
Priority: 1
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: Newstate
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 14
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: DeviceStateChange
Privilege: call,all
Device: PJSIP/SIPPROVIDER
State: INUSE

Event: DeviceStateChange
Privilege: call,all
Device: Queue:Q755
State: RINGING

Event: QueueCallerJoin
Privilege: agent,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
Queue: Q755
Position: 1
Count: 1

Event: MusicOnHoldStart
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
Class: default

Event: Newchannel
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum:
CallerIDName:
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 120
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259

Event: Newchannel
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum:
CallerIDName:
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 120
Priority: 1
Uniqueid: 1648043117.261
Linkedid: 1648043117.259

Event: NewCallerid
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 56225940356
CallerIDName:
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 120
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: NewCallerid
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 56225940356
ConnectedLineName:
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 120
Priority: 1
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: NewConnectedLine
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 56225940356
ConnectedLineName:
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 120
Priority: 1
Uniqueid: 1648043117.261
Linkedid: 1648043117.259

Event: LocalBridge
Privilege: call,all
LocalOneChannel: Local/120@queue-call-to-agents-00000037;1
LocalOneChannelState: 0
LocalOneChannelStateDesc: Down
LocalOneCallerIDNum: 56225940356
LocalOneCallerIDName:
LocalOneConnectedLineNum:
LocalOneConnectedLineName:
LocalOneLanguage: en
LocalOneAccountCode:
LocalOneContext: queue-call-to-agents
LocalOneExten: 120
LocalOnePriority: 1
LocalOneUniqueid: 1648043117.260
LocalOneLinkedid: 1648043117.259
LocalTwoChannel: Local/120@queue-call-to-agents-00000037;2
LocalTwoChannelState: 4
LocalTwoChannelStateDesc: Ring
LocalTwoCallerIDNum: 56212345678
LocalTwoCallerIDName: 56212345678
LocalTwoConnectedLineNum: 56225940356
LocalTwoConnectedLineName:
LocalTwoLanguage: en
LocalTwoAccountCode:
LocalTwoContext: queue-call-to-agents
LocalTwoExten: 120
LocalTwoPriority: 1
LocalTwoUniqueid: 1648043117.261
LocalTwoLinkedid: 1648043117.259
Context: queue-call-to-agents
Exten: 120
LocalOptimization: No

Event: AgentCalled
Privilege: agent,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
DestChannel: Local/120@queue-call-to-agents-00000037;1
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: 56225940356
DestCallerIDName:
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 755
DestPriority: 1
DestUniqueid: 1648043117.260
DestLinkedid: 1648043117.259
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120

Event: DialBegin
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
DestChannel: Local/120@queue-call-to-agents-00000037;1
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: 56225940356
DestCallerIDName:
DestConnectedLineNum:
DestConnectedLineName:
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 120
DestPriority: 1
DestUniqueid: 1648043117.260
DestLinkedid: 1648043117.259
DialString: Local/120@queue-call-to-agents/n

Event: Newchannel
Privilege: call,all
Channel: PJSIP/120-0000005f
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten: s
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: NewConnectedLine
Privilege: call,all
Channel: PJSIP/120-0000005f
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten: 120
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: DialBegin
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 56225940356
ConnectedLineName:
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
DestChannel: PJSIP/120-0000005f
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: before-connecting-call
DestExten: s
DestPriority: 15
DestUniqueid: 1648043117.262
DestLinkedid: 1648043117.259
DialString: 120/sip:120@192.141.67.4:54354;rinstance=4eeaa4a4192e90ef

Event: Newstate
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 56225940356
CallerIDName:
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259

Event: NewConnectedLine
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 56225940356
CallerIDName:
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259

Event: NewConnectedLine
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259

Event: DeviceStateChange
Privilege: call,all
Device: Local/120@queue-call-to-agents
State: INUSE

Event: DialState
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
DestChannel: Local/120@queue-call-to-agents-00000037;1
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 755
DestPriority: 1
DestUniqueid: 1648043117.260
DestLinkedid: 1648043117.259
DialStatus: RINGING

Event: NewConnectedLine
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: Newstate
Privilege: call,all
Channel: PJSIP/120-0000005f
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten: 120
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: DeviceStateChange
Privilege: call,all
Device: PJSIP/120
State: RINGING

Event: DialState
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
DestChannel: PJSIP/120-0000005f
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: cos-LOCALMOVIL
DestExten: 120
DestPriority: 1
DestUniqueid: 1648043117.262
DestLinkedid: 1648043117.259
DialStatus: RINGING

Event: ExtensionStatus
Privilege: call,all
Exten: 120
Context: extension-hints
Hint: pjsip/120&pjsip/d1.120&pjsip/d2.120&Custom:DND_120
Status: 8
StatusText: Ringing

Event: ExtensionStatus
Privilege: call,all
Exten: Agent120
Context: extension-hints
Hint: pjsip/120&pjsip/d1.120&pjsip/d2.120&Custom:DND_120&Custom:QAGENT
Status: 8
StatusText: Ringing

Event: QueueMemberStatus
Privilege: agent,all
Queue: Q755
MemberName: 120
Interface: Local/120@queue-call-to-agents/n
StateInterface: hint:120@extension-hints
Membership: dynamic
Penalty: 0
CallsTaken: 38
LastCall: 1647894111
LastPause: 0
InCall: 0
Status: 6
Paused: 0
PausedReason:
Ringinuse: 0
Wrapuptime: 0

Event: DialState
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
DestChannel: Local/120@queue-call-to-agents-00000037;1
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 755
DestPriority: 1
DestUniqueid: 1648043117.260
DestLinkedid: 1648043117.259
DialStatus: RINGING

Event: Newstate
Privilege: call,all
Channel: PJSIP/120-0000005f
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten: 120
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: ExtensionStatus
Privilege: call,all
Exten: 120
Context: extension-hints
Hint: pjsip/120&pjsip/d1.120&pjsip/d2.120&Custom:DND_120
Status: 1
StatusText: InUse

Event: ExtensionStatus
Privilege: call,all
Exten: Agent120
Context: extension-hints
Hint: pjsip/120&pjsip/d1.120&pjsip/d2.120&Custom:DND_120&Custom:QAGENT
Status: 1
StatusText: InUse

Event: DeviceStateChange
Privilege: call,all
Device: PJSIP/120
State: INUSE

Event: QueueMemberStatus
Privilege: agent,all
Queue: Q755
MemberName: 120
Interface: Local/120@queue-call-to-agents/n
StateInterface: hint:120@extension-hints
Membership: dynamic
Penalty: 0
CallsTaken: 38
LastCall: 1647894111
LastPause: 0
InCall: 0
Status: 2
Paused: 0
PausedReason:
Ringinuse: 0
Wrapuptime: 0

Event: MixMonitorStart
Privilege: call,all
Channel: PJSIP/120-0000005f
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: sub-perform-recording
Exten: s
Priority: 11
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: DialEnd
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
DestChannel: PJSIP/120-0000005f
DestChannelState: 6
DestChannelStateDesc: Up
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: cos-LOCALMOVIL
DestExten:
DestPriority: 1
DestUniqueid: 1648043117.262
DestLinkedid: 1648043117.259
DialStatus: ANSWER

Event: Newstate
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259

Event: BridgeCreate
Privilege: call,all
BridgeUniqueid: 7544ab50-7bab-4f06-9ae0-893a5841371c
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 0
BridgeVideoSourceMode: none

Event: Newstate
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259

Event: NewCallerid
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: DialEnd
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
DestChannel: Local/120@queue-call-to-agents-00000037;1
DestChannelState: 6
DestChannelStateDesc: Up
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 755
DestPriority: 1
DestUniqueid: 1648043117.260
DestLinkedid: 1648043117.259
DialStatus: ANSWER

Event: MusicOnHoldStop
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: DeviceStateChange
Privilege: call,all
Device: Queue:Q755
State: NOT_INUSE

Event: QueueCallerLeave
Privilege: agent,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
Queue: Q755
Position: 1
Count: 0

Event: DeviceStateChange
Privilege: call,all
Device: Local/120@queue-call-to-agents
State: INUSE

Event: DeviceStateChange
Privilege: call,all
Device: Local/120@queue-call-to-agents
State: INUSE

Event: AgentConnect
Privilege: agent,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
DestChannel: Local/120@queue-call-to-agents-00000037;1
DestChannelState: 6
DestChannelStateDesc: Up
DestCallerIDNum: 120
DestCallerIDName: Ricardo Martinez
DestConnectedLineNum: 56212345678
DestConnectedLineName: 56212345678
DestLanguage: en
DestAccountCode:
DestContext: queue-call-to-agents
DestExten: 755
DestPriority: 1
DestUniqueid: 1648043117.260
DestLinkedid: 1648043117.259
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120
HoldTime: 7
RingTime: 7

Event: BridgeCreate
Privilege: call,all
BridgeUniqueid: 79487b98-9435-4983-929d-f47e49832992
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 0
BridgeVideoSourceMode: none

Event: BridgeEnter
Privilege: call,all
BridgeUniqueid: 79487b98-9435-4983-929d-f47e49832992
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 1
BridgeVideoSourceMode: none
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259

Event: BridgeEnter
Privilege: call,all
BridgeUniqueid: 79487b98-9435-4983-929d-f47e49832992
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 2
BridgeVideoSourceMode: none
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: BridgeEnter
Privilege: call,all
BridgeUniqueid: 7544ab50-7bab-4f06-9ae0-893a5841371c
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 1
BridgeVideoSourceMode: none
Channel: PJSIP/120-0000005f
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten:
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: BridgeEnter
Privilege: call,all
BridgeUniqueid: 7544ab50-7bab-4f06-9ae0-893a5841371c
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 2
BridgeVideoSourceMode: none
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259

Event: HangupRequest
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: BridgeLeave
Privilege: call,all
BridgeUniqueid: 79487b98-9435-4983-929d-f47e49832992
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 1
BridgeVideoSourceMode: none
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259

Event: SoftHangupRequest
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: 755
Priority: 16
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
Cause: 16

Event: BridgeLeave
Privilege: call,all
BridgeUniqueid: 79487b98-9435-4983-929d-f47e49832992
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 0
BridgeVideoSourceMode: none
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259

Event: BridgeDestroy
Privilege: call,all
BridgeUniqueid: 79487b98-9435-4983-929d-f47e49832992
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 0
BridgeVideoSourceMode: none

Event: HangupRequest
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
Cause: 16

Event: Hangup
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;1
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: queue-call-to-agents
Exten: 755
Priority: 1
Uniqueid: 1648043117.260
Linkedid: 1648043117.259
Cause: 16
Cause-txt: Normal Clearing

Event: DeviceStateChange
Privilege: call,all
Device: Local/120@queue-call-to-agents
State: NOT_INUSE

Event: BridgeLeave
Privilege: call,all
BridgeUniqueid: 7544ab50-7bab-4f06-9ae0-893a5841371c
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 1
BridgeVideoSourceMode: none
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259

Event: Hangup
Privilege: call,all
Channel: PJSIP/SIPPROVIDER-0000005e
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: ext-queues
Exten: h
Priority: 2
Uniqueid: 1648043117.259
Linkedid: 1648043117.259
Cause: 16
Cause-txt: Normal Clearing

Event: SoftHangupRequest
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: 120
Priority: 50
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
Cause: 16

Event: DeviceStateChange
Privilege: call,all
Device: PJSIP/SIPPROVIDER
State: NOT_INUSE

Event: BridgeLeave
Privilege: call,all
BridgeUniqueid: 7544ab50-7bab-4f06-9ae0-893a5841371c
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 0
BridgeVideoSourceMode: none
Channel: PJSIP/120-0000005f
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten:
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259

Event: BridgeDestroy
Privilege: call,all
BridgeUniqueid: 7544ab50-7bab-4f06-9ae0-893a5841371c
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator:
BridgeName:
BridgeNumChannels: 0
BridgeVideoSourceMode: none

Event: ExtensionStatus
Privilege: call,all
Exten: 120
Context: extension-hints
Hint: pjsip/120&pjsip/d1.120&pjsip/d2.120&Custom:DND_120
Status: 0
StatusText: Idle

Event: ExtensionStatus
Privilege: call,all
Exten: Agent120
Context: extension-hints
Hint: pjsip/120&pjsip/d1.120&pjsip/d2.120&Custom:DND_120&Custom:QAGENT
Status: 0
StatusText: Idle

Event: Hangup
Privilege: call,all
Channel: PJSIP/120-0000005f
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 120
CallerIDName: Ricardo Martinez
ConnectedLineNum: 56212345678
ConnectedLineName: 56212345678
Language: en
AccountCode:
Context: cos-LOCALMOVIL
Exten:
Priority: 1
Uniqueid: 1648043117.262
Linkedid: 1648043117.259
Cause: 16
Cause-txt: Normal Clearing

Event: DeviceStateChange
Privilege: call,all
Device: PJSIP/120
State: NOT_INUSE

Event: QueueMemberStatus
Privilege: agent,all
Queue: Q755
MemberName: 120
Interface: Local/120@queue-call-to-agents/n
StateInterface: hint:120@extension-hints
Membership: dynamic
Penalty: 0
CallsTaken: 39
LastCall: 1648043160
LastPause: 0
InCall: 0
Status: 1
Paused: 0
PausedReason:
Ringinuse: 0
Wrapuptime: 0

Event: Hangup
Privilege: call,all
Channel: Local/120@queue-call-to-agents-00000037;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 56212345678
CallerIDName: 56212345678
ConnectedLineNum: 120
ConnectedLineName: Ricardo Martinez
Language: en
AccountCode:
Context: sub-local-dialing
Exten: h
Priority: 9
Uniqueid: 1648043117.261
Linkedid: 1648043117.259
Cause: 16
Cause-txt: Normal Clearing

Event: AgentComplete
Privilege: agent,all
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120
HoldTime: 7
TalkTime: 36
Reason: caller

Event: DeviceStateChange
Privilege: call,all
Device: Local/120@queue-call-to-agents
State: NOT_INUSE

Action:Logoff

Response: Goodbye
Message: Thanks for all the fish.

Connection closed by foreign host.

Also posted at: AMI Event without data - #4 by jcolp - Asterisk APIs - Asterisk Community

1 Like

Hi.
I posted that. Is a very close issue, not the same… but close.
I’m wondering if an issue with VitalPBX should be addressed by the VitalPBX developers… or i need to open a ticket with the Asterisk directly. Seems to me more obvious that VitalPBX developers could address this issue, maybe (just maybe) the problem is related with a miss configured dialplan? or queue??.. don’t know. Is this ok?
Thanks!

Depending on what you are trying to achieve, you can use the “Hangup” event to get the additional information or for executing a specific action in your application.

Indeed.
Finally i ended up using the event “Hangup” with a lot of “ifs” to match the “Queue Call”, but at least this Event is totally consistent with not missing the “Uniqueid” and “Linkedid” parameters… even though I do miss a few parameters like “Talk Time” and “Reason” (meaning who hangup the call), but i think i can live with that.
Anyway, i think this is a issue that should be reported to the Asterisk issue tracker by VitalPBXs developers, if that if the case please let me know!.
Thanks,
Ricardo

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.