0

Need help in "ask question" in call in tropo

I am working on tropo web api by using php and the code i am putting for asking question and answer as given below


require 'tropo.class.php';
require 'lib/limonade.php';

dispatch_post('/start', 'app_start');
function app_start() {

$tropo = new Tropo();

$options = array("choices" => "red, blue, green", "name" => "color", "attempts" => 3, "timeout" => 60);
$tropo->ask("What's your favorite color? Choose from red, blue or green.", $options);
$tropo->on(array("event" => "continue", "next" => "index1.php?uri=start"));
$tropo->on(array("event" => "incomplete", "next" => "index2.php?uri=start"));
$tropo->RenderJson();
}

......

 

So when i am calling by the number that i had created as in web api then it ask "What is your favourite color" in call and when i say wrong input it moves "continue" and it ask the question that is written in "index1.php" rather to move "incomplete", i am not getting where i am wrong. if i say any input it goes "continue" event so please help to resolve this issue.

5 comments

Please sign in to leave a comment.