Example #1
0
function demo_error()
{
    $tropo = new Tropo();
    $tropo->say("Please try your request again later.");
    $tropo->hangup();
    return $tropo->renderJSON();
}
function app_error()
{
    $tropo = new Tropo();
    $tropo->say("Something has gone wrong, please call back.");
    $tropo->hangup();
    return $tropo->RenderJson();
}
function zip_error()
{
    // Step 1. Create a new instance of the Tropo object.
    $tropo = new Tropo();
    // Step 2. This is the last thing the user will be told before the session ends.
    $tropo->say("Please try your request again later.");
    // Step 3. End the session.
    $tropo->hangup();
    // Step 4. Render the JSON for the Tropo WebAPI to consume.
    return $tropo->renderJSON();
}