getCustomerCDRs()

This application is used to get CDRs of a Customer. Only CDRs of sub-customers that belongs to authenticated customer can be fetched. The application returns only CDRs for the last hour if not specified exactly. The application returns CDRs for all sub-customers if not specified exactly.

Implementation details

This function supports trusted mode in which case i_wholesaler (integer) parameter should be supplied.

Parameters:

  • i_customer - i_customer of a customer. Integer. Optional.
  • offset - skip fist offset CDRs. Integer. Optional.
  • limit - return only limit CDRs. Integer. Optional.
  • start_date - fetch CDRs from start_date, format is '%H:%M:%S.000 GMT %a %b %d %Y' (e.g. 09:57:29.000 GMT Wed Nov 18 2009). String. Optional.
  • end_date - fetch CDRs till end_date, format is '%H:%M:%S.000 GMT %a %b %d %Y' (e.g. 09:57:29.000 GMT Wed Nov 18 2009). String. Optional.
  • cli - fetch CDRs with CLI (after translation rules applied) like cli. String. Optional.
  • cld - fetch CDRs with CLD (after translation rules applied) like cld. String. Optional.
  • i_cdrs_customer - fetch only one CDR using the specified value. Optional.
  • type - type of fetched CDRs. String. Optional. Possible values:
    • non_zero_and_errors - return only non-zero duration and errors CDRs (default)
    • non_zero - return only non-zero duration CDRs
    • all - return all CDRs
    • complete - return only CDRs of completed calls
    • incomplete - return only CDRs of incomplete calls
    • errors - return errors CDRs

Returns:

  • result - OK means that query was successfully. String.
  • cdrs - an array containing structures:
    • i_customer - i_customer of a customer. Integer.
    • setup_time - setup time of call in '%H:%M:%S.000 GMT %a %b %d %Y' format (e.g. 09:57:29.000 GMT Wed Nov 18 2009). String.
    • connect_time - connect time of call in '%H:%M:%S.000 GMT %a %b %d %Y' format (e.g. 09:57:29.000 GMT Wed Nov 18 2009). String.
    • billed_duration - billed duration of call in seconds. Integer.
    • cli - CLI of call after incoming translation rules have been applied. String.
    • cld - CLD of call after incoming translation rules have been applied . String.
    • cli_in - CLI of call before any translation has been applied. String.
    • cld_in - CLD of call before any translation has been applied. String.
    • cost - Amount charged from sub-customer for the call in base currency of customer. String.
    • country - Dialed country. String.
    • description - Description of dialed destination. String.
    • remote_ip - Remote ip address of call originator. String.
    • result - Call result. Integer.
  • XMLRPC fault in case of any error.