Skip to content

Instantly share code, notes, and snippets.

@priyankvex
Last active June 3, 2018 13:07
Show Gist options
  • Save priyankvex/30fa20b8c69986f632edba78e6ebc1e0 to your computer and use it in GitHub Desktop.
Save priyankvex/30fa20b8c69986f632edba78e6ebc1e0 to your computer and use it in GitHub Desktop.
class TwiMLDialConferenceView(APIView):
"""
This view responds with a Conference Dial which puts the call in scope in the specified conference room
"""
def post(self, request, *args, **kwargs):
response = VoiceResponse()
dial = Dial()
end_conference_on_exit = request.GET.get("end_conference_on_exit", '').lower() == 'true'
dial.conference(request.GET["conference_room"], end_conference_on_exit=end_conference_on_exit)
response.append(dial)
return HttpResponse(response, content_type="application/xml")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment