xten => s,1,GotoIf(${DB(CF/${ARG1})}?2:3) ;Gets Call Forward Number
exten => s,2,Dial(SIP/${DB(CF/${ARG1})}/n) ;Dials the Forward Number
exten => s,3,Set(${DB(SCFE/${ARG1})=${CALLERIDNUM}) ;Sets the nmbr that if they call in it gets forwarded to another
exten => s,4,GotoIf(${DB(SCFE/${ARG1})}?4:5) ;Get Selective Call Forward Number
exten => s,5,Dial(SIP/${DB(SCFN/${ARG1})}/n) ;Selective Call Forward
exten => s,6,Set(${DB(SCRN/${ARG1})=${CALLERIDNUM}) ;Reads the Database for for nmbrs it should not allow threw.
exten => s,7,GotoIf(${DB(SCRN/${ARG1})}?6:7) ;Get Selective Call Rejection Status
exten => s,8,Macro(fastbusy,s,1) ;Sends Rejected calls to a all extensions are busy macro.
exten => s,9,GotoIf(${DB(ACR/${ARG1})}?8:9) ;Get Anonymous Call Rejection Status
exten => s,10,Macro(fastbusy,s,1) ;Sends anonymous calls to a all extensions are busy macro.
exten => s,11,Set(DNDStatus=DND/${ARG1}) ;Sets the variable for the Do not disturb responce
exten => s,12,GotoIf(${DNDStatus}=YES?117:13) ;Checks the Database for the status/ responce
exten => s,13,Set(${DB(LASTCALL/${ARG1})=${CALLERIDNUM}) ;Places Current call into the Database
exten => s,14,Dial(SIP/${ARG1}|${ARG2}|r) ;Dials the extension and waits for the time out
exten => s,15,GotoIf(${DB(CFNA/${ARG1})}?16:17) ;Call Forwarding On No Answer
exten => s,16,Dial(SIP/${DB(CFNA/${ARG1})}/n) ;Dials the No Answer forward Number
exten => s,17,Voicemail(u${ARG1}) ;Goes to the unavaible Voicemain
exten => s,18,Playback(vm-goodbye)
exten => s,19,Hangup
exten => s,113,GotoIf(${DB(CBB/${ARG1})}?114:115)
exten => s,114,Macro(busy-callback0
exten => s,115,GotoIf(${DB(CFB/${ARG1})}?116:117) ;Gets the Call Forwading On Busy status/number
exten => s,116,Dial(Local/${DB(CFB/${ARG1})}/n) ;Dials the CallForwarding nmber/exten
exten => s,117,Voicemail(b${ARG1}) ;Goes to the Busy Voicemain
exten => s,118,Playback(vm-goodbye)
exten => s,119,Hangup
; Gives tritone + number unassigned message to vacant numbers
exten => i,1,Answer
exten => i,2,Playback(the-number-u-dialed,noanswer)
exten => i,3,SayDigits(${ARG1})
exten => i,4,Playback(not-yet-assigned,noanswer)
exten => i,5,Busy