GetCallHistory
The GetCallHistory command is used to search in the call history. The search details are given in parameters.
Example HTTP request:
http://192.168.115.72:7780/?Command=GetCallHistory&PageNumber=0&RowsPerPage=20&From=&General= &Direction=&Source=&Destination=&State=&Dialed=&CallerId=&CallId=
Example HTTP response:
<?xml version="1.0"?>
<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Code>200</Code>
  <Message>Command successfully executed</Message>
  <NumberOfCalls>4</NumberOfCalls>
  <Calls>
    <Call>
      <StartTime>2013-08-13 08:02:50</StartTime>
      <Direction>Internal</Direction>
      <Source>1003</Source>
      <Destination>50</Destination>
      <State>TransferCompleted</State>
      <Dialed>50</Dialed>
      <CallerId>1003</CallerId>
      <Type>Audio</Type>
      <CallId>20GPS3</CallId>
    </Call>
    <Call>
      <StartTime>2013-08-13 08:02:56</StartTime>
      <Direction>Internal</Direction>
      <Source>1003</Source>
      <Destination>1001</Destination>
      <State>CalleeHungUp</State>
      <Dialed>1001</Dialed>
      <CallerId>1003</CallerId>
      <Type>Audio</Type>
      <CallId>2Fqjg2</CallId>
    </Call>
    <Call>
      <StartTime>2013-08-13 08:04:37</StartTime>
      <Direction>Internal</Direction>
      <Source>1003</Source>
      <Destination>50</Destination>
      <State>TransferCompleted</State>
      <Dialed>50</Dialed>
      <CallerId>1003</CallerId>
      <Type>Audio</Type>
      <CallId>AOZXH</CallId>
    </Call>
    <Call>
      <StartTime>2013-08-13 08:04:47</StartTime>
      <Direction>Internal</Direction>
      <Source>1003</Source>
      <Destination>1001</Destination>
      <State>CalleeHungUp</State>
      <Dialed>1001</Dialed>
      <CallerId>1003</CallerId>
      <Type>Audio</Type>
      <CallId>PR14t</CallId>
    </Call>
  </Calls>
</Response>
	
Request parameters
| Parameter name | Value | Description | Mandatory | 
| command | string value, GetCallHistory | Specifies the type of the HTTP API command. | Yes | 
| PageNumber | int value e.g. 0 | Specifies the source pages which will be queried for call history entries. | No | 
| RowsPerPage | int value e.g. 20 | Specifies how many entries the response will contain at maximum. | No | 
| From | string value, e.g. 2013-08-13+07%3a53%3a04 | The date and time to get call history entries from. | No | 
| General | string value, e.g. 100 | General search query string. | No | 
| Direction | string value, (Internal, External, Inbound, Outbound) | Filters by the direction of the call. Internal: Between 2 installed extension. External: Between 2 outside lines. Inbound: From an outside line to an extension. Outbound: From an extension to an outside line. | No | 
| Source | int value, e.g. 1003 | Filters by the extension number which made the call. | No | 
| Destination | int value, e.g. 1001 | Filters by the extension number which was the target of the call. | No | 
| State | string value, e.g. CalleeHungUp | Filters by the result state of the call. | No | 
| Dialled | int value, e.g. 1001 | Filters by the dialled number of the call. | No | 
| CallerId | int value, e.g. 1003 | Filters by the ID of the caller party. | No | 
| CallId | int value, e.g. 2Fqjg2 | Filters by the ID of the call. | No | 
| These parameters are only required if office user authentication is set in the HTTP API: | |||
| Parameter name | Value | Description | |
| Username | string value, e.g. user1000 | This is the username of an Ozeki Phone System office user. | |
| Password | string value, e.g. mypassword12 | This is the password belonging to the username. | |
Response parameters
| Parameter name | Value | Description | 
| Code | int value (200, 300, 301, 302, 303) | Returns the status code of the response. For more infromation go to the status code reference page | 
| Message | string value, e.g. Command successfully executed | Returns the description of the response code. For more infromation go to the status code reference page | 
| NumberOfCalls | int value, e.g. 4 | Number of calls found in the history after filtering. | 
| Calls | string value | Between the <Call> nodes the details of a call is shown. There are as many pairs of <Call> nodes as many calls were filtered. The parameters shown between the <Call> nodes are: StartTime, Direction, Source, Destination, State, Dialed, CallerId, Type, CallId. | 
How to use it?
Fill out the GetCallHistory command parameters to get the most exact entries from the call history. All filter parameters are optional. If a parameter is not specified, a default value will be used.
Step 1: Issue the assembled HTTP Request.
