Страница 1 из 2
Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 13:07
kella
Всем привет.
Столкнулся с проблемой перехода с Астериска 11 на 13 версию, а именно DYNAMIC_FEATURES
приведу конфиг Astera 11 что бы было более понятно.
/etc/asterisk/features.conf
[featuremap]
blindxfer => #9
disconnect => *9
;automon => *1
;atxfer => *2
;parkcall => #72
automixmon => *3
/etc/asterisk/extensions.conf
[globals]
DYNAMIC_FEATURES=automixmon#stopMonitor
[macro-stdexten]
.............
exten => h,n,ExecIf($[ "${TOUCH_MIXMONITOR_OUTPUT}" != "" ]?Agi(agi://127.0.0.1/mixmonitor.php))
............
В 11 астериске после нажатия *3 в логах пишет
User hit '*3' to record call. filename: auto-1508397516-pbx-1508397507.135311
в 13 Астериске при звонке пишет
WARNING[24014][C-00000004]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'automixmon' on channel SIP/3358-0000000e.
[2017-10-19 12:59:44] WARNING[24014][C-00000004]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'stopMonitor' on channel SIP/3358-0000000e.
После нажатия *3 сам разговор пишется.
Begin MixMonitor Recording SIP/3358-00000014
[Oct 19 13:01:02] == MixMonitor close filestream (mixed)
[Oct 19 13:01:02] == Executing [/etc/asterisk/scripts/wav2mp3.sh /var/spool/asterisk/monitor/calls/pbx-1508407257.18.wav]
[Oct 19 13:01:02] == End MixMonitor Recording SIP/4139-00000012
так понимаю что с DYNAMIC_FEATURES в 13 версии что то не так
Или мне сразу в раздел "Бизнес" написать)
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 14:30
fecyt
features.conf
[applicationmap]
; Note that the DYNAMIC_FEATURES channel variable must be set to use the features
; defined here. The value of DYNAMIC_FEATURES should be the names of the features
; to allow the channel to use separated by '#'.
Это описывается тут, если там не задано stopMonitor, вероятно будете получать ошибку, что айтем неизвестен.
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 14:35
kella
Такое тоже делал, вот наглядно сейчас прописал
[applicationmap]
automixmon => *3,self/caller,automixmon
stopMonitor => #3,self/caller,StopMixMonitor
в extensions.conf
DYNAMIC_FEATURES=automixmon#stopMonitor
После нажатия *3 пишет в логах
[2017-10-19 14:33:01] WARNING[24703][C-0000000c]: bridge_channel.c:1106 run_app_helper: Could not find application (automixmon)
[2017-10-19 14:33:01] WARNING[24705][C-0000000c]: bridge_channel.c:1106 run_app_helper: Could not find application (automixmon)
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 15:12
fecyt
А зачем прописывали его в applicationmap, оно же в featuremap есть вроде?
*CLI> core show application automixmon
Your application(s) is (are) not registered
Command 'core show application automixmon' failed.
Уверены, что так должно быть?
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 15:17
kella
Когда я убираю с featuremap то в логах при звонке пишет
[2017-10-19 15:15:10] WARNING[24784][C-0000000e]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'automixmon' on channel SIP/3358-00000026.
[2017-10-19 15:15:10] WARNING[24784][C-0000000e]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'stopMonitor' on channel SIP/3358-00000026.
[Oct 19 15:15:10] -- Channel SIP/3358-00000026 joined 'simple_bridge' basic-bridge <621056c3-5a1b-4b8f-b850-533d1dbfaedc>
[2017-10-19 15:15:10] WARNING[24782][C-0000000e]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'automixmon' on channel SIP/4139-00000024.
[2017-10-19 15:15:10] WARNING[24782][C-0000000e]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'stopMonitor' on channel SIP/4139-00000024.
Очень странно, но на 11 * оно есть именно в
[featuremap]
automixmon => *3
При этом такой ошибки не возникает. Так что я грешу на версии выше 11, возможна там уже не так надо писать...
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 15:47
fecyt
Он и в 13 есть. Я имею ввиду, убрать automixmon из applicationmap, оставить в featuremap. В applicationmap прописать stopMonitor.
Так работает?
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 16:02
kella
Предоставляю весь конфиг features.conf
[general]
parkext => 600
parkpos => 601-629
context => parkedcalls
parkingtime => 300
transferdigittimeout => 3
pickupexten = *8
featuredigittimeout = 1500
atxfernoanswertimeout = 15
[featuremap]
blindxfer => #9 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call!
disconnect => *9 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call!
;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call!
;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call!
;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call!
automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call!
[applicationmap]
nway-start => *0,self/caller,Macro,nway-start
nway-inv => **,self/caller,Macro,nway-ok
nway-noinv => *#,self/caller,Macro,nway-notok
stopMonitor => #3,self/caller,StopMixMonitor
rooms7130 => *16,caller,Macro,room7130-start
rooms7131 => *16,caller,Macro,room7131-start
rooms7132 => *16,caller,Macro,room7132-start
rooms7133 => *16,caller,Macro,room7133-start
/etc/asterisk/extensions.conf
[globals]
DYNAMIC_FEATURES=nway-start#automixmon#stopMonitor#rooms7130
при звонке в логе пишет (часть лога)
[2017-10-19 16:00:13] WARNING[24913][C-00000015]: pbx_variables.c:1096 pbx_builtin_setvar: Set requires an '=' to be a valid assignment.
[Oct 19 16:00:13] -- Executing [s@macro-stdexten:9] ExecIf("SIP/4139-00000035", "0?Set(CDR(accountcode)=SIP/3358)") in new stack
[Oct 19 16:00:13] -- Executing [s@macro-stdexten:10] Set("SIP/4139-00000035", "TOUCH_MIXMONITOR=pbx-1508418013.53") in new stack
[Oct 19 16:00:13] -- Executing [s@macro-stdexten:11] Dial("SIP/4139-00000035", "SIP/3358,60,tkhxTKHrX,") in new stack
[Oct 19 16:00:13] == Using SIP RTP TOS bits 184
[Oct 19 16:00:13] == Using SIP RTP CoS mark 5
[Oct 19 16:00:13] -- Called SIP/3358
[Oct 19 16:00:13] -- SIP/3358-00000037 is ringing
[Oct 19 16:00:15] -- SIP/3358-00000037 answered SIP/4139-00000035
[2017-10-19 16:00:15] WARNING[24915][C-00000015]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'automixmon' on channel SIP/3358-00000037.
[Oct 19 16:00:15] -- Channel SIP/3358-00000037 joined 'simple_bridge' basic-bridge <f78cfff8-3622-4ced-99a6-e781273f0795>
[2017-10-19 16:00:15] WARNING[24913][C-00000015]: features_config.c:1349 ast_get_chan_applicationmap: Unknown DYNAMIC_FEATURES item 'automixmon' on channel SIP/4139-00000035.
[Oct 19 16:00:15] -- Channel SIP/4139-00000035 joined 'simple_bridge' basic-bridge <f78cfff8-3622-4ced-99a6-e781273f0795>
После нажатия *3 пишет
[Oct 19 16:00:21] == Begin MixMonitor Recording SIP/3358-00000037
[Oct 19 16:00:23] -- Channel SIP/4139-00000035 left 'simple_bridge' basic-bridge <f78cfff8-3622-4ced-99a6-e781273f0795>
[Oct 19 16:00:23] -- Channel SIP/3358-00000037 left 'simple_bridge' basic-bridge <f78cfff8-3622-4ced-99a6-e781273f0795>
Запись пишется, сохраняется, НО - не пишет при нажатии "User hit '*3' to record call. filename:"
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 16:47
fecyt
Наверно надо вот так:
[applicationmap]
automixmon => *3,self/caller,MixMonitor
stopMonitor => #3,self/caller,StopMixMonitor
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 16:57
kella
После нажатия *3 следующий лог и с кидает соответственно звонок
(часть лога)
[Oct 19 16:52:18] -- SIP/3358-0000000c is ringing
[Oct 19 16:52:20] -- SIP/3358-0000000c answered SIP/4139-0000000a
[Oct 19 16:52:20] -- Channel SIP/3358-0000000c joined 'simple_bridge' basic-bridge <3aa89a69-9d75-4118-a5cd-a94237b762f4>
[Oct 19 16:52:20] -- Channel SIP/4139-0000000a joined 'simple_bridge' basic-bridge <3aa89a69-9d75-4118-a5cd-a94237b762f4>
[2017-10-19 16:52:22] WARNING[25259][C-00000004]: app_mixmonitor.c:1030 mixmonitor_exec: MixMonitor requires an argument (filename or ,t(filename) and/or r(filename)
[Oct 19 16:52:22] -- Channel SIP/3358-0000000c left 'simple_bridge' basic-bridge <3aa89a69-9d75-4118-a5cd-a94237b762f4>
[Oct 19 16:52:22] -- Channel SIP/4139-0000000a left 'simple_bridge' basic-bridge <3aa89a69-9d75-4118-a5cd-a94237b762f4>
[Oct 19 16:52:22] == Spawn extension (macro-stdexten, s, 11) exited non-zero on 'SIP/4139-0000000a' in macro 'stdexten'
[Oct 19 16:52:22] == Spawn extension (dialplan-default, 3358, 3) exited non-zero on 'SIP/4139-0000000a'
[Oct 19 16:52:22] == MixMonitor close filestream (mixed)
[Oct 19 16:52:22] == Executing [/etc/asterisk/scripts/wav2mp3.sh /var/spool/asterisk/monitor/calls/pbx-1508421138.11.wav,t]
[Oct 19 16:52:22] == End MixMonitor Recording SIP/4139-0000000a
Хотя вроде тут все норм:
[call-record];
.......
exten => _X.,n(record),Set(RECORD_FILENAME=${CALLREC_PREFIX}/${UNIQUEID})
exten => _X.,n,MixMonitor(${RECORD_FILENAME}.wav,b,/etc/asterisk/scripts/wav2mp3.sh ^{MIXMONITOR_FILENAME})
exten => _X.,n,Return
Re: Asterisk 13 + DYNAMIC_FEATURES
Добавлено: 19 окт 2017, 17:48
kella
Мне не подойдет в [applicationmap] прописать
automixmon => *3,self/caller,MixMonitor
так как..
При использовании applicationmap приложения выполняются вне ядра PBX.
Это значит, что такие приложения как Goto, Background, WaitExten и другие, которые должны использовать другие расширения плана набора, не смогут правильно функционировать при вызове из applicationmap.
а у меня выполнения после *3 идет
exten => h,n,ExecIf($[ "${TOUCH_MIXMONITOR_OUTPUT}" != "" ]?Agi(agi://127.0.0.1/mixmonitor.php))