Есть ivr настроенный на донабор в группы нажмите 1,2,3, сейчас надо добавить возможность донабора внутреннего номера сотрудника, привожу сам ivr ниже:
exten => s,1,NoOp(Start Promt)
exten => s,n,Answer()
exten => s,n,Background(/usr/share/asterisk/sounds/IVR/privetstvie)
exten => s,n(4),Background(/usr/share/asterisk/sounds/IVR/zakazy)
exten => s,n,Background(/usr/share/asterisk/sounds/IVR/brak)
exten => s,n,Background(/usr/share/asterisk/sounds/IVR/docs)
exten => s,n,Background(/usr/share/asterisk/sounds/IVR/transport)
exten => s,n,Background(/usr/share/asterisk/sounds/IVR/callrec)
exten => s,n(9),WaitExten(5)
exten => s,n,Hangup()
;exten => s,n,GoTo(dial_ivr,0,1)
exten => i,1,GoTo(invalid_number,s,1)
exten => 1,1,GoTo(dial_ivr,1,1)
exten => 2,1,GoTo(dial_ivr,2,1)
exten => 3,1,GoTo(dial_ivr,3,1)
exten => 4,1,GoTo(dial_ivr,4,1)
exten => _XXXX,1,Dial(SIP/${EXTEN}) дописал но не работает.
[dial_ivr]
exten => 1,1,NoOp(Call to group phones 5008-5011)
exten => 1,n,NoOp(the retry count)
exten => 1,n,Set(COUNT1=$[${COUNT1}-1])
exten => 1,n,GoTo(dial_ivr,1100,1)
exten => 1100,1,Macro(recording)
exten => 1100,n,Queue(1100,n,tT,r)
exten => 1100,n,GotoIf($[${COUNT1} > 0]?:exit)
exten => 1100,n,Playback(/usr/share/asterisk/sounds/IVR/busy)
exten => 1100,n,GoTo(dial_ivr,1,1)
exten => 1100,n(exit),Hangup()
и так далее до кнопки 4. Когда набираю четырехзначный номер сотрудника 5036 выдает в cli следующее:
Goto (IVR,s,1)
-- Executing [s@IVR:1] NoOp("SIP/SIP-TRUNK-0001f90b", "Start Promt") in new stack
Executing [s@IVR:2] Answer("SIP/SIP-TRUNK-0001f90b", "") in new stack
> 0x7f1ba40d4110 -- Probation passed - setting RTP source address to 85.90.97.5:10062
Executing [s@IVR:3] BackGround("SIP/SIP-TRUNK-0001f90b", "/usr/share/asterisk/sounds/IVR/privetstvie") in new stack
-- <SIP/SIP-TRUNK-0001f90b> Playing '/usr/share/asterisk/sounds/IVR/privetstvie.ulaw' (language 'en')
[Aug 17 08:37:04] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '5' received on SIP/SIP-TRUNK-0001f90b, duration 250 ms
[Aug 17 08:37:04] DTMF[4436][C-0000c5be]: channel.c:4154 __ast_read: DTMF end passthrough '5' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:04] DTMF[4436][C-0000c5be]: channel.c:4170 __ast_read: DTMF begin '5' received on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:04] DTMF[4436][C-0000c5be]: channel.c:4174 __ast_read: DTMF begin ignored '5' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '5' received on SIP/SIP-TRUNK-0001f90b, duration 459 ms
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4154 __ast_read: DTMF end passthrough '5' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4170 __ast_read: DTMF begin '0' received on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4174 __ast_read: DTMF begin ignored '0' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '0' received on SIP/SIP-TRUNK-0001f90b, duration 250 ms
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4154 __ast_read: DTMF end passthrough '0' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '0' received on SIP/SIP-TRUNK-0001f90b, duration 25 ms
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4154 __ast_read: DTMF end passthrough '0' on SIP/SIP-TRUNK-0001f90b
CDR updated on SIP/SIP-TRUNK-0001f90b
-- Executing [5500@IVR:1] Dial("SIP/SIP-TRUNK-0001f90b", "SIP/5500") in new stack
[Aug 17 08:37:05] WARNING[4436][C-0000c5be]: chan_sip.c:6160 create_addr: Purely numeric hostname (5500), and not a peer--rejecting!
[Aug 17 08:37:05] WARNING[4436][C-0000c5be]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
Everyone is busy/congested at this time (1:0/0/1)
Auto fallthrough, channel 'SIP/SIP-TRUNK-0001f90b' status is 'CHANUNAVAIL'
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4170 __ast_read: DTMF begin '0'
received on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4181 __ast_read: DTMF begin passthrough '0' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '0' received on SIP/SIP-TRUNK-0001f90b, duration 114 ms
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4125 __ast_read: DTMF end accepted with begin '0' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:05] DTMF[4436][C-0000c5be]: channel.c:4154 __ast_read: DTMF end passthrough '0' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4170 __ast_read: DTMF begin '3' received on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4181 __ast_read: DTMF begin passthrough '3' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '3' received on SIP/SIP-TRUNK-0001f90b, duration 250 ms
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4125 __ast_read: DTMF end accepted with begin '3' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4140 __ast_read: DTMF end '3' detected to have actual duration 45 on the wire, emulation will be triggered on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4147 __ast_read: DTMF end '3' has duration 45 but want minimum 80, emulating on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '3' received on SIP/SIP-TRUNK-0001f90b, duration 25 ms
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4248 __ast_read: DTMF end emulation of '3' queued on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '3' received on SIP/SIP-TRUNK-0001f90b, duration 25 ms
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4111 __ast_read: DTMF begin emulation of '3' with duration 80 queued on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4170 __ast_read: DTMF begin '3' received on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4174 __ast_read: DTMF begin ignored '3' on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4248 __ast_read: DTMF end emulation of '3' queued on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '3' received on SIP/SIP-TRUNK-0001f90b, duration 216 ms
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4111 __ast_read: DTMF begin emulation of '3' with duration 216 queued on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4248 __ast_read: DTMF end emulation of '3' queued on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4084 __ast_read: DTMF end '6' received on SIP/SIP-TRUNK-0001f90b, duration 250 ms
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4111 __ast_read: DTMF begin emulation of '6' with duration 250 queued on SIP/SIP-TRUNK-0001f90b
[Aug 17 08:37:06] DTMF[4436][C-0000c5be]: channel.c:4248 __ast_read: DTMF end emulation of '6' queued on SIP/SIP-TRUNK-0001f90b
== Spawn extension (CSS-MOBILE, 5004, 3) exited non-zero on 'SIP/SIP-TRUNK-0001f904'
== MixMonitor close filestream (mixed)
Подскажите в чем проблема и куда копать, уже всю голову сломал.
Проверил Logger, DTMF debug вроде включен console => notice,warning,error,dtmf . При звонке и донаборе в cli пишет так
<sip sip-trunk-0001fdd2=""> Playing '/usr/share/asterisk/sounds/IVR/brak.ulaw' (language 'en')
-- Timeout on SIP/SIP-TRUNK-0001fdd0, continuing...
-- Executing [s@IVR:10] Hangup("SIP/SIP-TRUNK-0001fdd0", "") in new stack
== Spawn extension (IVR, s, 10) exited non-zero on 'SIP/SIP-TRUNK-0001fdd0'
-- Executing [s@IVR:6] BackGround("SIP/SIP-TRUNK-0001fdd2", "/usr/share/asterisk/sounds/IVR-GMT/docs") in new stack
-- <SIP/SIP-TRUNK-0001fdd2> Playing '/usr/share/asterisk/sounds/IVR/docs.ulaw' (language 'en')
== CDR updated on SIP/SIP-TRUNK-0001fdd1
-- Executing [3333@IVR:1] Dial("SIP/SIP-TRUNK-0001fdd1", "SIP/3333") in new stack
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'SIP/SIP-TRUNK-0001fdd1' status is 'CHANUNAVAIL'
В настройках транка не нашел указания о использовании DTMF, настройки sip trunk type=peer host=xx.xx.xx.xxx context=INCOMING-SIP-TRUNK nat=no insecure = invite,port nat = no canreinvite = no qualify=yes allow=alaw allow=ulaw
Может стоит прописать DTMF?
Задан: 2017-08-17 17:50:06 +0400
Просмотрен: 401 раз
Обновлен: Aug 18 '17
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.
у меня глаза сломались от вашего форматирования. покажите вывод dialplan show 5036@IVR почему вы пишите, что набираете 5036, а в консоли идет вызов SIP/5500?
someuserman ( 2017-08-17 18:20:19 +0400 )редактироватьВот о чем и речь, я набираю 5036, а вижу, что вызов пытается идти 5000 пост отредактировал, можно прочитать.
needitinfo ( 2017-08-17 18:24:10 +0400 )редактироватьСтало лучше, но всё равно не очень. Почему 5500@IVR когда "набираю четырехзначный номер сотрудника 5036" ?
someuserman ( 2017-08-17 18:24:54 +0400 )редактироватьТогда dialplan show 5036@IVR
someuserman ( 2017-08-17 18:25:14 +0400 )редактироватьи включите дебаг dtmf
someuserman ( 2017-08-17 18:27:23 +0400 )редактироватьв dialplan на номер 5036 нет нечего, я не могу понять почему у меня донабор подставляет 000, в global есть описание count1=2 и так до 4х, и есть проверка правильности тонального набора exten => i,1,GoTo(invalid_number,s,1)
который обрабатывается в [invalid_number]
exten => s,1,NoOp(Not a valid number)
exten => s,n,GotoIf($[${COUNTs} > 0]?:exit)
exten => s,n,NoOp(the retry count)
exten => s,n,Set(COUNTs=$[${COUNTs}-1])
exten => s,n,GoTo(IVR,s,4)
exten => s,n(exit),Hangup()
needitinfo ( 2017-08-17 18:34:03 +0400 )редактироватьdebag включу уже завтра, сейчас уехал с работы.
needitinfo ( 2017-08-17 18:35:44 +0400 )редактироватьВыложите свой дебаг так же как и текущий лог - вопрос будет закрыт.
zzuz ( 2017-08-17 19:10:37 +0400 )редактироватьРазбирайтесь с dtmfmode на устройствах. Проблема в DTMF .
zzuz ( 2017-08-17 19:11:20 +0400 )редактироватьРазобрался вроде. В sip.conf в general dtmfmode=auto было прописано, сменил на dtmfmode=info и вызов пошел туда куда надо. Наблюдаю за работой. Всем большое спасибо за помощь.
needitinfo ( 2017-08-18 12:13:30 +0400 )редактировать