exten => 111,1,Zapateller(answer|nocallerid)
exten => 111,2,Wait(1)
exten => 111,3,SetMusicOnHold(default)
exten => 111,4,GotoIf($["${CALLERIDNUM}" = “”]?who-r-u,s,1)
exten => 111,5,GotoIf($[“foo${CALLERIDNUM}” = “foo”]?who-r-u,s,1)
exten => 111,6,GotoIf($["${CALLERIDNAME:0:9}" = “Anonymous”]?who-r-u,s,1)
exten => 111,7,GotoIf($["${CALLERIDNAME:0:7}" = “Unknown”]?who-r-u,s,1)
exten => 111,8,GotoIf($["${CALLERIDNUM:0:7}" = “Private”]?who-r-u,s,1)
exten => 111,9,GotoIf($["${CALLERIDNAME:0:7}" = “Private”]?who-r-u,s,1)
exten => 111,10,GotoIf($["${CALLERIDNUM:0:10}" = “Restricted”]?who-r-u,s,1)
exten => 111,11,GotoIf($["${CALLERIDNAME:0:11}" = “OUT OF AREA”]?who-r-u,s,1)
exten => 111,12,GotoIf($["${CALLERIDNUM:0:4}" = “PSTN”]?who-r-u,s,1)
exten => 111,13,GotoIf($["${CALLERIDNAME:0:4}" = “PSTN”]?who-r-u,s,1)
exten => 111,14,DigitTimeout,3
exten => 111,15,ResponseTimeout,3
exten => 111,16,Background(custom/welcome)
exten => 0,1,Background(pls-hold-while-try)
exten => 0,2,Dial(local/200@from-internal,20,m)
exten => 0,3,VoiceMail(200@default)
exten => 0,4,Hangup
exten => 1,1,Background(pls-hold-while-try)
exten => 1,2,Dial(local/222@from-internal,20,m)
exten => 1,3,VoiceMail(204@default)
exten => 1,4,Hangup
exten => 4,1,Authenticate(1234588)
exten => 4,2,Background(pls-wait-connect-call)
exten => 4,3,DISA(no-password|from-internal)
exten => 2XX,1,Background(pls-hold-while-try)
exten => 2XX,2,Dial(local/${EXTEN}@from-internal,20,m)
exten => 2XX,3,VoiceMail(${EXTEN}@default)
exten => 2XX,4,Hangup
exten => 2XX,103,Voicemail(${EXTEN}@default)
exten => 2XX,104,Hangup
exten => t,1,Background(pls-hold-while-try)
exten => t,2,Dial(local/204@from-internal,20,m)
exten => t,3,VoiceMail(204@default)
exten => t,4,Hangup
exten => i,1,Playback(wrong-try-again-smarty)
exten => i,2,Goto(111,16)
At the bottom of the extensions_custom.conf file, add the two following contexts:
[who-r-u]
exten => s,1,Background(privacy-unident)
exten => s,2,Background(vm-rec-name)
exten => s,3,Wait(2)
exten => s,4,Record(/tmp/asterisk-stranger:gsm|5|15)
exten => s,5,Background(pls-hold-while-try)
exten => s,6,Goto(ext-park,70,1)
exten => s,7,VoiceMail(200@default)
exten => s,8,Playback(Goodbye)
exten => s,9,Hangup
[ext-park]
exten => 70,1,Answer
exten => 70,2,SetMusicOnHold(default)
exten => 70,3,ParkAndAnnounce(asterisk-friend:/tmp/asterisk-stranger:vm-isonphone:at-following-number:PARKED|40|local/222@from-internal|who-r-u,s,7)
exten => 70,4,Hangup