| Tropo WebAPI Development Guide | Home | Frameset Home |
|
{
"session":{
"id":"cdfc037a569baf929161e92335ebf5e1",
"accountId":"46256",
"timestamp":"2010-10-04T22:04:40.894Z",
"userType":"HUMAN",
"initialText":null,
"callId":"c11617f3737dc78db86d95b5449200d6",
"to":{
"id":"9991457004",
"name":"default.externalppid.voxeo.net",
"channel":"VOICE",
"network":"SIP"
},
"from":{
"id":"4073862000",
"name":"unknown",
"channel":"VOICE",
"network":"SIP"
},
"headers":{
"x-sbc-user-agent":"CommuniGatePro-callLeg/5.2.11",
"x-sbc-contact":"",
"Content-Length":"247",
"x-sid":"024c21db8e37e4e6cebaf33be11fff3f",
"x-sbc-cseq":"1 INVITE",
"x-sbc-supported":"histinfo",
"x-sbc-expires":"180",
"CSeq":"2 INVITE",
"Via":"SIP/2.0/UDP 66.193.54.6:5060;received=10.6.63.201",
"x-sbc-to":"",
"x-sbc-allow":"REFER",
"x-voxeo-sbc-name":"10.6.63.201",
"Contact":"",
"To":"",
"x-voxeo-sbc":"true"
}
}
}
channel (in this example, the channel was VOICE):
{"tropo":[
{
"say":[
{
"value":"Welcome to the Tropo PHP example for VOICE"
}
]
},
{
"ask":{
"attempts":3,
"bargein":true,
"choices":{
"value":"1,2,3,4",
"mode":"dtmf"
},
"name":"movie",
"say":[
{
"value":"Which of these trilogies do you like the best? Press 1 to vote for Lord of the Rings, press 2 for the original Star Wars, 3 for the Star Wars prequels, or press 4 for the Matrix"
}
],
"timeout":30
}
},
{
"on":{
"event":"continue",
"next":"testapp.php?uri=choice",
"say":{
"value":"Please hold."
}
}
},
{
"on":{
"event":"incomplete",
"next":"testapp.php?uri=incomplete"
}
}
}
]
}
actions section of this JSON (line 15 of figure 8.2):
{
"result":{
"sessionId":"cdfc037a569baf929161e92335ebf5e1",
"callId":"c11617f3737dc78db86d95b5449200d6",
"state":"ANSWERED",
"sessionDuration":5,
"sequence":1,
"complete":true,
"error":null,
"actions":{
"name":"movie",
"attempts":1,
"disposition":"SUCCESS",
"confidence":100,
"interpretation":"3",
"utterance":"3",
"concept":"3",
"value":"3",
"xml":"<?xml version=\"1.0\"?>\r\n\r\n \r\n \r\n dtmf-3<\/input>\r\n <\/interpretation>\r\n<\/result>\r\n"
}
}
}
hangup event (lines 10 through 12), which disconnects the call:
{"tropo":[
{
"say":[
{
"value":"You picked the Star Wars prequels. Stop calling this number, Mr. Lucas, we know it's you."
}
]
},
{
"on":{
"event":"continue",
"next":"testapp.php?uri=hangup"
}
},
{
"on":{
"event":"error",
"next":"testapp.php?uri=error"
}
}
]
}
| ANNOTATIONS: EXISTING POSTS |
| login |
|