Asterisk 1.6 (AsteriskNow)
Нужно добавить IVR c несколькими очередями и возможностью ввести внутренний номер. В зависимости от выбранной цифры абонент отправляется в свою очередь или может сразу набрать внутренний номер. Если выбор не сделан, то автоматически перебрасывается в очередь на оператора.
С очередями проблем особых не возникло(если не считать, что приветствие тоже записывается).
Добавочный номер тоже работает, но звонит абсолютно на все номера, которые вводятся. Добавил проверку, но она все равно не работает.
Вот кусок меню:
exten => 9999,1,Answer()
exten => 9999,n,Background(ivr/ivrMainMenu)
exten => 9999,n,WaitExten(3)
exten => 1,1,Queue(promotion,30,t)
exten => 1,n,Hangup()
exten => 2,1,Queue(sales,30,t)
exten => 2,n,Hangup()
exten => 3,1,Queue(accounting,30,t)
exten => 3,n,Hangup()
exten => _NXX,1,Dial(SIP/${EXTEN:-3:3})
exten => _X.,n,Hangup()
;exten => i,1,Playback(pbx-invalid)
;exten => i,n,Goto(ofis_aut,333,1)
exten => i,1,Queue(operators,30,t)
exten => t,1,Queue(operators,30,t)
_________________
Intel Core 2 Duo E6400 @ 2.40GHz / 6Gb / 160Gb || Gentoo Linux || Asterisk 11.2-cert1
Решения телефонии на базе Asterisk || http://it-need.ru
Надо так:
| Код: |
| exten => 101,1,Dial(SIP/101) exten => 102,1,Dial(SIP/102) exten => 105,1,Dial(SIP/105) |
И кроме этих трех добавочных, никуда донабрать не смогут.
_________________
Intel Core 2 Duo E6400 @ 2.40GHz / 6Gb / 160Gb || Gentoo Linux || Asterisk 11.2-cert1
Решения телефонии на базе Asterisk || http://it-need.ru
поэтому я сделал через ${EXTEN}
WaitExten() - Waits for an extension to be entered; gives the caller the opportunity to push a new extension onto the stack.
который сохраняется в ${EXTEN}
сделайте лог звонка когда можете набрать любой номер и все будет видно
Интересно почему номер не обрезается в 3 последние цифры.
Вот лог звонка
| Код: |
| == CDR updated on SIP/206-000073cc -- Executing [0667774449@ofis_aut:1] MixMonitor("SIP/206-000073cc", "20130730-123320_206_0667774449-1375176790.29649.wav,,") in new stack -- Executing [0667774449@ofis_aut:2] Macro("SIP/206-000073cc", "gsm-rand,0667774449") in new stack -- Executing [s@macro-gsm-rand:1] Set("SIP/206-000073cc", "gsm-rand=2") in new stack -- Executing [s@macro-gsm-rand:2] NoOp("SIP/206-000073cc", "2") in new stack -- Executing [s@macro-gsm-rand:3] Dial("SIP/206-000073cc", "SIP/802/20667774449,60,r") in new stack == Begin MixMonitor Recording SIP/206-000073cc == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Called 802/20667774449 -- SIP/802-000073cd is ringing -- SIP/802-000073cd is making progress passing it to SIP/206-000073cc -- SIP/802-000073cd answered SIP/206-000073cc == Spawn extension (macro-gsm-rand, s, 3) exited non-zero on 'SIP/206-000073cc' in macro 'gsm-rand' == Spawn extension (ofis_aut, 0667774449, 2) exited non-zero on 'SIP/206-000073cc' == MixMonitor close filestream == End MixMonitor Recording SIP/206-000073cc |
Вот полная версия:
| Код: |
| == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Executing [9999@ofis_aut:1] Answer("SIP/206-0000748c", "") in new stack -- Executing [9999@ofis_aut:2] BackGround("SIP/206-0000748c", "ivr/ivrMainMenu") in new stack -- Playing 'ivr/ivrMainMenu.slin' (language 'en') == CDR updated on SIP/206-0000748c -- Executing [0667774449@ofis_aut:1] MixMonitor("SIP/206-0000748c", "20130730-140602_206_0667774449-1375182351.29841.wav,,") in new stack -- Executing [0667774449@ofis_aut:2] Macro("SIP/206-0000748c", "gsm-rand,0667774449") in new stack -- Executing [s@macro-gsm-rand:1] Set("SIP/206-0000748c", "gsm-rand=3") in new stack -- Executing [s@macro-gsm-rand:2] NoOp("SIP/206-0000748c", "3") in new stack -- Executing [s@macro-gsm-rand:3] Dial("SIP/206-0000748c", "SIP/803/30667774449,60,r") in new stack == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Called 803/30667774449 == Begin MixMonitor Recording SIP/206-0000748c -- SIP/803-0000748d is ringing == Spawn extension (macro-gsm-rand, s, 3) exited non-zero on 'SIP/206-0000748c' in macro 'gsm-rand' == Spawn extension (ofis_aut, 0667774449, 2) exited non-zero on 'SIP/206-0000748c' == MixMonitor close filestream == End MixMonitor Recording SIP/206-0000748c |
| Код: |
| [ivrMainMenu] include => ofis_aut exten => s,1,Answer() same => n,Background(ivr/ivrMainMenu) same => n,WaitExten(3) exten => 1,1,Playback(transfer) same => n,Queue(promotion,30,t) same => n,Hangup() exten => 2,1,Playback(transfer) same => n,Queue(sales,30,t) same => n,Hangup() exten => 3,1,Playback(transfer) same => n,Queue(accounting,30,t) same => n,Hangup() exten => _NXX,1,Playback(transfer) same => n,Dial(SIP/${EXTEN:-3:3}) same => n,Hangup() exten => i,1,Playback(privacy-incorrect) same => n,Playback(queue-callswaiting) same => n,Queue(operators,30,t) same => n,Hangup() exten => t,1,Queue(operators,30,t) same => n,Hangup() exten => _X.,1,Playback(privacy-incorrect) same => n,Playback(queue-callswaiting) same => n,Queue(operators,30,t) same => n,Hangup() |