Код: Выделить всё
[macro-outisbusy]
include => macro-outisbusy-custom
exten => s,1,Progress
exten => s,n,GotoIf($["${EMERGENCYROUTE}" = "YES"]?emergency,1)
exten => s,n,GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?intracompany,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "1"]?unallocated,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "18"]?noanswer,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "19"]?noanswer,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "21"]?noanswer,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "34"]?busynow,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "38"]?unallocated,1)
exten => s,n,GotoIf($["${HANGUPCAUSE}" = "27"]?unallocated,1)
exten => s,n,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => s,n,Congestion(20)
exten => s,n,Hangup
exten => noanswer,1,Playback(nomer&ne-otvechaet, noanswer)
exten => noanswer,n,Congestion(20)
exten => noanswer,n,Hangup
exten => unallocated,1,Playback(pbx-invalid&an-error-has-occured, noanswer)
exten => unallocated,n,Saynumber(${HANGUPCAUSE})
exten => unallocated,n,Congestion(20)
exten => unallocated,n,Hangup
exten => busynow,1,Playback(all-circuits-busy-now&pls-try-call-later&an-error-has-occured, noanswer)
exten => busynow,n,Saynumber(${HANGUPCAUSE})
exten => busynow,n,Congestion(20)
exten => busynow,n,Hangup
exten => intracompany,1,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => intracompany,n,Congestion(20)
exten => intracompany,n,Hangup
exten => emergency,1,Playback(all-circuits-busy-now&pls-try-call-later)
exten => emergency,n,Congestion(20)