;tratar os hangupcase
[macro-outisbusy]
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}” = “17”]?ocupado,1)
exten => s,n,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => s,n,Congestion(20)
exten => s,n,Hangupexten => intracompany,1,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => intracompany,n,Congestion(20)
exten => intracompany,n,Hangupexten => emergency,1,Playback(all-circuits-busy-now&pls-try-call-later)
exten => emergency,n,Congestion(20)
exten => emergency,n,Hangupexten => ocupado,1,Playback(outbusy, noanswer)
exten => ocupado,n,Congestion(20)
exten => ocupado,n,Hanguphttps://groups.google.com/forum/#!msg/elastixbrasil/4lggR85BkWg/sEuzLtNwTTwJ