Tropo is part of CiscoLearn More

Recording the Entire Call

Sometimes you want to record just what your caller says in response to a prompt - sometimes you want to record both the prompt and the response, or the caller's multiple attempts to answer an ask, keypad tones, things of that nature. startCallRecording and stopCallRecording can make that happen for you and works with both inbound and outbound calls. The following example starts recording as soon as the call is placed and asks the caller for their favorite color up to three times (repeated only if they give invalid answers). It then disconnects the call and sends the recording to the specified URL:

startCallRecording([{url:"http://example.com/recording.js"}]);
ask("What's your favorite color?  Choose from red, blue or green.", {
  choices:"red, blue, green"
});
stopCallRecording();
startCallRecording [{:url => "http://example.com/recording.rb"}]
ask "What's your favorite color?  Choose from red, blue or green.", {
   :choices => "red, blue, green",
   :attempts => 3}
stopCallRecording
<?php

startCallRecording(array(array("url" => "http://example.com/recording.php")));
ask("What's your favorite color?  Choose from red, blue or green.", array(
    "choices" =>"red, blue, green",
    "attempts" => 3
));
stopCallRecording();

?>
startCallRecording([{"url": "http://example.com/recording.py"}])
ask("What's your favorite color?  Choose from red, blue or green.", {
  "choices":"red, blue, green",
  "attempts":3
})
stopCallRecording()
startCallRecording([[url: "http://example.com/recording.groovy"]]);
ask("What's your favorite color?  Choose from red, blue or green.", [
  choices:"red, blue, green",
  attempts:3
]);
stopCallRecording();