Answer the question
In order to leave comments, you need to log in
How to check if a caller is pressing touchtone in Asterisk?
There is Debian 9 with Asterisk installed. When calling to an external number (for example, 400-100), the call is transferred to a group of managers (Internal number 6600), after which it is redistributed according to the algorithm to the first suitable one (number 6601, 6602, 6603, and so on). It is necessary to make it possible to call this 400-100 from any mobile and during the IVR introductory, by pressing, for example, the number 2 in tone dialing, the call would go to internal 9900 (accounting). This is necessary in order not to ask the manager Pasha / Sasha / Slava every time to "transfer the call to the accountant Lena." I can't find any info on how this can be implemented in the dialplan. Are there people who have done this?
Answer the question
In order to leave comments, you need to log in
Like this?
[ivr-menu]
exten => 400100,1,Noop(----IVR-MENU-----)
same => n,Answer
same => n,Set(playFile=/var/lib/asterisk/sounds/ivr)
same => n,Read(varCase,${playFile},1,,3) ;; 1 - ждем ввода одной цифры 3 - ждем 3сек, varCase - переменная в которую попадает цифра IVR
same => n,Goto(${EXTEN},ivr-${varCase})
same => n(ivr-),Queue(managers)
same => n,Hangup()
same => n(ivr-8),Dial(SIP/casa)
same => n,Hangup()
same => n(ivr-9),Dial(SIP/buh)
same => n,Hangup()
context ivr-menu {
400100 => {
Noop(----IVR-MENU-----);
Answer;
Set(playFile=/var/lib/asterisk/sounds/ivr);
Read(ivrCase,${playFile},1,,3);
switch (${ivrCase}) {
case 8:
Dial(SIP/casa);
break;
case 9:
Dial(SIP/buh);
break;
default:
Queue(managers);
break;
}
}
}
We play IVR through Background
The person presses 2 and hits the DIal, which is indicated inexten => 2,1,Dial(SIP/бухгалтерия)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question