Support ⋟ API Documentation
Read a quick overview on our API!
API Documentation
The Tossable Digits API allows customers to access, create and cancel services offered by Tossable Digits. The API accessible using two methods: SOAP and HTTP. The API keys used to access the API are keyed to a specific user.To get started, go to the Sandbox Website, https://Sandbox.TossableDigits.com/ in your web browser and log in. It may take up to an hour after you create your account for it to work on the Sandbox server. Once you log in, click Profile and create a new API key. This API key will ONLY WORK on the Sandbox server. When you are ready for production, you can repeat this process on the production website where you'll get a different API key. This separation is to prevent accidental purchase of Virtual Numbers.
HTTP
The HTTP API interface is a simple GET or POST to a URL. We highly recommend that you use POST rather than get, as a few API calls require POST and will not work using GET. The Response returned is either a JSON object or a serialized PHP string. Methods are implemented using the method key, with the value being the name of the method as described below. Response format is controlled by the format key. Valid values for format are json or php_serial. If format is not passed, the response defaults to json. All values must be url encoded.The response will be an object that contains 3 values:
-
status boolean - FALSE on any errors or failures, TRUE on success.
- msgs array - An array of messages, usually error strings, for the given response. Usually empty if status is TRUE.
- data mixed - Each method may return a unique datatype. Possible return values are an object, an array, a string or an integer.
The URL for the HTTP API interface:
Production: https://www.TossableDigits.com/apihttp.php
Sandbox: https://Sandbox.TossableDigits.com/apihttp.php
An example valid HTTP call:
https://www.TossableDigits.com/apihttp.php?method=numberGetCities&apikey=28555a573ff8ece16763db691aae8e62&countryid=DK®ionid=noRegion&format=json
An example error response (JSON):{ "msgs":[], "status":true, "data":[ { "countryid":"DK", "regionid":"noRegion", "ratecenter":"NORATECENTER", "city":"GEOGRAPHICAL", "prefix":"6", "rate_monthly":"9.79", "rate_setup":0 } ] }
{ "msgs": [ "Required value forward not set or is empty" ], "status": false, "data": null }
An example error response (PHP Serialized String):
a:3:{s:4:"msgs";a:1:{i:0;s:42:"Required value forward not set or is empty";}s:6:"status";b:0;s:4:"data";N;}
Example Code
<?php
// Get Countries
$res = unserialize(file_get_contents('https://Sandbox.TossableDigits.com/apihttp.php?apikey=28555a573ff8ece16763db691aae8e62&method=numberGetCountries&format=php_serial'));
if ($res['status']) {
$countries = $res['data'];
} else {
// There was an error. See $res['msgs'] for the specific error
}
SOAP
The SOAP WSDL is available here:Production: https://www.TossableDigits.com/apisoap.php?wsdl
Sandbox: https://Sandbox.TossableDigits.com/apisoap.php?wsdl
Methods are described below, as are the specific fields.
Example Code
<?php
/**
* Get Countries.
* Example uses the PHP SOAP Client, https://us.php.net/manual/en/class.soapclient.php
* Found within the PHP SOAP Library, https://us.php.net/manual/en/book.soap.php
*/
try {
$soap = new SoapClient('https://Sandbox.TossableDigits.com/apisoap.php?wsdl');
// To display the functions and their parameter positions, call ();
$res = $soap->numberGetRegions('28555a573ff8ece16763db691aae8e62', 'US');
// OR
$res2 = $soap->__soapCall(
'numberGetRegions',
array(
'apikey' => '28555a573ff8ece16763db691aae8e62',
'countryid' => 'US',
)
);
} catch (Exception $e) {
echo "Exception Error: " . $e->getMessage();
die();
}
/**
* $res now and $res2 should contain the same data
* and should be an array of Region objects
*/
print_r($res);
Document Definitions
- The term DID as used in this document describes a E.164 phone number.
-
The term extensions in this document describes the provisioning of a DID (virtual phone number) for use.
Field Specific Details
Fields used in the API methods are documented here.- Fields did, forward, to and from must include the country dialing code (1 US, 44 UK, etc). We follow the E.164 format, using only numeric values and always including the country dialing code. For example, a New York, NY number should be passed as 12125004000. A London, UK number should be passed as 442070403000.
- Field didmatch can be a full phone number, or just the first portion of a number. For example, if you wanted to see all the extensions in your account for New York, NY 212, you would set didmatch to 1212.
- Field callid is a unique identifier for a call. It is always a 32 character MD5 string.
- Field apikey is always a 32 character MD5 hash, provided by Tossable Digits. You can create and expire API keys in the Profile section of your account.
-
Fields startdate and enddate accept both unix timestamps (number of seconds from the
epoch, January 1, 1970 UTC) as well as GNU date input formats.
For extensionCreate and extensionUpdate
these fields must be greater than or equal to the current time, or an error will be returned. For
callSummary and callRecords startdate must simply be before enddate.
-
Fields added, startdate and enddate are always returned in unix
timestamp format, which is always in UTC (Coordinated Universal Time).
- Fields extension and extensionLength allow you to create extensions on a given number, as well as modify the length of extensions. This is currently not implemented. Passing these fields will result in an error.
-
Field alias is a custom field, accepting 255 characters, allowing a unique string to identify the extension.
Methods
These are the valid methods, or functions, that can be called.
- extensionCreate
- extensionUpdate
- extensionCancel
- extensionList
- extensionGet
- extensionFeatureGet
- extensionFeatureSet
- extensionVoicemailGet
- extensionVoicemailSet
- extensionCallRecordingGet
- extensionCallRecordingSet
- extensionOutdial
- audioclipGet
- audioclipSet
- audioclipNew
- audioclipList
- numberListPool
- numberGetCountries
- numberGetRegions
- numberGetCities
- numberGetTollFree
- smsList
- smsGet
- smsSend
- callSummary
- callRecords
extensionCreate
Create a new Virtual Number. To find the Virtual Number you wish to purchase,
see numberGetCountries, numberGetRegions, numberGetCities and
numberGetTollFree.
You'll need this information from these functions to find the correct Virtual Number.
If startdate is not specified, the extension will begin working immediately. If enddate is not specified, extension will remain in service until manually canceled, either on the website or via the API.
If startdate is not specified, the extension will begin working immediately. If enddate is not specified, extension will remain in service until manually canceled, either on the website or via the API.
Required
- apikey
- forward
- countryid
The ISO3166 2-letter Country Code, from numberGetCountries - regionid
The 2-letter US State or Canadian Province, or 'noRegion' from numberGetRegions - ratecenter AND/OR city
NANPA ratecenter name AND/OR city name from numberGetCities
Optional
- enddate
- alias
- didmatch
You can specify the area code or city code you want. For example, for New York City didmatch of '1718' would make sure you got a 718 area code Virtual Number. - startdate
Returns
extensionUpdate
Update an existing extension. If did is specified and has multiple extensions, an error will be returned. Field extensionid will guarantee that the correct extension will be updated. Extensions that are past their enddate will return an error.Required
extensionCancel
Cancel an existing extension. Effectively does an extensionUpdate and sets enddate to now. Extensions that are past their enddate will return an error.Required
Optional
- extension -- If the number is shared, this is your 5 digit extension
Returns
extensionList
List all extensions, including both active and disconnected extensions/Virtual Numbers. Optionally show only disconnected or active extensions.Required
Optional
- didmatch
- active -- 0 to show only extensions that have been disconnected, 1 to show only extensions that are currently active.
Returns
- Array of Extension objects
extensionGet
Get details for a single extension. Search by did, extensionid or alias. May return multiple results.Required
- extension -- If the number is shared, this is your 5 digit extension
Returns
- Array of Extension objects
extensionFeatureGet
Get a list of features that are set and associated with a given extension.Required
- extension -- If the number is shared, this is your 5 digit extension
Returns
-
Array of Feature objects for the given extension
extensionFeatureSet
Set a feature status and associated options.Required
- apikey
- did or extensionid
- name
- rtime (Do Not Disturb)
- outdial (Place outbound calls with Virtual Number as CallerID)
- screen (Call Screening -- ask caller name before ringing forwarding number)
- vm (Voicemail)
- clid (CallerID)
- callrec (Call Recording)
- sms (SMS Text Messaging)
- callmsg (Call Announce)
- status -- 1 or 0 (On or Off)
Optional
Depending on the name of the feature being set, there are additional optional values that can be passed to control additional aspecs of the feature. When specifying any additional optional value, ALL optional values must be passed.
- extension -- If the number is shared, this is your 5 digit extension
- When name=rtime
-
start -- Hour to start accepting calls
-
end -- Hour to end accepting calls
- tz -- Timezone (View POSIX names supported by the Olson tz database)
-
fakering -- Number of seconds to fake ringing outside of Call Accepting hours before playing message/going to Voicemail
-
clipid -- The ID of the audio clip to play. Defaults to rtimedefault
-
neverforward - 1 or 0 (On or Off). If On, never forwards calls.
- When name=clid
-
isset -- CallerID when CallerID is available; Valid options: fwd (Forward Callers Number, default), line (Show the Virtual Number), block (block callerid)
-
notset -- CallerID when CallerID is NOT available; Valid options: fwd, line, block
- When name=vm
-
timeout -- Number of seconds before Voicemail answers. 6 seconds per ring.
-
email -- 1 or 0 (On or Off). If On, sends voicemail to 'emailTo' value.
- emailTo -- The email address to send voicemail as an attachment to.
- clipid -- The ID of the audio clip to play. Defaults to vmdefault
- When name=screen
-
clipid -- The ID of the audio clip to play. Defaults to screendefault
- When name=callrec
-
disablenotify -- 1 or 0 (On or Off). If On, supresses playback of a notification played to both parties
that the call being recorded.
-
email -- 1 or 0 (On or Off). If On, sends Call Recordings to 'emailTo' value.
- emailTo -- The email address to send voicemail as an attachment to.
- When name=sms
-
email -- 1 or 0 (On or Off). If On, sends SMS message via email to 'emailTo' value.
- emailTo -- The email address to send the SMS message to.
-
forward -- 1 or 0 (On or Off). If On, forwards the SMS message to the phone number(s) in 'forwardTo' value.
- forwardTo -- A comma delimited list of US or Canada phone numbers to forward the SMS message to.
- When name=callmsg
-
clipid -- The ID of the audio clip to play.
*NOTE: On Nov 15, 2022, the "promptme" option has been removed from the "vm" Feature and is now always enabled.
extensionVoicemailGet
Get a list of voicemails for a given extension. Returned in order of most recent to oldest.Required
Optional
- vmid -- The ID of the Voicemail
- clipid -- The AudioclipID of the Voicemail; found in callRecords
- extension -- If the number is shared, this is your 5 digit extension
Returns
-
Array of Voicemail objects
extensionVoicemailSet
Set the status of a voicemail. Currently only supports deleting a voicemail.Required
- apikey
-
did or extensionid
-
status -- deleted (only supported status)
- One of:
- vmid -- The VMID from extensionVoicemailGet
- clipid -- The AudioclipID from callRecords
Optional
- extension -- If the number is shared, this is your 5 digit extension
Returns
-
No data
extensionCallRecordingGet
Get a list of Call Recordings for a given extension. Returned in order of most recent to oldest.Required
Optional
- crid -- The ID of the Call Recording
- clipid -- The AudioclipID of the Voicemail; found in callRecords
- extension -- If the number is shared, this is your 5 digit extension
Returns
-
Array of Call Recording objects
extensionCallRecordingSet
Set the status of a Call Recording. Currently only supports deleting a Call Recording.Required
- apikey
-
did or extensionid
- status -- deleted (only supported status)
- One of:
- crid -- The CRID from extensionCallRecordingGet
- clipid -- The AudioclipID from callRecords
Optional
- extension -- If the number is shared, this is your 5 digit extension
Returns
-
No data
extensionOutdial
Make an outbound call to callbacknum, then connect that call to calltonum using the Phone Number found for did or extensionid as CallerID. Also known as click-to-call or callback functionality.Required
- apikey
-
did or extensionid
-
callbacknum -- The e.164 phone number of the party who is initiating the call. The
phone will ring, and once answered, the person at this number will hear ringing until the
calltonum party answers. To call Extensions, add commas at the end of the number to
indicate a 2-second delay, then include the extension. For example, 18004321000,,5125 would dial
+1 800 432 1000, wait 4 seconds, then
dial extension 5125 and connect the call. When dialing an Extension,
humancheck is enabled automatically and cannot be disabled.
- calltonum -- The e.164 phone number of the party to be called. To call Extensions, see the instructions for callbacknum.
Optional
- extension -- If the number is shared, this is your 5 digit extension
- callerid -- Set to "0" to block CallerID on the outbound call. If the CallerID Waiver has been signed and your account enabled, this value sets the CallerID in the calltonum leg of the call.
- humancheck -- 1 (one, enabled) or 0 (zero, disabled). Require the human that answers the Call Back call to Press 1 to complete the call. Defaults to enabled (1).
- record -- 1 (one, enabled) or 0 (zero, disabled). Override the Call Recording status on the Virtual Number for the call and do or do not record the call.
Returns
- calltag -- a UUID identifier for the Outdial call. This is returned in our callRecords API and is searchable.
audioclipGet
Get the details and file data for the given clipid. File data is base64 encoded by default, and all files are MP3 encoded at 11,025 Hz.SECURITY NOTE: USE THE returntype=url and return that URL to your customers. The URL expires after 15 minutes. DO NOT expose this API directly to your customers. If you do, your API key will be stolen and could steal services and charges that you will be responsible for. If you want permanent access to the audio, download the file to your own servers and serve the content from there.
Sample Code (PHP)
<?php
$res = unserialize(file_get_contents('https://Sandbox.TossableDigits.com/apihttp.php?apikey=28555a573ff8ece16763db691aae8e62&method=audioclipGet&clipid=999999&format=php_serial'));
file_put_contents('/tmp/xyz.mp3', base64_decode($res['data']['filedata']));
- apikey
- clipid -- AudioClip ID. Provided by callRecords, audioclipList and extensionVoicemailList
Optional
- returntype
- base64 default -- Returns base64-encoded file data
- url -- Returns a URL to the mp3 file; expires after 15 minutes
Returns
- Audioclip Object
- If the Audioclip has been deleted, the msgs response array will contain a message indicating that the clip is deleted, and filedata will be an empty string.
audioclipSet
Set details about the audioclip. Currently you can only modify the clipname.Sample Code (PHP)
<?php
$res = unserialize(file_get_contents('https://Sandbox.TossableDigits.com/apihttp.php?apikey=28555a573ff8ece16763db691aae8e62&method=audioclipSet&clipid=999999&clipname=Rock+On&format=php_serial'));
if ($res['status']) {
echo $res['data']['clipname']; // Rock On
}
- apikey
- clipid -- Provided by audioclipList or extensionVoicemailList
- clipname
audioclipNew
Create a new audioclip for use as an outgoing Voicemail, Do Not Disturb or Screening message. File should be in MP3, WAV, AU or UL file, be fairly short, and base64 encoded. We will transcode whatever you upload to the best quality for our internal use. Most telephone calls are encoded at 8k Hz mono, so consider this when creating your files. You MUST use HTTP POST rather than GET, as GETs only support about 1000-2000 bytes, and most audio files will far exceed that size.Sample Code (PHP)
<?php
// You MUST use POST for this API method.
include_once 'HTTP/Request.php';
$r =& new HTTP_Request('https://Sandbox.TossableDigits.com/apihttp.php');
$r->setMethod(HTTP_REQUEST_METHOD_POST);
$postvars = array(
'apikey' => '28555a573ff8ece16763db691aae8e62',
'method' => 'audioclipNew',
'format' => 'php_serial',
'clipname' => 'VM: Bob Jones',
'filesize' => '284325',
'filedata' => base64_encode(file_get_contents('/path/to/file-on-disk.mp3'))
);
foreach($postvars as $key => $val) {
$r->addPostData($key, $val);
}
$reqReturn = $r->sendRequest();
if (!PEAR::isError($reqReturn)) {
$res = unserialize($r->getResponseBody());
} else {
// there was an error in the HTTP call
}
if ($res['status']) {
echo $res['data']['clipname']; // VM: Bob Jones
} else {
// there was an error with the submitted data
}
- apikey
- filedata -- Encode the binary data into base64 encoded data
- clipname
- filesize -- If set, will return an error if we decode the base64 data and it does not come out to this value. Highly recommended to use this as an error check.
audioclipList
Search or List some or all of your audioclips. Returned in order of newest to oldest.Sample Code (PHP)
<?php
$res = unserialize(file_get_contents('https://Sandbox.TossableDigits.com/apihttp.php?apikey=28555a573ff8ece16763db691aae8e62&method=audioclipList&format=php_serial'));
if ($res['status']) {
echo count($res['data']); // The number of Audioclip objects returned.
}
Optional
- cliptype -- incoming|outgoing|callrec: Voicemails, Voicemail Outgoing Messages or Call Recordings.
- clipnamesearch -- Search the clipname field. Will search the field for the exact string or substring
- page -- Which set of 1,000 call records to return. Defaults to 1, the most recent 1,000 calls.
Returns
- Array of Audioclip Objects
numberListPool
List all DIDs in the pool.Required
Optional
- didmatch
- status -- inuse, quiet or avail
Returns
- Array of NumberPool objects
numberGetCountries
List all Countries with available numbers. Countryid is the two-letter ISO3166 Country Code.Required
Returns
- Array of Country objects
numberGetRegions
List all Regions within a given country with available numbers. Countries that do not have region boundries will always return 'noRegion' as the regionid. US returns regionid as 2 letter USPS state abbreviation. Canada returns regionid as 2 letter Canada Post province abbreviation.Required
numberGetCities
List all the cities within a given country and region with available numbers. Only includes local numbers, not special or toll free numbers. The data returned from this function can be used with extensionCreate.Required
- apikey
- countryid
- regionid
- sms (optional) - 1 to require SMS, 0 to return all available cities
Returns
- Array of City objects
numberGetTollFree
List all the prefixes and types of Toll Free numbers available. We currently only offer Toll Free numbers with US48 non-payphone coverage (tftype = 1).Required
smsGet
Get all matching SMS Messages.Required
- apikey
- One of:
- startdate AND enddate
- smsid
Optional
- didmatch
- did or extensionid
- direction -- one of: in, out, all
- page
- Array of SmsMessage objects
smsList
Get all list of all phone numbers that have sent or received SMS messages. Returns most recent first.Use didmatch to restrict to partial or full phone number match. For example, didmatch=1212 will return all SMS interactions with phone numbers in the US +1 212 area code.
Required
Optional
- startdate
- enddate
- didmatch
- did or extensionid
- direction -- one of: in, out, all
- page
- Array of SmsRecipient objects
smsSend
Send an SMS from a Virtual Number to a Phone Number.There are some limits on using our API to send SMS messages:
- No more than 3 SMS messages sent per second can be sent per account
- No more than 1 SMS message sent per second can be sent per Virtual Number
- The same message may not go to more than 8 different Phone Numbers in a 5 minute period
- No more than 150 SMS messages sent per hour per Virtual Number
- No more than 2,000 SMS messages sent per day per Virtual Number
- For every 3 SMS messages sent per Virtual Number, you must receive at least 1 SMS message incoming on that Virtual Number
If you send too many SMS messages, our API will fail to send the SMS message and will warn you that your rate limit has been exceeded.
Required
- apikey
- to -- The Phone Number to whom to send your SMS
- from -- A Virtual Number in your account that supports SMS
- message -- Your SMS message. Length Limits: 160 ASCII Characters; 140 UTF-8 Characters; 70 UCS-2 or 16-bit Characters
Returns
- smsid (string) -- A unique system identifier for the SMS Message
callSummary
Return a summary of calls for a given date range. Optional parameter didmatch matches on Virtual Number, CallerID and Forwarding Number fields. See callRecords description for further detail on didmatch.Required
- apikey
- startdate
- enddate
Optional
- extensionid or did
- didmatch -- Searches Virtual Number, CallerID and Forwarding Number fields. Note: Use sparingly with large date ranges as this is can be a slow search.
Returns
callRecords
Return a list of calls, 1,000 at a time, for a given date range, starting with the most recent call. To get
more than the first 1,000 call records, set page to a number greater than 1 for subsequent, non-overlapping
sets of 1,000 call records.
If didmatch is passed, also matches calls that begin with the value in didmatch in the Virtual Number, CallerID or Forward Number fields. For example, for a didmatch value of '1212500' will return any calls to a Virtual Number starting with that value, any calls FROM CallerID starting with that value, AND any calls that were forwarded to numbers matching that value. If extensionid or did is passed, returns only calls made to a given extension (Virtual Number).
Required
If didmatch is passed, also matches calls that begin with the value in didmatch in the Virtual Number, CallerID or Forward Number fields. For example, for a didmatch value of '1212500' will return any calls to a Virtual Number starting with that value, any calls FROM CallerID starting with that value, AND any calls that were forwarded to numbers matching that value. If extensionid or did is passed, returns only calls made to a given extension (Virtual Number).
Required
- apikey
- startdate
- enddate
Optional
- extensionid or did
- extension -- If the number is shared, this is your 5 digit extension
- didmatch -- Searches CallerID and Forwarding Number fields. Note: Use sparingly as this is a costly and slow search.
- callid -- The ID of the Call desired.
- page -- Which set of 1,000 call records to return. Defaults to 1, the most recent 1,000 calls.
- calltag -- For Outdial calls, the Call Tag returned from extensionOutdial.
Returns
- Array of callRecord Objects
Returned Objects
In some cases we return an Object or an Array of objects. This section describes what will be returned.
Extension
Returned by
extensionCreate,
extensionUpdate,
extensionCancel,
extensionList,
extensionGet.
Field Name | Data Type | Description |
extensionid | int | Unique Extension ID |
did | string | DID associated with the extension |
forward | string | DID that rings when called |
added | int | Unix timestamp extension was created |
startdate | int | Unix timestamp extension will be/became active |
enddate | int | Unix timestamp extension will be/became disconnected |
renewdate | int | Unix timestamp extension will renew |
alias | string | User-specified string to identify or describe the extension |
location | string | The City and Country the number is from. If US or Canada, includes the state or province. E.g. Los Angeles, CA US |
sms | int | 1 if the Virtual Number supports SMS, 0 if not |
Country
Returned by numberGetCountries.
Field Name | Data Type | Description |
countryid | string | Two letter ISO3166 Country Code |
countryname | string | Official ISO3166 Country Name |
countrycode | int | Country Dialing Code |
Region
Returned by numberGetRegions.
Field Name | Data Type | Description |
regionid | string | Region ID. US: Two Letter USPS State Abbreviation. CA: Two Letter Canada Post Province Abbreviation. Elsewhere: "noRegion" |
regionname | string | The name of the region |
City
Returned by numberGetCities.
Field Name | Data Type | Description |
countryid | string | Country ID |
regionid | string | Region ID |
ratecenter | string | NANPA Rate Center |
city | string | City Name |
prefix | string | City prefix. In +1 countries, NPA (area code) Int'l: city code |
rate_monthly | float | Amount billed per month for a number in this location. |
rate_setup | float | Amount billed once for setting up a number in this location. |
sms | integer | 1 for SMS Available, 0 when SMS is NOT Available. |
TollFree
Returned by numberGetTollFree.
Field Name | Data Type | Description |
countryid | string | Country ID |
regionid | string | Region ID |
ratecenter | string | NANPA Rate Center |
city | string | City Name |
prefix | string | City prefix. In +1 countries, NPA (area code) Int'l: city code |
tftype | int | 1: US, Canada, Puerto Rico; excludes payphones, N Mariana Islands, American Samoa |
rate_monthly | float | Amount billed per month for a number in this location. |
rate_setup | float | Amount billed once for setting up a number in this location. |
CallSummary
Returned by callSummary.
Field Name | Data Type | Description |
firstcall | int | Unix Timstamp of the start of the first call in the Summary |
lastcall | int | Unix Timestamp of the start of the last call in the Summary |
minduration | int | The shortest call length, in minutes |
maxduration | int | The longest call length, in minutes |
avgduration | float | The average call length, in minutes |
totalduration | int | The total call length, in minutes |
totalcalls | int | The total number of calls |
CallRecord
Returned by callRecords.
Field Name | Data Type | Description |
startdate | int | Unix Timstamp of the start of the call, in UTC/GMT |
duration | int | Call Length billed, in minutes. This may be zero (0) if the call was not billed. The seconds field fordetails on how long the call lasted, regardless of billing status. |
extensionid | int | The internal Extension ID |
callednum | string | The number that was called, i.e. your virtual number |
forwardnum | string | The number the call was forwarded to, if forwarded; 0 if not forwarded |
callernum | string | The number provided by CallerID |
callername | string | The name provided by CallerID (may be the same as callernum) |
status | string | The status of the call |
seconds | int | The duration in seconds of the time elapsed from the time the call was answered by Voicemail or by the forwarding phone until the time the call was hung up |
callid | string | A unique identifier for the call. |
cliptype | string | If an audio clip is associated with the call this field will identify the type of audio clip. If set, the value will either be vm for Voicemail or cr for Call Recording. If no audio clip is associated, this field will be empty. |
clipid | int | The unique clipid to pass to audioclipGet to retrieve the audio clip related to this call. If no audio clip is associated with the call, this field will be 0 (zero). |
calltag | string | The unique calltag that matches the value returned by extensionOutdial. |
Feature
Returned by
extensionFeatureGet,
extensionFeatureSet.
Field Name | Data Type | Description |
status | int | On (1) or Off (0) |
options | array | Array of key/value pairs |
feature | string | The short name of the feature: screen, vm, rtime, clid, outdial |
Voicemail
Returned by extensionVoicemailGet.
Field Name | Data Type | Description |
vmid | int | Internal Voicemail ID |
calleridname | string | CallerID Name data |
callerid | string | CallerID Number data |
callback | string | The phone number the caller entered as the callback number. |
timestamp | int | Unix Timestamp of the start of the call, in UTC/GMT |
length | int | The voicemail length, in seconds |
clipid | string | The ID of the clip (used to fetch the actual audio) |
callid | string | A unique identifier for the call. |
CallRecording
Returned by extensionCallRecordingGet.
Field Name | Data Type | Description |
crid | int | Internal Call Recording ID |
calleridname | string | CallerID Name data |
callerid | string | CallerID Number data |
forwardnum | string | Phone Number the call was forwarded to |
timestamp | int | Unix Timestamp of the start of the call, in UTC/GMT |
length | int | The Call Recording length, in seconds |
clipid | string | The ID of the clip (used to fetch the actual audio) |
callid | string | A unique identifier for the call. |
Audioclip
Returned by audioclipGet,
audioclipSet,
audioclipNew,
audioclipList.
Field Name | Data Type | Description |
clipid | int | Internal Audioclip ID |
clipname | string | User defined name for the clip |
filesize | int | The size in bytes of the Audioclip |
duration | int | The duration in seconds of the Audioclip |
added | int | Unix Timestamp of the Audioclip creation, in UTC/GMT |
cliptype | string | One of:
|
filedata | string | Empty for all except audioclipGet For audioclipGet MIME Type: audio/mpeg (mp3) returntype=base64: base64-encoded binary file data returntype=url: temporary URL for download; expires after 15 minutes |
SmsMessage
Returned by smsGet.
Field Name | Data Type | Description |
path | string | Direction of the SMS Message: in (to the Virtual Number) or out (from the Virtual Number) |
timestamp | int | Unix Timestamp when the SMS Message was sent/received |
source | string | The Phone Number that the SMS was from. For path=in, this is the sender. For path=out, this is the Virtual Number |
destination | string | The Phone Number that the SMS was to. For path=in, this is the Virtual Number. For path=out, this is the receipient Phone Number |
message | string | The content of the SMS Message |
smsid | string | The unique system identifier for this SMS message |
extensionid | int | The internal Extension ID |
SmsRecipient
Returned by smsList.
Field Name | Data Type | Description |
did | string | Virtual Number that the conversation occured on |
recipient | string | The full phone number of the recipient of the SMS conversation |
earliest | int | Unix Timestamp of the first SMS sent by or to the recipient |
latest | string | Unix Timestamp of the most recent SMS sent to or received from the recipient |
total | int | The total number of SMS messages between the Virtual Number and recipient |