8000 #283 -- Add Task verb to voice_response.py by jmctwilio · Pull Request #336 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

#283 -- Add Task verb to voice_response.py #336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2017

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
0