With a little creative IVR scripting, I've managed to block 100% of robo-calls!
I've included the script below in case anyone is interested. Note that this does require one compromise. You must be willing to force all calls from numbers that are not in your address book to go directly to voicemail. [Change the setting in HSphone=>Caller-ID settings=>Callers Not in the Addressbook go to voicemail to "yes".] This means calls from friends, family, business all go directly to voicemail until you add them in your address book. For me, that was an easy choice to make - for you, it may not be acceptable.
The script requires anyone who wants to leave a message to press "1" in order to do that. Easy enough for humans, impossible for call robots! I also added a "press the star key to save the message" to handle situations where Way2Call/HSphone sometimes did not detect the hangup if a caller immediately hung up without leaving a message [as human telemarketers are prone to do]. If a caller leaves a message and hangs up without pressing *, that's not a problem, as W2C/HSphone handles that successfully.
Also note that some of the functions in IVR (like X10 control) do not work in HS3. I left them in the script just in case HS fixes them someday, but that's highly unlikely, as they feel there's no longer any user interest in HSphone.
Name the script anything you like, but it must end with .txt. Place it in the IVR folder in your HomeSeer directory. Then change the HSphone setting under External Call Settings for External Answer IVR Script to point to the new file.
Note that for totally silent blocking [your house phones don't ring at all until the call passes the HS script blocking tests], your house phones must be "serial" to the Way2Call. That is, the incoming line from your telco goes only to the W2C, then comes out and goes to your house phones. If you're using cordless phones, this is easy - just plug the cordless base station into the output of the W2C. If you're using hard-wired phones, you'll have to do some minor rewiring.
I hope some of you will find this helpful.
I've included the script below in case anyone is interested. Note that this does require one compromise. You must be willing to force all calls from numbers that are not in your address book to go directly to voicemail. [Change the setting in HSphone=>Caller-ID settings=>Callers Not in the Addressbook go to voicemail to "yes".] This means calls from friends, family, business all go directly to voicemail until you add them in your address book. For me, that was an easy choice to make - for you, it may not be acceptable.
The script requires anyone who wants to leave a message to press "1" in order to do that. Easy enough for humans, impossible for call robots! I also added a "press the star key to save the message" to handle situations where Way2Call/HSphone sometimes did not detect the hangup if a caller immediately hung up without leaving a message [as human telemarketers are prone to do]. If a caller leaves a message and hangs up without pressing *, that's not a problem, as W2C/HSphone handles that successfully.
Also note that some of the functions in IVR (like X10 control) do not work in HS3. I left them in the script just in case HS fixes them someday, but that's highly unlikely, as they feel there's no longer any user interest in HSphone.
Name the script anything you like, but it must end with .txt. Place it in the IVR folder in your HomeSeer directory. Then change the HSphone setting under External Call Settings for External Answer IVR Script to point to the new file.
Note that for totally silent blocking [your house phones don't ring at all until the call passes the HS script blocking tests], your house phones must be "serial" to the Way2Call. That is, the incoming line from your telco goes only to the W2C, then comes out and goes to your house phones. If you're using cordless phones, this is easy - just plug the cordless base station into the output of the W2C. If you're using hard-wired phones, you'll have to do some minor rewiring.
I hope some of you will find this helpful.
Code:
##################################################################### # This script file handles External calls # # Single mailbox # # All voicemail is saved in the default mailbox # # # ##################################################################### LABEL:START VBSCRIPT:hs.WriteLogEx("IVR script", "START", "#D58000");NEXT:;NEXT: # # start normal answer of call # LABEL:SPEAK_PROMPT CLEAR_KEY: # Play the answer-machine greeting. If using text-to-speech, use # SPEAK:$DEFAULT_PROMPT to play the default greeting. The default # greeting in the settings file should be changed to prompt the caller to # "Press 1 to leave a message, then wait for the beep. When finished, press # the star key to save your message." # If using a pre-recorded greeting, use PLAY:answer.wav where answer.wav is the name of the wave file containing the greeting. This wave file should be in the folder named PhoneWaves. The greeting should prompt the caller to # "Press 1 to leave a message, then wait for the beep. When finished, press # the star key to save your message." # PLAY:answer.wav SPEAK:$DEFAULT_PROMPT # Wait for caller to press 1 or #. If no valid selection in 4 seconds, hangup and exit WAIT_TIMEOUT:4 WAIT_KEY:1# IF:$TIMEOUT;HANGUP:;NEXT: IF:$TIMEOUT;GOTO:SCRIPT_EXIT;NEXT: IF:$DTMF_KEY=1;GOTO:START_RECORD;NEXT: IF:$DTMF_KEY=#;GOTO:CHECK_PASSCODE;NEXT: LABEL:START_RECORD CLEAR_KEY: # disable the wait timeout WAIT_TIMEOUT:0 # record message in the default mailbox PLAY:beep.wav RECORD:$DEFAULT_MAILBOX WAIT_KEY:* END_RECORD: # # check message length was too short # IF:$MESSAGE_LENGTH<$CONFIG_MIN_MESSAGE_LENGTH;SPEAK:Message was too short and was not saved;SPEAK:Message saved SPEAK:good bye HANGUP: LABEL:CHECK_PASSCODE WAIT_TIMEOUT:0 LABEL:WAIT_KEY CLEAR_KEY: SPEAK:Enter passcode and press pound LABEL:WAIT_PC_POUND WAIT_KEY:# # check passcode match in mailbox FIRST_MAILBOX: # cycle through all mailboxes for a match LABEL:PC_LOOP IF:$MAILBOX_PASSCODE=$DTMF;GOTO:DO_PASSCODE;NEXT: NEXT_MAILBOX:;GOTO:PC_LOOP;NEXT: CLEAR_KEY: SPEAK:Invalid passcode, please try again GOTO:WAIT_PC_POUND LABEL:DO_PASSCODE # clear DTMF buffer now to allow entering keys while prompt is speaking CLEAR_KEY: SPEAK:Hello $MAILBOX_NAME. You have $MESSAGES_TOTAL messages. $MESSAGES_UNREAD are new. Press 1 and pound to get your messages. # check user entered a command before the greeting was finished, abort VR load if so and just process command CHECK_KEY:#1234567890;GOTO:WAITVR;NEXT: LABEL:INTERNAL # # load all VR commands as enabled in the options LOADVR:#VR_INTERNAL CLEAR_KEY: SPEAK:$INTERNAL_PROMPT GOTO:WAITVR # just start listening without speaking prompt, but reload the VR commands LABEL:RELOAD_VR LOADVR:#VR_EXTERNAL CLEAR_KEY # # wait for any VR command # LABEL:WAITVR WAITVR: CHECKVR:#VRCMD_HELP;GOTO:VRHELP;NEXT: CHECKVR:#VRCMD_EXIT;GOTO:VREXIT;NEXT: CHECKVR:#VRCMD_LEAVE_MESSAGE;GOTO:VRLEAVE_MESSAGE;NEXT: CHECKVR:#VRCMD_DEVICE;GOTO:VRDEVICE;NEXT: CHECKVR:#VRCMD_EVENT;GOTO:VREVENT;NEXT: CHECKVR:#VRCMD_MESSAGES;GOTO:VRMESSAGES;NEXT: CHECKVR:#VRCMD_REMINDER;GOTO:VRREMINDERS;NEXT CHECKVR:#VRCMD_DEVSTAT;GOTO:VRDEVSTAT;NEXT CHECK_KEY:#;NEXT:;GOTO:WAITVR LABEL:VRDTMF # pound key pressed while waiting for VR, check buffer IF:$DTMF_COUNT=2;GOTO:DTMF_COMMAND;NEXT: # assume it might be an HS DTMF event command # this will trigger an event in HS if set for the entered DTMF sequence DODTMFEVENT: # need to reload the VR commands incase a script was run and new commands were loaded GOTO:RELOAD_VR CLEAR_KEY: GOTO:WAITVR # # DTMF IVR commands # LABEL:DTMF_COMMAND IF:$DTMF=1#;GOTO:VRMESSAGES;NEXT: IF:$DTMF=2#;GOTO:VRHELP;NEXT: IF:$DTMF=3#;GOTO:X10;NEXT: IF:$DTMF=4#;GOTO:PAGE;NEXT: IF:$DTMF=8#;GOTO:RING;NEXT: IF:$DTMF=9#;HANGUP:;NEXT: CLEAR_KEY: SPEAK:Unknown key sequence, press two pound for help GOTO:WAITVR # # Ring the house phones # LABEL:RING SPEAK:Ringing the house phones. Press # to hang up. START_RING:3,3,10 CLEAR_KEY: WAIT_KEY:# HANGUP: # # Page using speakerphone # must hang up after paging complete LABEL:PAGE SPEAK:Paging enabled SPEAKER_PHONE:ON # wait here so VR is disabled CLEAR_KEY: WAIT_KEY:# HANGUP: # # VR Help command # LABEL:VRHELP IF:$ECHO_VR;SPEAK:$VR_PHRASE;NEXT: CLEAR_KEY: SPEAK:You can say, dial and a number, or, Messages, or, a HomeSeer voice command SPEAK:Press 1 pound to get messages, or 3 pound for X 10 control, or enter a key sequence then pound to trigger a homeseer event GOTO:WAITVR # # VR Exit command # LABEL:VREXIT SPEAK:$EXIT_PHRASE HANGUP: # # VR "leave a message for [mailbox username]" # $MAILBOX is set to the mailbox that matches the username in the VR phrase # $MAILBOX_NAME = username of mailbox owner # LABEL:VRLEAVE_MESSAGE IF:$MAILBOX_NAME=default;SPEAK:At the beep, leave a message. Press pound when finished;SPEAK:At the beep, leave a message for $MAILBOX_NAME. Press pound when finished # check user pressed any key to abort CHECK_KEY:*#123456789;NEXT:;GOTO:LEAVE_MESSAGE_RECORD CLEAR_KEY: GOTO:WAITVR LABEL:LEAVE_MESSAGE_RECORD PLAY:beep.wav RECORD:$MAILBOX # wait for # key to terminate the recording WAIT_KEY:# END_RECORD: SPEAK:Message saved CLEAR_KEY: GOTO:WAITVR # # VR HS device control # LABEL:VRDEVICE # use last voice command and control HS device # check if confirmation is enabled for device IF:$DEVICE_VC_CONFIRM;NEXT:;GOTO:DEVICE_NOCONFIRM SPEAK:Shall I execute $VR_PHRASE LOADVR:Yes,No WAITVR: IF:$VR_PHRASE=No;GOTO:DEVICE_NO;NEXT: # tell HS to execute the action from the last VR phrase SPEAK:$VR_PHRASE_EXECUTING LABEL:DODEVICEACTION DOVRDEVICE: # need to reload the VR commands GOTO:RELOAD_VR LABEL:DEVICE_NOCONFIRM IF:$ECHO_VR;SPEAK:$VR_PHRASE_EXECUTING;NEXT: DOVRDEVICE: CLEAR_KEY: GOTO:WAITVR LABEL:DEVICE_NO SPEAK:OK cancelled GOTO:INTERNAL # # VR HS voice command # LABEL:VREVENT # use last voice command to trigger HS event IF:$EVENT_VC_CONFIRM;NEXT:;GOTO:EVENT_NOCONFIRM SPEAK:$VR_PHRASE_CONFIRM LOADVR:#VR_YESNO WAITVR: IF:$VR_PHRASE=Yes;NEXT:;GOTO:HOMESEER_NO: LABEL:DOEVENTACTION # tell HS to execute the action from the last VR phrase IF:$ECHO_VR;SPEAK:$VR_PHRASE_EXECUTING;NEXT: DOVREVENT: GOTO:RELOAD_VR LABEL:HOMESEER_NO SPEAK:OK Cancelled GOTO:INTERNAL LABEL:EVENT_NOCONFIRM IF:$ECHO_VR;SPEAK:Executing $VR_PHRASE;NEXT: DOVREVENT: CLEAR_KEY: GOTO:WAITVR # # VR Reminders # LABEL:VRREMINDERS SPEAK:$VR_PHRASE_CONFIRM LOADVR:#VR_YESNO WAITVR: IF:$VR_PHRASE=No;GOTO:REMINDER_NO;NEXT: # tell HS to execute the action from the last VR phrase SPEAK:$VR_PHRASE_EXECUTING LABEL:DOREMINDERACTION DOREMINDER: # need to reload the VR commands GOTO:INTERNAL LABEL:REMINDER_NOCONFIRM IF:$ECHO_VR;SPEAK:$VR_PHRASE;NEXT: DOREMINDER: CLEAR_KEY: GOTO:INTERNAL LABEL:REMINDER_NO SPEAK:OK cancelled GOTO:INTERNAL # # VR HS device status # LABEL:VRDEVSTAT DOVRDEVICE: # need to reload the VR commands GOTO:INTERNAL # # Read voice messages # Uses the currently set mailbox # LABEL:VRMESSAGES WAIT_TIMEOUT:3 # set a flag to tell us to read unread messages SET:$VAR2=0 LABEL:M_START CLEAR_KEY: # create a counter to track message number SET:$VAR1=1 # set $MESSAGE to the first message, exit if no messages IF:$MESSAGES_TOTAL=0;GOTO:NO_MESSAGES;NEXT: SPEAK:There are $MESSAGES_TOTAL total messages, $MESSAGES_UNREAD messages are new CHECK_KEY:*#1234567890;GOTO:INTERNAL;NEXT: IF:$VAR2=0;GOTO:M_DO_NEW;NEXT: LABEL:M_DO_OLD FIRST_READ_MESSAGE:;GOTO:M_PROCESS;GOTO:NO_MESSAGES LABEL:M_DO_NEW FIRST_UNREAD_MESSAGE:;GOTO:M_PROCESS;GOTO:NO_MESSAGES LABEL:M_PROCESS IF:$VAR2=0;SPEAK:Reading new messages;SPEAK:Reading old messages CHECK_KEY:*#1234567890;GOTO:INTERNAL;NEXT: LABEL:M_PLAY CLEAR_KEY: SPEAK:Message $VAR1, Received $MESSAGE_DATE PLAY:$MESSAGE_FILE # check key was pressed while message was being played CHECK_KEY:*#1234567890;GOTO:WAIT_FOR_KEY;NEXT: # # 1= replay # 2= next mailbox # 3= get old messages # 4= get new messages (default) # 9= next # 7= delete # #=exit LABEL:KEY_HELP SPEAK:Press 7 to delete the message or star for help LABEL:WAIT_FOR_KEY WAIT_KEY:*1234567890 IF:$TIMEOUT;GOTO:M_NEXT;NEXT: IF:$DTMF_KEY=1;GOTO:M_PLAY;NEXT: IF:$DTMF_KEY=2;GOTO:M_NEXTBOX;NEXT: IF:$DTMF_KEY=3;GOTO:M_GETOLD;NEXT: IF:$DTMF_KEY=4;GOTO:M_GETNEW;NEXT: IF:$DTMF_KEY=9;GOTO:M_NEXT;NEXT: IF:$DTMF_KEY=7;GOTO:M_DELETE;NEXT: IF:$DTMF_KEY=0;GOTO:INTERNAL;NEXT: IF:$DTMF_KEY=*;GOTO:M_HELP;NEXT: GOTO:KEY_HELP LABEL:M_HELP SPEAK:Press one to replay the message, 9 for the next message, 7 to delete the message, 2 for the next mailbox, 3 for old messages, 0 to exit CLEAR_KEY: GOTO:WAIT_FOR_KEY LABEL:M_GETOLD SET:$VAR2=1 GOTO:M_START LABEL:M_GETNEW SET:$VAR2=0 GOTO:M_START LABEL:M_NEXT MODVAR:$VAR1+1 IF:$VAR2=0;GOTO:M_NEXT_NEW;GOTO:M_NEXT_OLD LABEL:M_NEXT_NEW NEXT_UNREAD_MESSAGE:;GOTO:M_PLAY;GOTO:NO_MESSAGES LABEL:M_NEXT_OLD NEXT_READ_MESSAGE:;GOTO:M_PLAY;GOTO:NO_MESSAGES LABEL:M_DELETE DELETE_MESSAGE: SPEAK:Message deleted VBSCRIPT:hs.TriggerEvent("MessageDeleted");NEXT:;NEXT: GOTO:M_NEXT LABEL:NO_MESSAGES CLEAR_KEY: SPEAK:There are no more messages to listen to, press 2 for the next mailbox, or 3 for old messages, or zero to exit GOTO:WAIT_FOR_KEY LABEL:M_NEXTBOX NEXT_MAILBOX:;NEXT:;FIRST_MAILBOX: SPEAK:Mailbox $MAILBOX_NAME GOTO:M_START # # End read voice messages # # # X10 control # LABEL:X10 CLEAR_KEY: SPEAK:X ten control menu. Enter 1 to turn a unit on, or 2 to turn it off, or 3 to exit WAIT_KEY:123 IF:$DTMF_KEY=1;SET:$VAR2=1;NEXT: IF:$DTMF_KEY=2;SET:$VAR2=2;NEXT: IF:$DTMF_KEY=3;GOTO:X10_DONE;NEXT: SET:$VAR1=Z CLEAR_KEY: SPEAK:Enter house code and then pound WAIT_KEY:# IF:$DTMF=2; SET:$VAR1=A;NEXT: IF:$DTMF=22; SET:$VAR1=B;NEXT: IF:$DTMF=222;SET:$VAR1=C;NEXT: IF:$DTMF=3; SET:$VAR1=D;NEXT: IF:$DTMF=33; SET:$VAR1=E;NEXT: IF:$DTMF=333;SET:$VAR1=F;NEXT: IF:$DTMF=4; SET:$VAR1=G;NEXT: IF:$DTMF=44; SET:$VAR1=H;NEXT: IF:$DTMF=444;SET:$VAR1=I;NEXT: IF:$DTMF=5; SET:$VAR1=J;NEXT: IF:$DTMF=55; SET:$VAR1=K;NEXT: IF:$DTMF=555;SET:$VAR1=L;NEXT: IF:$DTMF=6; SET:$VAR1=M;NEXT: IF:$DTMF=66; SET:$VAR1=N;NEXT: IF:$DTMF=666;SET:$VAR1=O;NEXT: IF:$DTMF=7; SET:$VAR1=P;NEXT: IF:$VAR1=Z;GOTO:X10;NEXT: LABEL:X10_DEVICE SPEAK:You pressed $VAR1 CLEAR_KEY: SPEAK:Enter device code then pound WAIT_KEY:# SPEAK:You pressed $DTMF IF:$VAR2=1;GOTO:X10_ON;NEXT: IF:$VAR2=2;GOTO:X10_OFF;NEXT: GOTO:X10 LABEL:X10_ON VBSCRIPT:hs.ExecX10("$VAR1$DTMF","on");NEXT:;NEXT:; SPEAK:$VAR1$DTMF on sent GOTO:X10 LABEL:X10_OFF VBSCRIPT:hs.ExecX10("$VAR1$DTMF","off");NEXT:;NEXT:; SPEAK:$VAR1$DTMF off sent GOTO:X10 # all done handling X10 commands LABEL:X10_DONE GOTO:INTERNAL # # End X10 control # # if script "fell through" to here, skip to script exit GOTO:SCRIPT_EXIT # LABEL:HANGUP HANGUP: # exit script LABEL:SCRIPT_EXIT VBSCRIPT:hs.WriteLogEx("IVR script", "SCRIPT EXIT", "#D58000");NEXT:;NEXT:
Comment