def begin_call():
print "start /begin_call"
from_number = request.values.get('From', None)
if from_number in callers:
session['caller'] = callers[from_number]
else:
session['caller'] = "unknown"
resp = VoiceResponse()
if session['caller'] != "unknown":
resp.say("Hey " + session['caller'] + "!")
gather = Gather(input='dtmf speech', timeout=5, num_digits=4, action='/set_date', method='GET')
gather.say("Let's record a new "+os.environ['PODCASTNAME']+"!\n First, when will this episode air?\n Say the air date or punch it in using a Month Month Day Day format.\n For example, you could say October 31st or punch in 10 31.")
resp.append(gather)
resp.say("You didn't give me a date. Bye!")
else:
resp.say("Hey, this isn't for you. \nBoy Bye!")
resp.hangup()
session.clear()
return str(resp)
# validate date & record audio
评论列表
文章目录