SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Why Redirect URLs Persist After Updating a Call via API

 

Overview

When updating a live call with new TwiML instructions via the API, it’s common to expect that the original instructions will immediately stop, and any subsequent TwiML verbs including <Redirect> will not be executed. However, if the next verb in the original instructions is a <Redirect>, Twilio will still make a POST request to the redirect URL, even after the call has been updated with new instructions.

 

What You Need To Know

On May 13, 2021, Twilio published a changelog entry describing this behavior specifically for the <Dial> verb. In practice, this behavior applies regardless of which verb is currently executing. If a <Redirect> verb follows in the original TwiML, Twilio will POST to the redirect URL even if the call was updated before reaching the <Redirect>.

 

Frequently Asked Questions

How does this affect the call flow? 

This behavior is mostly cosmetic. The call will immediately end the currently executing verb and proceed with the new instructions provided by the API update. The TwiML returned from the redirect URL is not used in the call flow.

 

Since the call proceeds as normal by utilizing the updated call instructions, How would anyone notice a post was made to the redirect url?

This is only visible by reviewing the request inspector logs for the call. You might not notice this unless specifically looking for it. Below is an example. Note the unexpected request at Step 3.

 

Request Inspector

1. Original call instructions
POST
https://handler.twilio.com/twiml/EHeedcec40d4566712c46a3e529c91f3fe
2026-03-05 05:17:12 UTC 26ms 200
   Request
    Response
     Headers
      Body
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>
    I made it into the twiml bin. Now I am just stalling. 
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
    21 22 23 24 25 26 27 28 29 30.
  </Say>
  <Redirect method="POST">
    https://handler.twilio.com/twiml/EHacc4fdc838d9044efc5bb81b41b9a51a
  </Redirect>
</Response>

2. Call is updated via API while <Say> verb is executing
POST
https://api.twilio.com/2010-04-01/Accounts/ACbc2d5c9538faf13fad5c4ba6ff9c
2026-03-05 05:17:27 UTC 53ms 200

3. Post request made to <Redirect> URL
POST
https://handler.twilio.com/twiml/EHacc4fdc838d9044efc5bb81b41b9a51a
2026-03-05 05:17:27 UTC 32ms 200

4. Post request made to API updated URL parameter
POST
https://handler.twilio.com/twiml/EH41ae79fb3ca8040238a34010f3d685f1
2026-03-05 05:17:27 UTC 36ms 200

 

Conclusion

In summary, when updating a call’s instructions via the API, Twilio may still POST to a subsequent <Redirect> URL from the original TwiML, even though the call flow follows the updated instructions and does not execute the redirected TwiML. This is a known behavior and does not impact the actual call experience, but it may appear in your logs.

If you have further questions about this behavior or need assistance interpreting your call logs, please reach out to Twilio Support for guidance. For more details, you can also review the Twilio Voice TwiML Changelog.

 

Have more questions? Submit a request
Powered by Zendesk