Twilio logs are showing the following error when Twilio tries to render a TwiML document sent to it by a Python app:
Msg
XML Validation warning
line
10
parserMessage
Invalid content was found starting with element 'Gather'. One of '{Transcription
ErrorCode
12200
Code for the TwiML document is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action="/x" numDigits="1" timeout="0">
{% for file in files %}
<Play>{{ file }}</Play>
{% endfor %}
</Gather>
{% if start_stream %}
<Start>
<Stream url="wss://{{ host }}/y" />
<Gather numDigits="1" action="/z" timeout="0" />
</Start>
{% endif %}
<Redirect method="POST">/z</Redirect>
</Response>
It seems the issue is related to the gather verb. I tried different versions of this TwiML document but the error persists. Any help in resolving would be appreciated. Thanks.