klingon888
Guru
- Joined
- Nov 23, 2007
- Messages
- 90
- Reaction score
- 4
Slight twist to jeremywillden's post :
Found this idea from another site and modified it to suit my needs. Instead of parking the call, it allows the callee to press 1 to accept call, press 2 to send call to VM or press 3 to send "do not call" msg to caller. Hope you find it useful.
Start with NV's original version but redirect to the custom-screen macros below :
[from-external-custom]
exten => s,1,Zapateller(answer|nocallerid)
exten => s,2,Wait(1)
exten => s,3,SetMusicOnHold(default)
exten => s,4,GotoIf($["${CALLERID(num)}" = ""]?custom-screen,s,1)
exten => s,5,GotoIf($["foo${CALLERID(num)}" = "foo"]?custom-screen,s,1)
exten => s,6,GotoIf($["${CALLERID(name):0:9}" = "Anonymous"]?custom-screen,s,1)
exten => s,7,GotoIf($["${CALLERID(name):0:7}" = "Unknown"]?custom-screen,s,1)
exten => s,8,GotoIf($["${CALLERID(num):0:7}" = "Private"]?custom-screen,s,1)
exten => s,9,GotoIf($["${CALLERID(name):0:7}" = "Private"]?custom-screen,s,1)
exten => s,10,GotoIf($["${CALLERID(num):0:10}" = "Restricted"]?custom-screen,s,1)
exten => s,11,GotoIf($["${CALLERID(num):0:4}" = "PSTN"]?custom-screen,s,1)
exten => s,12,Dial(Local/99@from-internal)
exten => s,13,Hangup
[custom-screen]
exten => s,1,Background(privacy-unident)
exten => s,n,Background(vm-rec-name)
exten => s,n,Set(SCREEN_FILE=/tmp/${CALLERID(num)}-${EPOCH})
exten => s,n,Record(${SCREEN_FILE}.gsm|5|8)
exten => s,n,Wait(1)
;added step to discourage telemarketers etc!
exten => s,n,Background(custom/cust-pls-press-one-to-cont) ;record your own msg - pls press one to continue call
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,WaitExten(10,)
;if no response after 10 secs, hang up
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => 1,1,Playback(pls-wait-connect-call)
exten => 1,2,Dial(local/200@from-internal,20,mM(screen^${SCREEN_FILE})) ;replace your extension to ring
exten => 1,3,Goto(s,25) ;goto VM if no one answers
exten => s,25,Background(vm-nobodyavail)
exten => s,26,Goto(ext-local,${VM_PREFIX}200,1) ;replace with your VM ext
exten => s,27,Hangup
exten => s,30,Playback(privacy-stop-calling-not-welcome)
exten => s,31,Playback(goodbye)
exten => s,32,Hangup
exten => h,1,System(/bin/rm ${SCREEN_FILE}.gsm)
;if you have friends who like to block their number, give them a code like 7 to break thru screening at beginning of custom-screen when msg is playing
exten => 7,1,Background(pls-hold-while-try)
exten => 7,n,Goto(ext-group,200,1) ;replace with your ring grp to ring
[macro-screen]
exten => s,1,noop(${ARG1})
exten => s,n,Playback(priv-callpending)
exten => s,n,Playback(${ARG1})
exten => s,n,Wait(1)
;record your own msg - press 1 to connect, 2 to send to VM, 3 to play do not call msg
exten => s,n,Read(ACCEPT|custom/cust-screen-callee-options|1|2|10)
exten => s,n,Gotoif($[${ACCEPT} = 1] ?71) ;connect call
exten => s,n,Gotoif($[${ACCEPT} = 2] ?30) ;reject to vm
exten => s,n,Gotoif($[${ACCEPT} = 3] ?50) ;play pls do not call msg
exten => s,30,Set(MACRO_RESULT=GOTO:custom-screen^s^25)
exten => s,31,Goto(70)
exten => s,50,Set(MACRO_RESULT=GOTO:custom-screen^s^30)
exten => s,51,Goto(70)
exten => s,70,Playback(goodbye)
exten => s,71,System(/bin/rm ${ARG1}.gsm)
exten => h,1,System(/bin/rm ${ARG1}.gsm)
Found this idea from another site and modified it to suit my needs. Instead of parking the call, it allows the callee to press 1 to accept call, press 2 to send call to VM or press 3 to send "do not call" msg to caller. Hope you find it useful.
Start with NV's original version but redirect to the custom-screen macros below :
[from-external-custom]
exten => s,1,Zapateller(answer|nocallerid)
exten => s,2,Wait(1)
exten => s,3,SetMusicOnHold(default)
exten => s,4,GotoIf($["${CALLERID(num)}" = ""]?custom-screen,s,1)
exten => s,5,GotoIf($["foo${CALLERID(num)}" = "foo"]?custom-screen,s,1)
exten => s,6,GotoIf($["${CALLERID(name):0:9}" = "Anonymous"]?custom-screen,s,1)
exten => s,7,GotoIf($["${CALLERID(name):0:7}" = "Unknown"]?custom-screen,s,1)
exten => s,8,GotoIf($["${CALLERID(num):0:7}" = "Private"]?custom-screen,s,1)
exten => s,9,GotoIf($["${CALLERID(name):0:7}" = "Private"]?custom-screen,s,1)
exten => s,10,GotoIf($["${CALLERID(num):0:10}" = "Restricted"]?custom-screen,s,1)
exten => s,11,GotoIf($["${CALLERID(num):0:4}" = "PSTN"]?custom-screen,s,1)
exten => s,12,Dial(Local/99@from-internal)
exten => s,13,Hangup
[custom-screen]
exten => s,1,Background(privacy-unident)
exten => s,n,Background(vm-rec-name)
exten => s,n,Set(SCREEN_FILE=/tmp/${CALLERID(num)}-${EPOCH})
exten => s,n,Record(${SCREEN_FILE}.gsm|5|8)
exten => s,n,Wait(1)
;added step to discourage telemarketers etc!
exten => s,n,Background(custom/cust-pls-press-one-to-cont) ;record your own msg - pls press one to continue call
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,WaitExten(10,)
;if no response after 10 secs, hang up
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => 1,1,Playback(pls-wait-connect-call)
exten => 1,2,Dial(local/200@from-internal,20,mM(screen^${SCREEN_FILE})) ;replace your extension to ring
exten => 1,3,Goto(s,25) ;goto VM if no one answers
exten => s,25,Background(vm-nobodyavail)
exten => s,26,Goto(ext-local,${VM_PREFIX}200,1) ;replace with your VM ext
exten => s,27,Hangup
exten => s,30,Playback(privacy-stop-calling-not-welcome)
exten => s,31,Playback(goodbye)
exten => s,32,Hangup
exten => h,1,System(/bin/rm ${SCREEN_FILE}.gsm)
;if you have friends who like to block their number, give them a code like 7 to break thru screening at beginning of custom-screen when msg is playing
exten => 7,1,Background(pls-hold-while-try)
exten => 7,n,Goto(ext-group,200,1) ;replace with your ring grp to ring
[macro-screen]
exten => s,1,noop(${ARG1})
exten => s,n,Playback(priv-callpending)
exten => s,n,Playback(${ARG1})
exten => s,n,Wait(1)
;record your own msg - press 1 to connect, 2 to send to VM, 3 to play do not call msg
exten => s,n,Read(ACCEPT|custom/cust-screen-callee-options|1|2|10)
exten => s,n,Gotoif($[${ACCEPT} = 1] ?71) ;connect call
exten => s,n,Gotoif($[${ACCEPT} = 2] ?30) ;reject to vm
exten => s,n,Gotoif($[${ACCEPT} = 3] ?50) ;play pls do not call msg
exten => s,30,Set(MACRO_RESULT=GOTO:custom-screen^s^25)
exten => s,31,Goto(70)
exten => s,50,Set(MACRO_RESULT=GOTO:custom-screen^s^30)
exten => s,51,Goto(70)
exten => s,70,Playback(goodbye)
exten => s,71,System(/bin/rm ${ARG1}.gsm)
exten => h,1,System(/bin/rm ${ARG1}.gsm)