Here is my code
exports.handler = function(context, event, callback) {
let twiml = new Twilio.twiml.VoiceResponse();
twiml.gather({ numdigit:"1", tiemout:"5"}).say("some message , press 9 to repeat");
if(event.numdigit === 9)
{
twiml.repeat;
}
else if(event.numdigit != 9){
twiml.say("soory");
}
callback(null, twiml);
};
I am new to twilio functions. I have gone through the docs but cannot find anything regarding this.
When ever I am calling to the number "some message, press 9 to repeat" this is said but I want to repeat the message when 9 is pressed and should play sorry when number other then 9 is pressed
Currently if I pressed number other then 9 then also the same message is playing. If i do press any thing then it goes to "sorry"
Can anyone suggest the solution