You can use the Readvar Savevar commands to set variable and the Collect Digit part of Open Voice Session to get commands from phone. Keep in mind anyone can accidentally dial a number, so a password is a good idea.
Here's a script I created to be activated in case of an evacuation:
/************/
READVAR Evacuation_WILDVAR
SAVEVAR
OPEN VOICE SESSION
PLAY PROMPT VOICE SEGMENT Ann_EVACUATION
IF Evacuation_WILDVAR = 1 THEN
PLAY PROMPT VOICE SEGMENT Ann_Evac_Active
ELSE
PLAY PROMPT VOICE SEGMENT Ann_Evac_NotActive
END IF
PLAY PROMPT VOICE SEGMENT Ann_Evac_Change
COLLECT 1 DIGITS INTO First_Choice
INTER DIGIT TIMER 3
END VOICE SESSION
READVAR Evacuation_WILDVAR
IF First_Choice = 1 THEN
ASSIGN 1 TO Evacuation_WILDVAR
ELSE
ASSIGN 2 TO Evacuation_WILDVAR
END IF
SAVEVAR
READVAR Evacuation_WILDVAR
SAVEVAR
OPEN VOICE SESSION
IF Evacuation_WILDVAR = 1 THEN
PLAY PROMPT VOICE SEGMENT Ann_Evac_Active
ELSE
PLAY PROMPT VOICE SEGMENT Ann_Evac_NotActive
END IF
END VOICE SESSION
DISCONNECT
/************/
Then in any script you can use this Evacuation_WILDVAR to do whatever you want to do with it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.