All pastes #352896 Raw Edit

Untitled

public text v1 · immutable
·published 2007-02-13 02:02 UTC
rendered paste body
[macro-stdexten];
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;

; exten => s,1,Dial(${ARG2},20)                                 ; Ring the interface, 20 seconds maximum
; test twdx begin
exten => s,1,SetCallerID(${CALLERIDNUM}|a)  ; set callerid while dialing -- required this way for bellcore
exten => s,2,SetCIDName(${CALLERIDNAME}|a)  ; set callerid while dialing -- required this way for bellcore

exten => s,3,Dial(${ARG2},20)           ; Ring the interface, 20 seconds maximum

; exten => s,2,Goto(s-${DIALSTATUS},1)                          ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s,4,Goto(s-${DIALSTATUS},1)                            ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Voicemail(u${ARG1})               ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1)                 ; If they press #, return to start

exten => s-BUSY,1,Voicemail(b${ARG1})                   ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1)                             ; If they press #, return to start

exten => _s-.,1,Goto(s-NOANSWER,1)                              ; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1})                             ; If they press *, send the user into VoicemailMain