0

outbound 'MachineDectection' call - Ask after say doesn't seem to work?

I'm testing MachineDetection feature that will say the message and then ask for input, but ASK doesn't seem to work. 
I think it was working last week. MachineDectection.
not sure what I'm missing here. any advice be appreciated. Thanks 

if (user == "HUMAN")
{
wait(30),
// need to add - if need to repeat the message?
// Announce message the 1st time
say( alertMessage );
resultRepeat = ask("would you like to repeat the message? Press 1 for yes or 2 for NO or end call",
{
// Ask if need to repeat the message 1 for yes.. else just hangup()!
choices: "1,2",
onBadChoice: function(event)
{
say("you must chose " + event.value);
},
onChoice: function(event)
{
if (event.value == 1)
{
say( alertMessage );
} else
{
hangup();
}
}
}
);
}

8 comments

Please sign in to leave a comment.