Skip to content

Instantly share code, notes, and snippets.

@priyankvex
Created June 3, 2018 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priyankvex/9b56dc9327ac95fb2866b7312bd85710 to your computer and use it in GitHub Desktop.
Save priyankvex/9b56dc9327ac95fb2866b7312bd85710 to your computer and use it in GitHub Desktop.
def connect_customer_to_conference(cls, customer_call_sid, conference_room):
# giving all the parameters needed by the twiml view in query parameters
query_params = "?conference_room={0}&end_conference_on_exit=True".format(urllib.quote(conference_room))
# Twilio will hit this url to get the updated TwiML
conference_twiml_url = urlparse.urljoin(settings.SITE_URL, reverse('twiml_conference_url')) + query_params
cls.client.calls(call_sid).update(method="POST", url=conference_twiml_url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment