๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ansible-playbooks/roles/asterisk/templates/ext_ivr.j2

58 lines
1.2 KiB

; IVR
; 1 - went to IVR
; 2 - pressed a button
; 3 - did not press anything
[ivr-dial]
exten => s,1,Set(CDR(ivr)=2)
same => n,Gosub(inbound-queued,s,1(${ARG1}))
same => n,Hangup()
[ivr-dial-all]
exten => s,1,Set(CDR(ivr)=3)
same => n,Queue(queue-all,inrt,,,,,,pre-call)
[ivr-select]
exten => 1,1,Gosub(ivr-dial,s,1(1))
exten => 2,1,Gosub(ivr-dial,s,1(3))
exten => 3,1,Gosub(ivr-dial,s,1(2))
exten => 4,1,Gosub(ivr-dial,s,1(11))
exten => 5,1,Gosub(ivr-dial,s,1(9))
[ivr]
exten => s,1,Answer(250)
same => n,Set(CDR(ivr)=1)
same => n,Set(TIMEOUT(digit)=3)
same => n,Set(TIMEOUT(response)=3)
same => n,Background(custom/ivr-intro-12-2021,m,,ivr-select)
same => n,WaitExten(3)
same => n,Gosub(ivr-dial-all,s,1)
same => n,Hangup()
[ivr-select-spb]
exten => 1,1,Gosub(ivr-dial,s,1(6))
exten => 2,1,Gosub(ivr-dial,s,1(8))
[ivr-dial-all-spb]
exten => s,1,Set(CDR(ivr)=3)
same => n,Queue(queue-spb,inrt,,,,,,pre-call)
[ivr-spb]
exten => s,1,Answer(250)
same => n,Set(CDR(ivr)=1)
same => n,Set(TIMEOUT(digit)=3)
same => n,Set(TIMEOUT(response)=3)
same => n,Background(custom/ivr-intro-spb,m,,ivr-select-spb)
same => n,WaitExten(3)
same => n,Gosub(ivr-dial-all-spb,s,1)
same => n,Hangup()