15.04.2015

IVR-стандартный

Это стандартный IVR  для работы с пачкой виртуальных АТС на одном сервере.
same => n,Set(TIMEOUT(digit)=5)  ; Set Digit Timeout to 5 seconds
same => n,Set(TIMEOUT(response)=5)  ; Set Response Timeout to 10 seconds
same => n,Read(EXT,/sound/${CONTEXT:3}/ivr/name_file,3)
same => n,GotoIf($["${LEN(${EXT})}" = "3"]?vnum)
same => n,GotoIf($["${EXT}" = "1"]?num1)
same => n,GotoIf($["${EXT}" = "2"]?num2)
same => n,GotoIf($["${EXT}" = "3"]?num3)
same => n,GotoIf($["${EXT}" = "4"]?num4)
same => n,GotoIf($["${EXT}" = "5"]?num5)
same => n,GotoIf($["${EXT}" = "6"]?num6)
same => n,Dial(Local/101@out_${CONTEXT:3}/n&Local/102@out_${CONTEXT:3}/n&Local/103@out_${CONTEXT:3}/n)
same => n,Hangup

same => n(num1),Dial(Local/101@out_${CONTEXT:3}/n&Local/102@out_${CONTEXT:3}/n&Local/103@out_${CONTEXT:3}/n)
same => n,Hangup
same => n(num2),Dial(Local/201@out_${CONTEXT:3}/n&Local/202@out_${CONTEXT:3}/n&Local/203@out_${CONTEXT:3}/n)
same => n,Hangup
same => n(num3),Dial(Local/304@out_${CONTEXT:3}/n&Local/305@out_${CONTEXT:3}/n)
same => n,Hangup
same => n(num4),Dial(Local/304@out_${CONTEXT:3}/n&Local/305@out_${CONTEXT:3}/n)
same => n,Hangup

same => n(num5),Dial(Local/303@out_${CONTEXT:3}/n)
same => n,Hangup
          same => n(vnum),Dial(Local/${EXT}@out_${CONTEXT:3}/n)
          same => n,Hangup