CDR API

The CDR API is a part of the accounts function with in the API, and will automatically filter CDRs down the the account level provided.

URI

 

/cdrs

 

Resource Parameters

Property
Description
Validation
Modifiable
id A character string that uniquely identifies the Call Detail Record no
digits_dialed What DTMFs were dialed (“none” is none were pressed) no
duration_seconds The call duration no
billing_seconds The call billing duration no
ringing_seconds The call ringing duration no
call_direction The direction of the call no
timestamp The timestamp when the record was created (in Gregorian seconds) no
hangup_cause The hangup cause code no
call_id The unique ID of the call no
to_uri The to SIP URI no
from_uri The from SIP URI no
The list above is not intended to be exhaustive; other fields may make it into the CDR depending on various circumstances, and some fields above may not be part of the listing

 

Operations

Verb
Accepted
Returned
Description
GET ALL Retrieves a collection of CDR

 

Response Codes

Normal Response Code(s): 200

Error Response Code(s): 400, 401, 415, 500, 503, 504

 

CDR Details

URI

 

/cdrs/{id}

 

Resource Parameters

Property
Description
Validation
Modifiable
id A character string that uniquely identifies the Voicemail Management no
hangup_cause The hangup cause code no
call_id The unique ID of the call no
other_leg_call_id The unique ID of the other leg of the call no
timestamp The timestamp when the record was created, in gregorian seconds) no
call_direction The direction of the call no
to_uri The to SIP URI no
from_uri The from SIP URI no
duration_seconds The call duration no
billing_seconds The call billing duration no
ringing_seconds The call ringing duration no
remote_sdp The remote SDP from the initial call setup no
local_sdp The local SDP from the initial call setup no
caller_id_name The CID name of the caller no
caller_id_number The CID number of the caller no
callee_id_name The CID name of the callee no
callee_id_number The CID number of the callee no
custom_channel_vars.endpoint_id Endpoint ID no
custom_channel_vars.tenant_id Tenant ID no
custom_channel_vars.access_group Access Group no
custom_channel_vars.username Username no
custom_channel_vars.realm Realm no
custom_channel_vars.account_id Account ID no
custom_channel_vars.inception Inception no
custom_channel_vars.authorizing_id Authorizing ID no
cid_type The source of the CID no
user_agent The reported user-agent of the call no
digits_dialed Digits dialed to create the call no
handling_server_name AVP Media NodeĀ in charge of the call no
app_name Application name no
app_version Application version no
event_name Event name no
event_category Event categoy no
server_id Server ID no

As above, this list is not intended to be exhaustive

 

Operations

Verb
Accepted
Returned
Description
GET ALL Retrieves all the details of the CDR ID

You can download a CSV instead of JSON for any request you make. Change the Accept: parameter to “application/octet-stream” in whatever programming language you are using. If you want to test this via Curl, this is an example:

curl -v -H “Accept: application/octet-stream” http://api.avpnet.us:{PORT}/v1/accounts/YOUR_ACCOUNT_ID/cdrs?auth_token=YOUR_AUTH_TOKEN

That will download a comma-separated list (CSV) for you to load into a program like Excel for processing.

Response Codes

Normal Response Code(s): 200

Error Response Code(s): 400, 401, 415, 500, 503, 504

 

Use Cases

Striked functionnalities are Not Yet Implemented

  • List call detail records
  • List call detail records that occurred within a certain time period
  • Search call detail records within a certain time period
  • Download/export call detail records within a certain time period
  • Upload additional call detail information (tagged as “imported”)
  • Filter call detail records on alternate fields based on customer, area code/number, to/from destination, IP address, SIP address, RTP address

 

Updated on June 15, 2017

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Submit Ticket

Leave a Comment