Asterisk AMI Event AgentComplete 不完整
我正在使用 AMi 连接到我的 Asterisk 盒子 (18.6.0) 并捕获一些我需要处理的事件。特别是,当代理应答队列中的呼叫时,我需要捕获两个事件,为此我使用“事件:AgentConnect”,其中包含有关已应答呼叫的大量信息。 我需要捕获代理(或呼叫者)何时挂断呼叫。为此,我使用“事件:AgentComplete”。 问题是
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
,对于某些调用,事件 AgenComplete 没有所有信息,它甚至没有“Uniqueid”或“Linkedid”...这是匹配初始调用的问题。这是一个例子:
Event: AgentComplete
Privilege: agent,all
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120
HoldTime: 8
TalkTime: 37
Reason: agent
到目前为止,我能够通过超过 30 秒的调用来一致地重现“问题”。因此,对于 30 秒以内的呼叫,“AgentComplete”事件包含所有信息,但对于超过 30 秒的呼叫,AgentComplete 事件会丢失大量信息。
这里可能发生什么?
感谢您的帮助!
I'm using AMi to connect to my Asterisk box (18.6.0) and capture some events that i need to process. In particular i need to capture two events, when an agent answer a call in a queue, for this i'm using "Event: AgentConnect" which has a lot of inofrmation about the answered call.
And i need to capture when the call is Hangup by the agent (or the caller). For this i'm using "Event: AgentComplete". which is something like this:
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
The problem is that for certain calls the event AgenComplete does not have all the information, it does not even has the "Uniqueid" or the "Linkedid"... which is s problem to match the initial call. This is an example :
Event: AgentComplete
Privilege: agent,all
Queue: Q755
Interface: Local/120@queue-call-to-agents/n
MemberName: 120
HoldTime: 8
TalkTime: 37
Reason: agent
So far i was able to reproduce the "problem" consistently by having calls for more than 30 second up. So, for calls under 30 seconds the event "AgentComplete" has all the information, but for calls over 30 seconds the AgentComplete event is missing a lot of info.
What could be happening here?
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
星号中的每个事件都应该有 uniqueid 字段。
如果您没有看到该字段,则说明您的库或程序有问题。如果您看到它,您始终可以根据 uniqueid 从加入事件中捕获信息。
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.