[Asterisk-Users] Problem with extensions and when channel is
unavailable
Jean-Yves Avenard
jean-yves.avenard at hydrix.com
Sun May 15 03:36:44 MST 2005
Hello
I used to have an extension like this which worked fine with asterisk
1.0.7
I first dial to see if an IAX phone is present, if not I would try on
SIP instead
exten=s,1,Dial(IAX2/iax${ARG3},20,tr) ; 20sec timeout
exten=s,2,Goto(s-${DIALSTATUS},1)
; Default action
exten=s,200,DBget(temp=CFBS/${ARG1}) ; Get CFBS key, if not
existing, goto 301
exten=s,201,Dial(Local/${temp}@sip-transfer/n) ; Forward on unavailable
exten=s,202,VoiceMail,u${ARG2}
exten=s,203,hangup()
exten=s,301,Goto(202) ; entry doesn't exist -> Voicemail
exten=s-CHANUNAVAIL,1,Goto(s,400)
exten=s-CONGESTION,1,Goto(s,200)
exten=s-NOANSWER,1,Goto(s,200)
exten=s-.,1,Goto(s,200)
;Now try SIP
exten=s,400,Dial(SIP/ipp${ARG3},20,tr) ; 20sec timeout
exten=s,401,Goto(s2-${DIALSTATUS},1)
exten=s2-CHANUNAVAIL,1,Goto(s,200)
exten=s2-CONGESTION,1,Goto(s,200)
exten=s2-NOANSWER,1,Goto(s,200)
exten=s2-.,1,Goto(s,200)
If the IAX channel didn't exist or wasn't connected, it would jump to
s-CHANUNAVAIL which jumps to priority 400 and try SIP
In CVS-HEAD it now goes to s-CONGESTION which is definitely not what
I want as it goes in this case to voicemail
s-DIALSTATUS has changed now? is there a documentation on how it
should work now?
Jean-Yves
---
Jean-Yves Avenard
Hydrix Pty Ltd - Embedding the net
www.hydrix.com | fax +61 3 95722686 | office +61 3 8573 5299 | direct
+61 3 8573 5200
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050515/c9363e61/attachment.htm
More information about the asterisk-users
mailing list