@@ -0,0 +1,1429 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom telapi import rest, inboundxml%0Afrom flask import Flask, render_template, request, Response%0Afrom uuid import uuid4%0A%0A%0A%0Aapp = Flask(__name__)%0A%0A%0A# Config data%0Aaccount_sid = '%5Baccount_sid%5D'%0Aauth_token  = '%5Bauth_token%5D'%0Aapp_sid = '%5Bapp_sid%5D'%0A%0A%0Aclient      = rest.Client(account_sid=account_sid, auth_token=auth_token)%0Aaccount     = client.accounts%5Bclient.account_sid%5D%0A%0A%0A@app.route('/')%0Adef home():%0A    %22%22%22 Just home view for creating new conference%0A    %22%22%22%0A    conference_name = str(uuid4())%0A    return render_template(%22home.html%22, conference_name=conference_name)%0A%0A%0A@app.route(%22/%3Cconference_name%3E%22)%0Adef conference(conference_name):%0A    %22%22%22 View for joining a conference%0A    %22%22%22%0A    nickname = str(uuid4())%0A    js_creds = account.applications%5Bapp_sid%5D.client_token.create(nickname=nickname)%0A    return render_template(%22conference.html%22, token=js_creds.sid, password=js_creds.client_password, conference_name=conference_name)%0A%0A%0A@app.route(%22/xml%22, methods=%5B'GET', 'POST'%5D)%0Adef xml():%0A    %22%22%22 InboundXML for dialing a conference with dynamic conferece name%0A    %22%22%22%0A    conference_name = request.form.get('WebClientParam_conference_name')%0A    xml = inboundxml.Response(inboundxml.Dial(%0A        inboundxml.Conference(%0A            str(conference_name), %0A        )%0A    ))%0A    return Response(str(xml), mimetype='text/xml')%0A%0A%0Aif __name__ == '__main__':%0A    app.run(debug=True, threaded=True)%0A

add flask template