Used to initiate a phone call between one phone number and a DialogTech voicemail
Use the Click-to-Voicemail API to initiate a phone call between a phone number and a voicemail
The Click-to-Voicemail API is used to initiate a phone call between one phone number and a DialogTech voicemail.
Base URL for Click-to-Voicemail
Parameter List
Parameter | Required | Accepts | Max Length | Notes | Usage |
---|---|---|---|---|---|
access_key | Yes* (See Notes) | String | n/a | Access Key from the Key Manager within a DialogTech account | Credentials used for access to the API for a particular DialogTech account |
secret_access_key | Yes* (See Notes) | String | n/a | Secret Access Key from the Key Manager within a DialogTech account | Credentials used for access to the API for a particular DialogTech account |
action | Yes | String: clickto.voicemail | n/a | Only accepts clickto.voicemail for Click-to-Voicemail | Defines the API call as a "Click-to-FindMe" type |
vmail_box_id | Yes | String: Existing Voicemail ID | n/a | An existing Voicemail ID must be utilized. To find IDs for any existing Voicemail within your account, enter the menu Developer Tools -> Building Block IDs | Determines which voicemail the phone_to_call third party will be joined to. |
phone_to_call | Yes | String: Unformatted Phone Number | n/a | Can be any unformatted phone number | Defines the third party being joined to the call |
Using this API
These code examples are meant to show a basic method of accessing DialogTech's Click-to-Voicemail API.
<?php
/*
Click-to-Voicemail:
This example will use access_key and secret_access_key
for a Click-to-Voicemail
*/
// create curl resource
$ch = curl_init();
$baseuri = "https://secure.dialogtech.com/ibp_api.php?";
// API Specific Static Parameters
$action = "clickto.voicemail";
// Required User Parameters
$access_key = "foo";
$secret_access_key = "bar";
$vmail_box_id = "12345";
$phone_to_call = "5551112222";
// Construct the full URL
$full_url = $baseuri . "&action=" . $action .
"&access_key=" . $access_key .
"&secret_access_key=" . $secret_access_key .
"&vmail_box_id=" . $vmail_box_id .
"&phone_to_call=" . $phone_to_call;
// Set the URL
curl_setopt($ch, CURLOPT_URL, $full_url);
// Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Sets the $output variable to the result of the curl
$output = curl_exec($ch);
// Close curl resource to free up system resources
curl_close($ch);
// Send the API output to the php page
echo "API response is: " . $output;
?>
Example Response
Call Connected