getAccountCDRs()

  • This application is used to get CDRs of an account.
  • Only CDRs of account that belongs to authenticated customer can be fetched. 


  • Since version 2.2 the application returns only CDRs for the last hour if not specified exactly.
  • Since version 2.2 the application returns CDRs for all accounts if not specified exactly.


** The application supports trusted mode and i_customer parameter should be supplied in this case.



Parameters:

  • i_account - i_account of account. Integer. Optional (Required for version <= 2.1).
  • 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_cdr - return only specified CDR. String. Optional. (new since 4.4)
  • type - type of fetched CDRs. String. Optional. Possible values:
    • non_zero_and_errors - return only non-zero duration and errors CDRs (new since 2.2, default since 2.2)
    • non_zero - return only non-zero duration CDRs (default for version <= 2.1)
    • all - return all CDRs
    • complete - return only CDRs of completed calls
    • incomplete - return only CDRs of incomplete calls
    • errors - return errors CDRs (new since 2.2)

Returns:

  • result - OK means that query was successfully. String.
  • cdrs - an array containing structures:
    • i_account - i_account of account. Integer. (new in 2.2)
    • 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. (removed since 4.4)
    • 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.
    • plan_duration - number of seconds that was covered by account's minute plan. 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 account for the call in base currency of account. String.
    • country - Dialed country. String.
    • description - Description of dialed destination. String.
    • remote_ip - Remote ip address of call originator. String. (new in 2.2)
    • result - Call result. Integer. (new in 2.2)
    • protocol - used protocol (SIP/H.323/IAX2). String. (new in 4.4)
    • accessibility_cost - cost according to accessibility surcharges configured in Service plan of an account. Double. (new in 4.4)
    • grace_period - grace period of the call according to the tariff. Integer. (new in 4.4)
    • post_call_surcharge - post call surcharge applied to the call according to the tariff. Double. (new in 4.4)
    • connect_fee - connect fee applied to the call according to the tariff. Double. (new in 4.4)
    • free_seconds - free seconds of the call according to the tariff. Integer. (new in 4.4)
    • duration - duration of the call. Double. (new in 4.4)
    • interval_1 - interval 1 according to the rate of the tariff. Integer. (new in 4.4)
    • interval_n - interval N according to the rate of the tariff. Integer. (new in 4.4)
    • price_1 - price 1 according to the rate of the tariff. Double. (new in 4.4)
    • price_n - price N according to the rate of the tariff. Double. (new in 4.4)
    • delay - total delay for the call. Double. (new in 4.4)
    • pdd1xx - duration of time between sending outgoing INVITE and receiving first non-negative reply except 100 Trying (>100, 2xx). Double. (new in 4.4)
    • i_call - unique i_call value of the call. String. (new in 4.4)
    • call_id - call_id of the callString. (new in 4.4)
    • i_cdr - unique i_cdr value of the call. String. (new in 4.4)
    • prefix - rate prefix used of the call. String. (new in 4.4)
    • lrn_cld - translated LRN CLD of the call. String. (new in 4.4)
    • lrn_cld_in - incoming LRN CLD of the call. String. (new in 4.4)
    • p_asserted_id - p-asserted ID of the call. String. (new in 4.4)
    • remote_party_id - remote party id of the call, rpid. String. (new in 4.4)
    • release_source - release source of the call. String. (new in 4.4)
    • user_agent - user agent of the caller. String. (new in 4.4)
    • area_name - area name of the prefix. String. (new in 4.4)
  • XMLRPC fault in case of any error.