CDR API
Note the q parameter is new and we are planning on releasing it soon. For now it is for reference and maybe subject to change - please check back for more information
https://www.babblevoice.com/api/cdr
This URL on its own will return a table of CDR data. It has some search parameters.
- 'p' page the page index, default 0
- 'ps' page size (the number of records to be returned), default 10, maximum 200
- 'd' domain, required
- 'f' date format, 'dateasepoch' or nothing.
- 'q' query - see below for more detail
The table of data returned is a simplified table. Call data contains multiple entries per phone call. This is because calls can contain multiple parties, or transferred to multiple of extensions. A call which is generated via the TAPI driver, or simpledial interface will also contain multiple entries as the initial trigger is considered a call.
This interface simplifies the data by aggregating data into one call per line and as a result some information is lost. It tries to guess the most common scenarios.
Examples
https://www.babblevoice.com/api/cdr?p=0&ps=10&d=omniis.babblevoice.com
The query parameter is used to filter the results by certain information. The parameter takes on the same format as a URL encoded string, but the '=' and '&' are both url encoded themselves. There are 2 sub parameters currently available:
- number - this will search the database for a caller id of the phone number or the destination dialled for the phone number, the phone number must be an exact match. It can be used in conjunction with date
- date - return a result set for a specified date, formatted as yyyy-mm-dd
https://www.babblevoice.com/api/cdr?d=omniis.babblevoice.com&q=number%3D0123456789%26date%3D2013-10-13
https://www.babblevoice.com/api/cdr/spendbycaller
Warning, this method is being depreciated in favour of statistics API, do not use this use the stats in the relevenet area (i.e. device, domain)
This URL will return CDR but grouped by caller that have made chargeable calls against the domain.
It has the following search parameters
- 'd' domain (see cdr api above), required
https://www.babblevoice.com/api/cdr/getauthenticatedurl
This returns a URL of the call recording (if one exists). The URL is authenticated for 4 hours and will become redundant after that.
The parameters:
- 'u' unique id, this is available from the CDR list, required
- 'f' filename, optional, this will set the content-disposition in the request to the name of the file requested, will not sent content-type header though