Tropo is part of CiscoLearn More

value

event.value is utilized with an ask and record. With ask, it will return the "choice" - with record, it will return the audio recording, for use in playback (interchangeable with event.recordURI). We'll show how to use it with an ask - in the examples below, it will return the value outside of the parentheses if a choice is made (affirmative or negative).

Examples

  var event = ask("Do you want to make an appointment? Say yes or no", {
   choices:"affirmative(yes, yeah, one), negative(no, nah, two)"
});
say("You said " + event.value);
log("They said " + event.value);
  
event = ask "Do you want to make an appointment? Say yes or no", {
   :choices => "affirmative(yes, yeah, one), negative(no, nah, two)"}
say "You said " + event.value
log "They said " + event.value
<?php

$event = ask("Do you want to make an appointment? Say yes or no", array(
   "choices" => "affirmative(yes, yeah, one), negative(no, nah, two)"
));
say("You said" . $event->value);
_log("They said " . $event->value);

?>
event = ask("Do you want to make an appointment? Say yes or no", {
   "choices":"affirmative(yes, yeah, one), negative(no, nah, two)"})
say("You said " + event.value)
log("They said " + event.value)
event = ask("Do you want to make an appointment? Say yes or no", [
   choices: "affirmative(yes, yeah, one), negative(no, nah, two)"])
say("You said $event.value")
log("They said $event.value")