I am building Twilio application in which a voice plays and allow the user to enter 14-digits code with hash # character.
Here is the twiml:
<?xml version="1.0" encoding="utf-8"?>
<Response>
<Gather action="https://example.com/calling/twiml/gather2/" numDigits="14" actionOnEmptyResult="true">
<Play>https://example-bucket.s3.eu-west-2.amazonaws.com/voice-to-play.mp3</Play>
</Gather>
</Response>
I understand the timeout is 5 seconds. But I start entering the code one second after voice begins playing (that is during it is playing). But as I enter the hash digit, it timeouts saying an application error has occurred.
Is it the hash character ending the gathering period or the 5 second timeout which is too short? Kindly help on this. Thank you
Yes, since you didn't specify the finishonkey
, it defaults to hash/pound sign #.
Also, it might be worth checking out the actionOnEmptyResult
docs and set it to false since you don't want to trigger the webhook before it completes.