Calls

Retrieve call detail records

Retrieve a list of call detail records (CDR) with filtering and pagination options.

Important notes:

  • Results can be filtered by date range, call type, phone numbers, SIP account, AMD status and hangup cause
  • Supports both JSON and CSV export formats
  • Use pagination for large result sets
  • Statistics include total count, duration, and cost

When to use:

  • Generating call history reports
  • Analyzing call patterns and costs
  • Exporting billing data
  • Monitoring SIP account usage

See also: calls_statistics, totals for the same filters.

get/api/v1/calls

Request

  • Base URL: https://app.didlogic.com
  • URL: https://app.didlogic.com/api/v1/calls
  • Auth: HTTP bearer

Query parameters

type'sip' | 'web' | 'incoming' | 'api'

Filter by call type (sip = outbound SIP calls, web = outbound web calls, api = outbound API calls, incoming = received calls)

missed'0' | '1'

Include missed calls in results (0 = exclude, 1 = include)

from_searchstring

Filter by caller phone number (partial match supported)

to_searchstring

Filter by destination phone number (partial match supported)

amd_statusstring

Return only calls with this answering machine detection (AMD) verdict, matched ignoring case:

  • machine — AMD detected an answering machine
  • human — AMD detected a person
  • notsure — AMD ran but could not tell a machine from a person, for example on silence, unclear audio or a timeout

Only outbound calls carry a verdict, so type=incoming with this filter returns no calls. A value that no call has returns no calls. A malformed value, for example one with | or non-ASCII characters, is ignored, as if the parameter were not sent.

hangup_cause'AMD_MACHINE' | 'NORMAL_CLEARING' | 'NO_ANSWER' | 'BUSY' | 'FAILED'

Return only calls that ended this way, matched ignoring case:

  • AMD_MACHINE — AMD detected an answering machine; takes precedence over the other values
  • NORMAL_CLEARING — the call was answered
  • NO_ANSWER — nobody answered, including calls the caller cancelled before an answer
  • BUSY — the called party was busy
  • FAILED — the call could not be connected

A value that no call has returns no calls. A malformed value, for example one with | or non-ASCII characters, is ignored, as if the parameter were not sent.

filterstring

Filter by phone number (alphanumeric, spaces, hyphens, underscores)

sip_accountstring

SIP account name from sipaccounts_index

fromstring date

Start date for filtering (inclusive). Format YYYY-MM-DD

tostring date

End date for filtering (inclusive). Format YYYY-MM-DD

allboolean

Return all records (ignores pagination). Use with caution for large datasets.

pageinteger

Page number to retrieve (1-based)

per_pageinteger

Number of records per page (max 1000)

Response

Successfully retrieved CDR records

Example response

{
  "calls": [
    {
      "timestamp": "2024-01-15T10:30:00Z",
      "type": "sip",
      "amount": 0.05,
      "duration": 120,
      "from": "100",
      "to": "+14155551234",
      "amd_status": "machine",
      "amd_score": 93,
      "hangup_cause": "NORMAL_CLEARING",
      "destination_name": "United States",
      "sip_account": "john@sip.provider.com",
      "per_minute": 0.025
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total_pages": 325,
    "total_records": 3248
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.