Permalink
Browse files

Merge branch 'master' of github.com:eanderle/trytwilio

Conflicts:
	app.py
  • Loading branch information...
2 parents b50c57c + 3e3e642 commit a4635637ccdcc4efe49dd18769463f5f1ab85b38 @CEWendel CEWendel committed Jul 18, 2012
Showing with 9 additions and 2 deletions.
  1. +4 −0 app.py
  2. +5 −2 templates/say.html
View
4 app.py
@@ -133,9 +133,12 @@ def requestCall():
url = 'http://trytwilio.herokuapp.com/requestCall?' + urlencode({'twimlBody':twimlBody})
+ # If this is a gather, re-write the url to contain all of the twiml
+ # of each digit provided and give it to handleInput
if request.values['verb'].lower() == 'gather':
url = 'http://trytwilio.herokuapp.com/handleInput?'
twimlBodies = {}
+ # Go through each digit, and if it was provided, add it to the url
for c in '0123456789#*':
s = 'twimlBody' + c
if s in request.values:
@@ -166,6 +169,7 @@ def requestCall():
return 'success'
except Exception as e:
+ sys.stderr.write('Got exception: ' + e)
return 'failure'
if __name__ == '__main__':
View
@@ -53,8 +53,11 @@ <h3>Loop:</h3>
{% block staticdemo %}
<h2>Demo</h2>
<input type="hidden" id="token" value="{{params['token']}}">
- <button class="btn btn-primary" id="callButton">Call</button>
- <button class="btn btn-error" id="hangupButton">Hangup</button>
+ <form class="form-inline">
+ <input type="text" placeholder="Your phone number" id="phoneNumber">
+ <button class="btn btn-primary" id="callButton">Call</button>
+ <button class="btn btn-error" id="hangupButton">Hangup</button>
+ </form>
{% endblock %}
{% block mission %}

0 comments on commit a463563

Please sign in to comment.