def index(request):
    session = Session(request.body)
    t = Tropo()
    #jj = JoinPrompt(value = "who are you who let you come in")
    jj = JoinPrompt("who are you who let you come in")
    #ll = LeavePrompt(value = "byebye samsung")
    ll = LeavePrompt("byebye samsung")
    t.call(to=session.parameters['callToNumber'], network='SIP')
    t.conference(id='yuxiangj', joinPrompt=jj.json, leavePrompt=ll.json)
    t.say(session.parameters['message'])
    return t.RenderJsonSDK()
Esempio n. 2
0
def index(request):
    t = Tropo()
    t.on("continue",
         next="/continue.json",
         post='http://192.168.26.88:8080/FileUpload/receiveJson',
         say="this is say in on function")
    t.on("error", next="/error.json")
    t.on("hangup", next="/hangup.json")
    t.on("incomplete", next="/incomplete.json")
    t.ask(say="Welcome to Tropo.  What's your birth year?",
          name="year",
          require="true",
          choices="[4 DIGITS]")
    json = t.RenderJsonSDK()
    print json
    return json
Esempio n. 3
0
def index(request):
    t = Tropo()
    t.say("I am incomplete")
    json = t.RenderJsonSDK()
    print json
    return json
Esempio n. 4
0
def index(request):
    t = Tropo()
    t.say("I am hangup")
    json = t.RenderJsonSDK()
    print json
    return json
Esempio n. 5
0
def index(request):
    t = Tropo()
    t.say("I am continue")
    json = t.RenderJsonSDK()
    print json
    return json