Auto Att Dial to diff chan


#1

I would like callers to be able to dial known extension from my Auto Attendant… "If you know your parties extension, you may dial it now."
Works fine if all extensios are the same type. How can I Dial some Sip, some Sccp and a few Zap?
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,SetMusicOnHold(internal)
exten => s,4,DigitTimeout,2
exten => s,5,ResponseTimeout,10
exten => s,6,Background(/tmp/main_auto_att)
exten => s,7,NoOP,${EXTEN}

;dial collected extension
exten => _1XXX,1,Dial(sip/${EXTEN},10,r) ;;; needs to allow all types!
exten => _1XXX,2,SayDigits(${EXTEN})
exten => _1XXX,3,Playback(vm-isunaval)
exten => _1XXX,4,VoiceMail(u${EXTEN})


#2

Got it using the GotoIf cmd.
have to test for extension numbers in the AA.

exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,SetMusicOnHold(default)
exten => s,4,DigitTimeout,2
exten => s,5,ResponseTimeout,10
exten => s,6,Background(/tmp/main_auto_att)
exten => s,7,NoOP,${EXTEN}

;dial collected extension

exten => _1XXX,1,Playback(transfer)
exten => _1XXX,2,ResponseTimeout(1)
exten => _1XXX,3,NoOp(${EXTEN})
exten => _1XXX,4,GotoIf($[${EXTEN} = 1253]?7:5) ;; will have to test for all extensions, maybe put all types in a range?
exten => _1XXX,5,Macro(sipexten,${EXTEN},${EXTEN})
exten => _1XXX,6,Hangup
exten => _1XXX,7,Dial(Zap/1-1,3,rTt)
exten => _1XXX,8,Hangup