CDR API

apirest.cdr_serializers.VoIPCallSerializer

Read:

CURL Usage:

curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/cdr/

curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/cdr/%cdr-id%/

Response:

{
  "count": 556,
  "next": "http://127.0.0.1:8000/rest-api/cdr/?page=2",
  "previous": null,
  "results": [
    {
      "url": "http://127.0.0.1:8000/rest-api/cdr/309403/",
      "callid": "38f343d0-7377-11e7-b7b0-5c514f6a0f72",
      "callerid": "10559410413",
      "phone_number": "43982080909",
      "starting_date": "2017-07-28T16:10:15.158452Z",
      "duration": 681,
      "billsec": 670,
      "call_cost": "0.00000",
      "billed_duration": 0,
      "hangup_cause_q850": 16,
      "leg_type": 1,
      "amd_status": 3,
      "callrequest": "http://127.0.0.1:8000/rest-api/callrequest/129465/",
      "campaign": "http://127.0.0.1:8000/rest-api/campaigns/138/",
      "subscriber_id": 2978078,
      "contact_id": 2906672
    },
    {
      "url": "http://127.0.0.1:8000/rest-api/cdr/309404/",
      "callid": "38f343d1-7377-11e7-b7b0-5c514f6a0f72",
      "callerid": "41826069928",
      "phone_number": "79289123003",
      "starting_date": "2017-07-28T11:14:15.231771Z",
      "duration": 552,
      "billsec": 544,
      "call_cost": "0.00000",
      "billed_duration": 0,
      "hangup_cause_q850": 16,
      "leg_type": 1,
      "amd_status": 2,
      "callrequest": "http://127.0.0.1:8000/rest-api/callrequest/129466/",
      "campaign": "http://127.0.0.1:8000/rest-api/campaigns/138/",
      "subscriber_id": 2978080,
      "contact_id": 2906675
    },
    ...
    ...
  ]
}