Tropo is part of CiscoLearn More

Recording Failover

When a recording is complete, Tropo uploads it to a URL you specify. Tropo allows you to specify multiple recording URLs. In the event that one URL is unavailable, Tropo will try uploading to the next one, and continue until all the URLs have been tried. Each URL can be configured separately, using a different upload method and credentials for each one. To configure your Tropo application for recording failover, you need to add additional URLs to your recordURL parameter.

Note
Prior to adding recording failover, Tropo supported a parameter called recordURI, with an i. This parameter was a string and is now deprecated. The recordUser, recordMethod, and recordPassword parameters have also been deprecated. For backward compatibility reasons, these still work, but do not support recording failover.

The recordURL parameter accepts an array with the following keys:

  • url: The URL that Tropo should send the recording to.
  • username: The username that should be transmitted along with your request. For S3 uploads, this is your S3 Access Key ID.
  • password: The passwor that should be transmitted along with your request. For S3 uploads, this is your S3 Access Key Secret.
  • method: The HTTP Method (PUT or POST) that Tropo should send the file as. POST is the default. If the upload is an S3 upload, this is ignored.

Tropo will examine your URL to determine if it is an S3 bucket - there's no need to tell Tropo you're uploading to S3.

You can specify up to three URLs to upload to, and Tropo will attempt them in order until uploading succeeds to one of them. There is no retry mechanism; once Tropo fails to upload to one of your URLs, it will skip to the next one, and continue that until either the recording is uploaded or Tropo has tried all of the URLs you gave. If you give more than three URLs, Tropo will only try the first three.

Here's an example that uploads your recording to recordings.example.com/upload and if that is unavailable tries recordings2.example.com/upload via PUT, and if that is unavailable sends it to S3.

say("Welcome to the hotline!");
record("Tell us how you feel!", {
   recordURL: [
      {
        url: "http://recording.example.com/upload"
      },
      {
        url: "http://recording2.example.com/upload",
        method: "PUT"
      },
      {
        url: "http://s3.amazonaws.com/bucket",
        username: "myaccesskey",
        password: "mysecret"
      }
    ]
   }
);
say "Welcome to the hotline!"
record "Tell us how you feel!", {
:recordURL => [
    {
      :url => "http://recording.example.com/upload"
    },
    {
      :url => "http://recording2.example.com/upload",
      :method => "PUT"
    },
    {
      :url => "http://recording.example.com/upload",
      :username => "myaccesskey",
      :password => "mysecret"
      
    }    
  ]
}
<?php
say("Welcome to the hotline!");
record("Tell us how you feel!", array (
   "recordURL"=>array(
      array(
        "url" => "http://recording.example.com/upload"
      ),
      array(
        "url" => "http://recording2.example.com/upload",
        "method" => "PUT"
      ),
      array(
        "url" => "http://s3.amazonaws.com/bucket",
        "username" => "myaccesskey",
        "password" => "mysecret"
      ),
    )
   )
);
?>
say("Welcome to the hotline!")
record("Tell us how you feel!", {
"recordURL":[
    {
      "url": "http://recording.example.com/upload"
    },
    {
      "url": "http://recording2.example.com/upload",
      "method": "PUT"
    },
    {
      "url": "http://s3.amazonaws.com/bucket",
      "username": "myaccesskey",
      "password": "mysecret"
    },      
  ]
}
)
say("Welcome to the hotline!")
record("Tell us how you feel!", [
recordURL: [
    [
      url: "http://recording.example.com/upload"
    ],
    [
      url: "http://recording2.example.com/upload",
      method: "PUT"
    ],
    [
      url: "http://s3.amazonaws.com/bucket",
      username: "myaccesskey",
      password: "mysecret"
    ]
  ]
]
)