Можно ли как-то однозначно связать AMI команду Originate со всеми порожденными этой командой событиями которые прилетают в AMI канал, такие как Newchannel, NewConnectedLine и т.д. ?
Asterisk 20.1
Пример команды Originate для соединения добавочного = 10000 с мобилой = 89001112233 с КоллерИД = 74990001122:
[Показать] Спойлер:
Action: Originate
Channel: PJSIP/10000
Context: pstn-out
Exten: 89001112233
Priority: 1
Callerid: 74990001122
Timeout: 30000
Account: 123123
ActionId: SDY4-12837-123878782
Channel: PJSIP/10000
Context: pstn-out
Exten: 89001112233
Priority: 1
Callerid: 74990001122
Timeout: 30000
Account: 123123
ActionId: SDY4-12837-123878782
Ниже вывод событий AMI порожденных командой Originate с параметрами как указано выше (Тут добавочный 10000 сразу сбросил вызов как только пришел звонок):
[Показать] Спойлер:
Event: Newchannel
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Event: NewAccountCode
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
OldAccountCode:
Event: NewCallerid
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
Event: NewConnectedLine
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Event: DialBegin
Privilege: call,all
DestChannel: PJSIP/10000-000000a7
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: 74990001122
DestCallerIDName: <unknown>
DestConnectedLineNum: 74990001122
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 123123
DestContext: pstn-out
DestExten: s
DestPriority: 1
DestUniqueid: 1685606276.305
DestLinkedid: 1685606276.305
DialString: 10000
Event: Newstate
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Event: DialState
Privilege: call,all
DestChannel: PJSIP/10000-000000a7
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 74990001122
DestCallerIDName: <unknown>
DestConnectedLineNum: 74990001122
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 123123
DestContext: pstn-out
DestExten: s
DestPriority: 1
DestUniqueid: 1685606276.305
DestLinkedid: 1685606276.305
DialStatus: RINGING
Event: HangupRequest
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Cause: 17
Event: DialEnd
Privilege: call,all
DestChannel: PJSIP/10000-000000a7
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 74990001122
DestCallerIDName: <unknown>
DestConnectedLineNum: 74990001122
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 123123
DestContext: pstn-out
DestExten: s
DestPriority: 1
DestUniqueid: 1685606276.305
DestLinkedid: 1685606276.305
DialStatus: BUSY
Event: Newchannel
Privilege: call,all
Channel: OutgoingSpoolFailed
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: failed
Priority: 1
Uniqueid: 1685606278.306
Linkedid: 1685606278.306
Event: Hangup
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Cause: 17
Cause-txt: User busy
Event: SoftHangupRequest
Privilege: call,all
Channel: OutgoingSpoolFailed
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: failed
Priority: 1
Uniqueid: 1685606278.306
Linkedid: 1685606278.306
Cause: 16
Event: Hangup
Privilege: call,all
Channel: OutgoingSpoolFailed
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: failed
Priority: 2
Uniqueid: 1685606278.306
Linkedid: 1685606278.306
Cause: 0
Cause-txt: Unknown
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Event: NewAccountCode
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
OldAccountCode:
Event: NewCallerid
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
Event: NewConnectedLine
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Event: DialBegin
Privilege: call,all
DestChannel: PJSIP/10000-000000a7
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: 74990001122
DestCallerIDName: <unknown>
DestConnectedLineNum: 74990001122
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 123123
DestContext: pstn-out
DestExten: s
DestPriority: 1
DestUniqueid: 1685606276.305
DestLinkedid: 1685606276.305
DialString: 10000
Event: Newstate
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Event: DialState
Privilege: call,all
DestChannel: PJSIP/10000-000000a7
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 74990001122
DestCallerIDName: <unknown>
DestConnectedLineNum: 74990001122
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 123123
DestContext: pstn-out
DestExten: s
DestPriority: 1
DestUniqueid: 1685606276.305
DestLinkedid: 1685606276.305
DialStatus: RINGING
Event: HangupRequest
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Cause: 17
Event: DialEnd
Privilege: call,all
DestChannel: PJSIP/10000-000000a7
DestChannelState: 5
DestChannelStateDesc: Ringing
DestCallerIDNum: 74990001122
DestCallerIDName: <unknown>
DestConnectedLineNum: 74990001122
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 123123
DestContext: pstn-out
DestExten: s
DestPriority: 1
DestUniqueid: 1685606276.305
DestLinkedid: 1685606276.305
DialStatus: BUSY
Event: Newchannel
Privilege: call,all
Channel: OutgoingSpoolFailed
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: failed
Priority: 1
Uniqueid: 1685606278.306
Linkedid: 1685606278.306
Event: Hangup
Privilege: call,all
Channel: PJSIP/10000-000000a7
ChannelState: 5
ChannelStateDesc: Ringing
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: 74990001122
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: s
Priority: 1
Uniqueid: 1685606276.305
Linkedid: 1685606276.305
Cause: 17
Cause-txt: User busy
Event: SoftHangupRequest
Privilege: call,all
Channel: OutgoingSpoolFailed
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: failed
Priority: 1
Uniqueid: 1685606278.306
Linkedid: 1685606278.306
Cause: 16
Event: Hangup
Privilege: call,all
Channel: OutgoingSpoolFailed
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: 74990001122
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 123123
Context: pstn-out
Exten: failed
Priority: 2
Uniqueid: 1685606278.306
Linkedid: 1685606278.306
Cause: 0
Cause-txt: Unknown
Заранее спасибо за помощь