We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Phone System

How can I use the Barracuda Phone System's REST API to pull CDR data?

  • Type: Knowledgebase
  • Date changed: 7 months ago

Solution #00005529

 

Scope:

This solution applies to all Barracuda Phone Systems running firmware 2.1 or later.

 

Answer:

Some users need the ability to export call data for custom reporting. The best method for doing this is using the REST API to pull the data from the server. This document outlines the basics of accomplishing this task. 


Command Structure:

The basic command will look like this:

curl -H 'content-type: application/json' 'cudatel.local/gui/cdr/cdr?__auth_user=admin&__auth_pass=0000'

Where the "0000" is replaced with the admin password.

The following parameters may be passed in:
  • sortorder
  • sortby
  • search_string
  • bbx_cdr_id
  • page
  • rows
  • direction
  • start_timestamp_begin
  • start_timestamp_end
  • since
  • between

Call Direction Options:

The direction of the cdr defaults to only showing inbound cdrs. Set the param 'show_outbound' to true if you want to see outbound, or specify direction=outbound to show only outbound.

If search_string is given, the individual words are looked for in caller_id_name, caller_id_number, destination_name, destination_number, context, hangup_cause and uuid in a case insensitive manner.

This will include the last 500 inbound and outbound cdrs:

curl -H 'content-type: application/json' 'cudatel.local/gui/cdr/cdr?__auth_user=admin&__auth_pass=0000&show_outbound=1&rows=500'


Response Format:


A sample response will look like this:

{
"count" : "1",
"page" : 1,
"cdr" : [
{
"write_rate" : "8000",
"bleg_uuid" : "089330e0-4985-46ae-84c3-e5daaaf703c3",
"caller_id_name" : "test user",
"caller_bbx_user_id" : null,
"accountcode" : "2001",
"read_rate" : "8000",
"end_timestamp" : "2011-02-24 19:32:36.908796",
"write_codec" : "PCMU",
"uuid" : "10b631aa-8299-4ccc-b322-3e7baf4013ef",
"direction" : "inbound",
"destination_name" : "MARTIN ND",
"bbx_queue_id" : null,
"read_codec" : "PCMU",
"context" : "default",
"destination_number" : "7016252517",
"gateway_name" : null,
"outbound_route" : null,
"caller_id_number" : "2001",
"record_file_name" : "",
"processed" : 1,
"duration" : "563",
"bbx_cdr_id" : "11",
"network_addr" : "192.168.1.100",
"hangup_cause" : "NORMAL_CLEARING",
"bbx_fax_inbound_id" : null,
"callee_bbx_user_id" : null,
"record_keep_days" : null,
"billsec" : "563",
"answer_timestamp" : "2011-02-24 19:28:21.908796",
"start_timestamp" : "2011-02-24 19:28:15.908796",
"bbx_fax_outbound_id" : null,
"call_type" : ""
}
],
"rows" : "500"
}


Link to this page:

https://campus.barracuda.com/solution/50160000000IRtOAAW