Closed brustar64 closed 3 years ago
I'm not sure this is possible off the top of my head. I'd need to do some other kind of research.
This will not be possible currently because it requires PHP execution.
You could host a custom HTML file with your own choosing of numbers in an S3 bucket (I've tested this out).
You could specify as many numbers as you want.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="Polly.Nicole" language="en-AU">
Some message here...
</Say>
<Dial>
<Number>222-111-4444</Number>
<Number>888-111-2222</Number>
<Number>444-111-3333</Number>
</Dial>
</Response>
Save the file as fallback.xml
and upload it to the S3 bucket.
You would need to configure your S3 bucket for static website hosting. https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html
This similar concept may work for other things.
Currently I'm hosting the fallback.php (for when the primary handler fails) file on a personal website but I'd like to futureproof the fallback file so that its hosted in a Region controlled Google Drive or OneDrive so we aren't reliant on a personally hosted website and domain. This would also make updating the file very easy if we decided to rotate the number.
I have a link to the publicly shared file in a Google drive and a test number in Twilio however I'm unsure of how to test whether or not this link will work. The link doesn't end with fallback.php so I'm suspicious that its not going to work.
Could you please advise how I can test fallback.php in this situation?
I tried by putting a dodgy URL in the primary handler which did seem to send the call to the secondary handler but I got a debug error. The message text included the Google Drive share link.
Error - 11750 TwiML response body too large In your response to Twilio's request, the response body is larger than 64 kB.
@radius314