Issue with Twilio Redirect tag

106 views Asked by At

This is such a basic thing and I remember i have had it working before. Not sure what im missing but redirect tag doesn't seem to be working and instead i hear the url played out in test to speech. Below is my response XML. I hear "this is a test" and then I hear " h t t p colon slash slash some url". Any idea why is being ignored and plays out as text to speech instead? Thanks.

<Response>
    <Say voice="man" language="en">
        This is a test.
    </Say>
    <Redirect>
        http://SomeURL
    </Redirect>
</Response>
2

There are 2 answers

1
Alan On

Check that your are returning the proper MIME type.

https://www.twilio.com/docs/voice/twiml#twilio-understands-mime-types

1
Esmay Kapol On

Well.. according to the docs of TwiML you are redirecting to TwiML at a different url. TwiML is the Twilio language to handle responses.

Below is pasted from the docs.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Redirect method="POST">http://pigeons.com/twiml.xml</Redirect>
</Response>

So the redirect should receive some valid TwiML.