Question

Very simple question:

I have a Twilio number that I purchased and I setup a Status Call Back URL. It's one of the optional voice settings when you click on the number you own.

I already have a Voice Request URL set. It simply has the following command.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial record="true">
        <Number>1###810####</Number>
    </Dial>
</Response>

I tested it and it does call my number and record the call.

The Status Call Back URL claims to make a request to the URL after it's completed. I can see in Twilio that it did indeed make a request and I see my XML response by looking in Call Details. However the request does not seem to work?

Note: I blurred out my phone number for obvious reasons.

The response for the Status Call Back URL is below:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number>1###810####</Number>
        <Say>Please rate the most recent call.  1 is good.  2 is bad.  3 is solicitor.  4 is other.</Say>
    </Dial>
</Response>

I'm expecting it to call my number again right after I hang up and then say the message to please rate the call. My phone never rings again. It's as if the Status Call Back URL does not honor TwiloXML? Is this only for literally sending status information?

Was it helpful?

Solution

You can't nest a <Say> verb inside a <Dial> verb. You should try something like

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number>1###810####</Number>
    </Dial>
    <Say>Please rate the most recent call.  1 is good.  2 is bad.  3 is solicitor.  4 is other.</Say>
</Response>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top