Skip to content

Conversation

jmctwilio
Copy link
Contributor

No description provided.

@jmctwilio
Copy link
Contributor Author

# Download the Python helper library from twilio.com/docs/python/install
from flask import Flask
from twilio.twiml.voice_response import VoiceResponse, Enqueue

app = Flask(__name__)


@app.route("/enqueue_call", methods=['GET', 'POST'])
def enqueue_call():
   workflow_sid = 'WW0123456789abcdef0123456789abcdef'

   resp = VoiceResponse()

   e = Enqueue(None, workflowSid=workflow_sid)
   e.task('{"account_number":"12345abcdef"}')

   resp.append(e)

   return str(resp)

@jmctwilio jmctwilio merged commit 1e21e5f into twilio:master May 10, 2017
jmctwilio added a commit that referenced this pull request May 10, 2017
#283 -- Add Task verb to voice_response.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants