Проблема логирования при входящих звонках.
Иногда несколько внутренних номеров имеют статус ANSWERED при том что по факту такого числа ответов точно не было.
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: extensions.conf
[Incoming]
exten => s,1,wait(2)
exten => номер1,1,GoTo(Incoming-1,s,1)
exten => номер2,1,GoTo(Incoming-2,s,1)
exten => номер3,1,GoTo(Incoming-3,s,1)
exten => номер4,1,GoTo(Incoming-4,s,1)
[Incoming-2]
exten => s,1,wait(1)
exten => s,n,Answer()
exten => s,n,Set(MPATH=/opt/records_mp3/номер2)
exten => s,n,GotoIfTime(22:00-08:00,*,*,*?Incoming-night,s,1)
exten => s,n,GoTo(t,2)
exten => _#,1,NoOp(Прослушать сообщения снова)
exten => _#,n,Goto(Incoming-2,s,restart)
exten => _1,1,NoOp(блаблабла)
exten => _1,n,Set(RECORDING=1)
exten => _1,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => _1,n,Dial(SIP/1003&SIP/2001&SIP/4001&SIP/4002&SIP/1004&SIP/4415,,tTgm)
exten => _1,n,Hangup()
exten => _2,1,NoOp(блаблабла)
exten => _2,n,Set(RECORDING=1)
exten => _2,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => _2,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,,tTgm)
exten => _2,n,Hangup()
exten => _3,1,NoOp(блаблабла)
exten => _3,n,Set(RECORDING=1)
exten => _3,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => _3,n,Dial(SIP/1002&SIP/2001&SIP/1004,,tTgm)
exten => _3,n,Hangup()
exten => i,1,Dial(SIP/1003&SIP/4415&SIP/4001&SIP/4002&SIP/1004)
exten => t,1,NoOp(Входящий звонок на номер номер2)
exten => t,n(blablabla),Set(RECORDING=1)
exten => t,n,Set(EXTEN=номер2)
exten => t,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => t,n,Dial(SIP/1003&SIP/2001&SIP/1004,12,tTgm)
exten => t,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answer)
exten => t,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm)
exten => t,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answer)
exten => t,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,55,tTgm)
exten => t,n,PlayBack(${SPATH}/hangup)
exten => t,n(answer),NoOp(Звонок завершен)
exten => t,n,Hangup()
exten => s,1,wait(2)
exten => номер1,1,GoTo(Incoming-1,s,1)
exten => номер2,1,GoTo(Incoming-2,s,1)
exten => номер3,1,GoTo(Incoming-3,s,1)
exten => номер4,1,GoTo(Incoming-4,s,1)
[Incoming-2]
exten => s,1,wait(1)
exten => s,n,Answer()
exten => s,n,Set(MPATH=/opt/records_mp3/номер2)
exten => s,n,GotoIfTime(22:00-08:00,*,*,*?Incoming-night,s,1)
exten => s,n,GoTo(t,2)
exten => _#,1,NoOp(Прослушать сообщения снова)
exten => _#,n,Goto(Incoming-2,s,restart)
exten => _1,1,NoOp(блаблабла)
exten => _1,n,Set(RECORDING=1)
exten => _1,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => _1,n,Dial(SIP/1003&SIP/2001&SIP/4001&SIP/4002&SIP/1004&SIP/4415,,tTgm)
exten => _1,n,Hangup()
exten => _2,1,NoOp(блаблабла)
exten => _2,n,Set(RECORDING=1)
exten => _2,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => _2,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,,tTgm)
exten => _2,n,Hangup()
exten => _3,1,NoOp(блаблабла)
exten => _3,n,Set(RECORDING=1)
exten => _3,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => _3,n,Dial(SIP/1002&SIP/2001&SIP/1004,,tTgm)
exten => _3,n,Hangup()
exten => i,1,Dial(SIP/1003&SIP/4415&SIP/4001&SIP/4002&SIP/1004)
exten => t,1,NoOp(Входящий звонок на номер номер2)
exten => t,n(blablabla),Set(RECORDING=1)
exten => t,n,Set(EXTEN=номер2)
exten => t,n,Macro(recording,${CALLERID(num)},${EXTEN})
exten => t,n,Dial(SIP/1003&SIP/2001&SIP/1004,12,tTgm)
exten => t,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answer)
exten => t,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm)
exten => t,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answer)
exten => t,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,55,tTgm)
exten => t,n,PlayBack(${SPATH}/hangup)
exten => t,n(answer),NoOp(Звонок завершен)
exten => t,n,Hangup()
НОРМАЛЬНАЯ ЗАПИСЬ:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
calldate clid src dst dcontext channel dstchannel lastapp lastdata duration billsec disposition
03.04.2018 14:09:52 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/2001-00000a5e Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 4 4 NO ANSWER
03.04.2018 14:09:52 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/1004-00000a5d Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 4 4 NO ANSWER
03.04.2018 14:09:52 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/1002-00000a5c Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 4 4 NO ANSWER
03.04.2018 14:09:28 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/1001-00000a5b Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 94 94 ANSWERED
03.04.2018 14:11:02 "****" <****> **** t Incoming-1 SIP/****-00000a56 Hangup 0 0 ANSWERED
03.04.2018 14:09:52 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/2001-00000a5e Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 4 4 NO ANSWER
03.04.2018 14:09:52 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/1004-00000a5d Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 4 4 NO ANSWER
03.04.2018 14:09:52 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/1002-00000a5c Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 4 4 NO ANSWER
03.04.2018 14:09:28 "****" <****> **** t Incoming-1 SIP/****-00000a56 SIP/1001-00000a5b Dial SIP/1001&SIP/1002&SIP/1004&SIP/1005&SIP/2001,12,tTgm 94 94 ANSWERED
03.04.2018 14:11:02 "****" <****> **** t Incoming-1 SIP/****-00000a56 Hangup 0 0 ANSWERED
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
id calldate clid src dst dcontext channel dstchannel lastapp lastdata duration billsec disposition uniqueid
336 000 03.04.2018 13:26:53 "****" <****> **** t Incoming-RSM SIP/****-000009b5 Hangup 0 0 ANSWERED 1522751092.16666
335 991 03.04.2018 13:24:52 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1003-000009b6 Dial SIP/1003&SIP/2001&SIP/1004,12,tTgm 13 12 NO ANSWER 1522751092.16666
335 992 03.04.2018 13:24:54 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/2001-000009b7 Dial SIP/1003&SIP/2001&SIP/1004,12,tTgm 11 11 NO ANSWER 1522751092.16666
335 993 03.04.2018 13:24:54 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1004-000009b8 Dial SIP/1003&SIP/2001&SIP/1004,12,tTgm 11 11 NO ANSWER 1522751092.16666
335 994 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1003-000009b9 Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 NO ANSWER 1522751092.16666
335 995 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/4415-000009ba Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 996 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/2001-000009bb Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 997 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/4001-000009bc Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 998 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1004-000009bd Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 999 03.04.2018 13:25:11 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1001-000009be Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 101 101 ANSWERED 1522751092.16666
336 000 03.04.2018 13:26:53 "****" <****> **** t Incoming-RSM SIP/****-000009b5 Hangup 0 0 ANSWERED 1522751092.16666
335 991 03.04.2018 13:24:52 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1003-000009b6 Dial SIP/1003&SIP/2001&SIP/1004,12,tTgm 13 12 NO ANSWER 1522751092.16666
335 992 03.04.2018 13:24:54 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/2001-000009b7 Dial SIP/1003&SIP/2001&SIP/1004,12,tTgm 11 11 NO ANSWER 1522751092.16666
335 993 03.04.2018 13:24:54 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1004-000009b8 Dial SIP/1003&SIP/2001&SIP/1004,12,tTgm 11 11 NO ANSWER 1522751092.16666
335 994 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1003-000009b9 Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 NO ANSWER 1522751092.16666
335 995 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/4415-000009ba Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 996 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/2001-000009bb Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 997 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/4001-000009bc Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 998 03.04.2018 13:25:06 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1004-000009bd Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 5 5 ANSWERED 1522751092.16666
335 999 03.04.2018 13:25:11 "****" <****> **** t Incoming-RSM SIP/****-000009b5 SIP/1001-000009be Dial SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm 101 101 ANSWERED 1522751092.16666
Если кратко:
при работе этой строки: exten => t,n,Dial(SIP/1003&SIP/4415&SIP/2001&SIP/4001&SIP/4002&SIP/1004,12,tTgm)
в CDR получается запись что все номера из этой строки имеют статус ANSWERED.
Хотя должен быть один ANSWERED и остальные NO ANSWER
Asterisk 13.1.0~dfsg-1.1ubuntu4.1 built by buildd @ lgw01-13 on a x86_64 running Linux on 2017-04-04 11:28:35 UTC