Read CDRs

POST/?object=cdr2&action=read

Request URL

POST
https://uc.hopdial.com/ns-api/?object=cdr2&action=read

Send your access token in the Authorization: Bearer header. Body parameters are sent as application/x-www-form-urlencoded. New to the API? Start with authentication and rate limits.

Parameters

NameTypeDescription
raw
optionalbody
string

Include Raw cdr information

Default: no

qos
optionalbody
string

Show QOS stats for call. Raw must also be set to yes.

Default: no

domain
optionalbody
string

Filter results by domain

user
optionalbody
string

Filter results by user. Also known as Subscriber in these docs

start_date
optionalbody
string (date)

Start date

Default: today – 7 days

end_date
optionalbody
string (date)

End Date

Default: End of Current day

type
optionalbody
string

Must be "Inbound", "Outbound", "Received", "Missed", "On-net", "Off-net"

start
optionalbody
string

The offset from the beginning of the list

limit
optionalbody
string

Number of CDR records retrieved at once

Default: 100

sort
optionalbody
string

(In NS Documentation but doesn't work) - This compromises one of the field names to sort by and "desc" or "asc". Example: "time_start asc".

format
optionalbody
string

Must be "xml" or "json"

Default: xml

Example request

text
curl https://uc.hopdial.com/ns-api/ \
   -H 'Authorization: Bearer 7bet078rqljh451l31uh34lsd0f80dsf' \
   -d object='cdr2' \
   -d action='read' \
   -d domain='1234.11111.service' \
   -d start_date='2018-04-23 00:00:00' \
   -d end_date='2018-04-24 00:00:00' \

Responses

200 · application/xml
<xml>
  <cdr>
    <domain>abc.resller.service</domain>
    <territory>20301</territory>
    <type>0</type>
    <cdr_id>1524182357659ad9eee2369cfb7753946bf28a78b7</cdr_id>
    <orig_sub>domain</orig_sub>
    <orig_from_uri>sip:[email protected]</orig_from_uri>
    <orig_from_name/>
    <orig_to_user>17186335873</orig_to_user>
    <orig_req_uri>sip:[email protected]</orig_req_uri>
    <orig_req_user>17186335873</orig_req_user>
    <by_sub/>
    <term_sub/>
    <term_to_uri>sip:[email protected]</term_to_uri>
    <time_start>1524182357</time_start>
    <time_answer>1524182397</time_answer>
    <time_release>1524182819</time_release>
    <duration>422</duration>
    <time_talking>422</time_talking>
    <hide>0</hide>
    <tag/>
  </cdr>
  <cdr>
    <domain>palmgardens.20301.service</domain>
    <territory>20301</territory>
    <type>1</type>
    <cdr_id>1524182154c676ec2922dea0fe771ce36ff399bcde</cdr_id>
    <orig_sub/>
    <orig_from_uri>sip:[email protected]</orig_from_uri>
    <orig_from_name>6466627817</orig_from_name>
    <orig_to_user>13474177820</orig_to_user>
    <orig_req_uri>sip:[email protected]</orig_req_uri>
    <orig_req_user>13474177820</orig_req_user>
    <by_sub/>
    <term_sub>domain</term_sub>
    <term_to_uri>sip:[email protected]</term_to_uri>
    <time_start>1524182154</time_start>
    <time_answer>1524182159</time_answer>
    <time_release>1524182243</time_release>
    <duration>84</duration>
    <time_talking>84</time_talking>
    <hide>0</hide>
    <tag/>
  </cdr>
</xml>
400 · application/json
{}

Need a Client ID and Client Secret or help with this endpoint? Contact HopDial support or call (866) 305-0407.