content: "{{ config.stdout | replace('\\n', '\n') }}"
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout example.key -out example.crt -subj "/CN=myawsdomain.com" \
-addext "subjectAltName=DNS:www.myawsdomain.com,DNS:myawsdomain.com,IP:10.11.10.11"
[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;
}
}
}
// вот простой пример на AEL))
_XXX. => {
Noop(---------CALL-OUT-AEL--------);
Set(lineList=213135;213136)
while (${LEN(${lineList})} > 0) {
Set(OUT_LINE=${CUT(lineList,;,1)});
Set(__lineList=${CUT(lineList,;,2-)});
if("${DEVICE_STATE(SIP/${OUT_LINE})}"="NOT_INUSE") {
Dial(SIP/${EXTEN}@${OUT_LINE},45,T);
if("${DIALSTATUS}"="ANSWER") {HangUp;}
if("${DIALSTATUS}"="BUSY") {HangUp;}
}
}
HangUp;
}
};