switchvox.users.callLogs.search

Description

Searches the call logs on the PBX system for a single account.

 

Arguments

Name

Required

Type

Default

Description

start_date

required

 

 

Minimum start time of the call. Calls with a start time greater than or equal to this value will be returned. The date should be in the format YYYY-MM-DD HH:MM:SS.

end_date

required

 

 

Maximum start time of the call. Calls with a start time less than or equal to this value will be returned. The date should be in the format YYYY-MM-DD HH:MM:SS. This value should be greater than the start_date.

account_id

required

 

 

The account ID. Must be numeric.

sort_field

optional

 

start_time

The field on which to sort the returned call log entries. Possible values are: start_time, owner_id, event_type, call_duration and talking_duration.

sort_order

optional

 

DESC

The order in which to sort returned call log entries. Possible values: ASC and DESC.

items_per_page

optional

 

50

Number of call log entries to return per page.

page_number

optional

 

1

The page number of call log record results to return.

 

Example Requests & Responses

Request

<?xml version="1.0"?> <request method="switchvox.users.callLogs.search"> <parameters> <start_date>2009-01-01 00:00:00</start_date> <end_date>2009-01-31 23:59:59</end_date> <account_id>1645</account_id> <sort_field>start_time</sort_field> <sort_order>ASC</sort_order> <items_per_page>50</items_per_page> <page_number>1</page_number> </parameters> </request>

Response

<calls page_number="1" total_pages="1" items_per_page="20" total_items="1"> <call id="8467" origination="outgoing" start_time="2008-04-26 09:35:57" from="Account 1 &lt;101&gt;" from_account_id="1101" from_name="Account 1" from_number="101" to="Account 2 &lt;123&gt;" to_account_id="1102" to_name="Account 2" to_number="123" total_duration="70" talk_duration="60"> <events> <event start_time="9:35:59 AM" type="OUTGOING" display="Dialed number (123)" /> <event start_time="9:36:05 AM" type="HANGUP" display="Call was hung up by Account 1" /> </events> </call> </calls>

 

Error Codes

See the Error Code Formatting section to see the xml structure when an error is returned. See the Generic Error Codes section to see a list of general fault codes that may be returned.

 

Code

Description

77534

Invalid date (%1). Date and time format is (YYYY-MM-DD HH:MM:SS)

25673

Invalid date (%1). You selected the 31st of a month with only 30 days.

75429

Invalid date (%1). February 29th is outside a leap year.

63014

Invalid date (%1). February 30th and 31st do not exist.

12010

The 'To Date' is before your 'From Date'

12016

Invalid sort field

12017

Invalid sort order

12018

items_per_page may only contain digits

12019

page_number may only contain digits

10014

Invalid account_id (%1). Account_ids may only contain digits.

27168

Your account is not permitted to run this action.

Unable to render {include} The included page could not be found.