Permalink
Browse files

Added client

  • Loading branch information...
1 parent ca11003 commit 5d70aebbee3af18a986c08b975fd1e20ed039c1a @RobSpectre committed Jan 13, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 app.py
View
9 app.py
@@ -1,5 +1,6 @@
import flask
from twilio import twiml
+from twilio.util import TwilioCapability
import os
app = flask.Flask(__name__)
@@ -11,6 +12,14 @@ def karaoke():
dial.conference('PennApps Karaoke Party')
return str(response)
+@app.route('/mic')
+def mic()
+ capability = TwilioCapability(os.environ.get('ACCOUNT_SID'),
+ os.environ.get('AUTH_TOKEN'))
+ capability.allow_outgoing(os.environ.get('SPEAKER_CALLER_ID'))
+ token = capability.generate()
+ return flask.render_template('client.html', token=token, name='Microphone')
+
if __name__ == "__main__":
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)

0 comments on commit 5d70aeb

Please sign in to comment.