This is a bit complicated but it works fine. It is a combination of auto-attendant, personal hidden menu (not announced through the handset to the caller) designed by myself and PIN protected IVR. See if it helps and you understand how to use.- [auto-attendant]
- exten => s,1,GotoIf($[${CALLERID(num)} = 91239123]?bubblestar)
- same => n,GotoIf($[${CALLERID(num)} = 92469246]?ckleea)
- same => n,GotoIf($[${CALLERID(num)} = 91359135]?yhfung)
- same => n,Goto(mainmenu,s,1)
- same => n(bubblestar),Goto(hi-bubblestar,s,1)
- same => n(ckleea),Goto(hi-ckleea,s,1)
- same => n(yhfung),Goto(hi-yhfung,s,1)
- [mainmenu]
- exten => s,1,Background(mainmenu)
- same => n,WaitExten()
- same => n,Hangup()
- exten => 1,1,Goto(viaPSTN,991239123,1) ; dial to bubblestar's Mobile via PSTN directly
- exten => 2,1,Goto(viaPSTN,992469246,1) ; dial to ckleea's Mobile via PSTN directly
- exten => 3,1,Voicemail(3001@default) ; Go to voicemail box
- exten => 8,1,Goto(IVR,s,1) ; hidden menu for personal dial to IVR
- exten => 9,1,Hangup() ; let the caller dials 9 to exit
- exten => 0,1,Goto(mainmenu,s,1) ; let the caller dials 0 to repeat the menu
- exten => i,1,Playback(option-is-invalid)
- same => n,Goto(s,loop)
- exten => t,1,Playback(are-you-still-there)
- same => n,Goto(s,loop)
- [hi-bubblestar]
- exten => s,1,Background(hi-bubblestar)
- same => n,WaitExten()
- same => n,Hangup()
- exten => 1,1,Goto(viaPSTN,991239123,1) ; dial to bubblestar's Mobile via PSTN directly
- exten => 2,1,Goto(viaPSTN,992469246,1) ; dial to ckleea's Mobile via PSTN directly
- exten => 3,1,Voicemail(3001@default) ; Go to voicemail box
- exten => 8,1,Goto(IVR,s,1) ; hidden menu for personal dial to IVR
- exten => 9,1,Hangup() ; let the caller dials 9 to exit
- exten => 0,1,Goto(mainmenu,s,1) ; let the caller dials 0 to repeat the menu
- exten => i,1,Playback(option-is-invalid)
- same => n,Goto(s,loop)
- exten => t,1,Playback(are-you-still-there)
- same => n,Goto(s,loop)
- [hi-ckleea]
- exten => s,1,Background(hi-ckleea)
- same => n,WaitExten()
- same => n,Hangup()
- exten => 1,1,Goto(viaPSTN,991239123,1) ; dial to bubblestar's Mobile via PSTN directly
- exten => 2,1,Goto(viaPSTN,992469246,1) ; dial to ckleea's Mobile via PSTN directly
- exten => 3,1,Voicemail(3001@default) ; Go to voicemail box
- exten => 8,1,Goto(IVR,s,1) ; hidden menu for personal dial to IVR
- exten => 9,1,Hangup() ; let the caller dials 9 to exit
- exten => 0,1,Goto(mainmenu,s,1) ; let the caller dials 0 to repeat the menu
- exten => i,1,Playback(option-is-invalid)
- same => n,Goto(s,loop)
- exten => t,1,Playback(are-you-still-there)
- same => n,Goto(s,loop)
- [hi-yhfung]
- exten => s,1,Background(hi-yhfung]
- same => n,WaitExten()
- same => n,Hangup()
- exten => 1,1,Goto(viaPSTN,991239123,1) ; dial to bubblestar's Mobile via PSTN directly
- exten => 2,1,Goto(viaPSTN,992469246,1) ; dial to ckleea's Mobile via PSTN directly
- exten => 3,1,Voicemail(3001@default) ; Go to voicemail box
- exten => 8,1,Goto(IVR,s,1) ; hidden menu for personal dial to IVR
- exten => 9,1,Hangup() ; let the caller dials 9 to exit
- exten => 0,1,Goto(mainmenu,s,1) ; let the caller dials 0 to repeat the menu
- exten => i,1,Playback(option-is-invalid)
- same => n,Goto(s,loop)
- exten => t,1,Playback(are-you-still-there)
- same => n,Goto(s,loop)
- [IVR]
- exten => _s,1,Wait(1)
- same => n,Authenticate(9999,,4) ; PIN authentication
- same => n,Set(Loop=0)
- same => n,While($[${Loop} < 3])
- same => n,Background(vm-enter-num-to-call)
- same => n,WaitExten(10) ; Wait 10 seconds for user to enter input
- same => n,Set(Loop=$[${Loop}+1])
- same => n(LoopEnd),EndWhile()
- same => n,Playback(vm-goodbye)
- same => n,Hangup() ; No input from user, so hangup
- exten => i,1,Playback(pbx-invalid)
- same => n,Goto(s,7)
- exten => t,1,Playback(vm-goodbye)
- same => n,Hangup()
- exten => h,1,Hangup()
複製代碼 |