-
Notifications
You must be signed in to change notification settings - Fork 772
Closed
Description
Version:
6.3.0
API Subdomain (api/taskrouter/ip_messaging):
twilio.twiml.VoiceResponse
Code Snippet
@app.route('/ivr/welcome', methods=['POST'])
def welcome():
response = VoiceResponse()
with response.gather(numDigits=1, action=url_for('menu'), method='POST') as g:
g.say('Welcome to my IVR system.')
return twiml(response)
Expected TwiML Response
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action="/ivr/menu" method="POST" numdigits="1">
<Say>Welcome to my IVR system.</Say>
</Gather>
</Response>
Actual TwiML Response
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action="/ivr/menu" method="POST" numdigits="1" />
<Say>Welcome to my IVR system.</Say>
</Response>
Steps to Reproduce
- Use code provided with appropriate imports
- Print
str(response)
to view generated TwiML
More Information
Basically, it appears that when trying to use the say
method of gather
, instead of nesting the Say
verb inside of the Gather
, it appends it to the end after the Gather
.
Metadata
Metadata
Assignees
Labels
No labels