ListCallHistory command
The ListCallHistory command provides you the list of the previous calls with all the details of them. Many parameters can be assigned to this command, which means you can easily filter the history to get the calls that you wanted to see.
Request parameters
Parameter name | Example value | Description | Mandatory |
CallerId | 400 | Filter by ID of the caller party in the call. | no |
CallId | fba20 | Filter by ID of the call. | no |
Destination | 200 | Filter by the destination extension of the call. | no |
Dialed | 300 | Filter by dialed number in the call. | no |
Direction | Internal | Filter by the direction of the calls, can be Internal, External, Inbound, Outbound. | no |
From | 2013-01-17 13:32:12 | The date to get call history entries from. | no |
PageNumber | 0 | The page number which specifies the source page which will be queried for call history entries. | no |
RowsPerPage | 20 | Specifies how many entries the response will contain at maximum. | no |
Source | 102 | Filter by the source extension of the call. | no |
State | CallerHangUp | Filter by the result state of the call. | no |
Type | Audio | Filter by type of the call. | no |
Username | admin | The username of the account. The username and password parameters are used to authenticate the user. | yes |
Password | abc123 | Specifies the password. The username and password parameters are used to authenticate the user. | yes |
Response parameters
Parameter name | Example value | Description | Mandatory |
Code | 200 | Returns the status code of the response. | yes |
Message | Command successfully executed | Returns the description of the response code. | yes |
TotalRecords | 50 | Number of calls found in the history after filtering. | yes |
CallHistory | Between the nodes the details of a call is shown. There are as many pairs of nodes as many calls were filtered. The parameters shown between the nodes are: StartTime, Direction, Source, Destination, State, Dialed, CallerId, Type, CallId. | yes | |
NotificationName | CallConnected | Name of the notification request type. | no |
Example request and response
URL request
http://127.0.0.1:9509/api?command=ListCallHistory&RowsPerPage=20&PageNumber=0&From=&Direction=&Source=&Destination=&CallerId=&Dialed=
&State=&Type=&CallId=&Username=HTTP_User_1&Password=qwe123
Response
<?xml version="1.0"?> <Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Code>200</Code> <Message>Command successfully executed</Message> <TotalRecords>18</TotalRecords> <CallHistory> <Call> <StartTime>2019-04-02 13:03:06</StartTime> <Direction>Internal</Direction> <Source>102</Source> <Destination>106</Destination> <CallerId>102</CallerId> <Dialed>106</Dialed> <State>CalleeHungUp</State> <Type>Audio</Type> <CallId>1vyT3U</CallId> </Call> <Call> <StartTime>2019-04-02 14:13:26</StartTime> <Direction>Internal</Direction> <Source>102</Source> <Destination>106</Destination> <CallerId>102</CallerId> <Dialed>106</Dialed> <State>CallerHungUp</State> <Type>Audio</Type> <CallId>R1v3O</CallId> </Call> <Call> <StartTime>2019-04-02 14:44:42</StartTime> <Direction>Internal</Direction> <Source>102</Source> <Destination>106</Destination> <CallerId>102</CallerId> <Dialed>106</Dialed> <State>InCall</State> <Type>Audio</Type> <CallId>1hfNH</CallId> </Call> </CallHistory> </Response>
More information
- AttendedTransfer command
- BlindTransfer command
- Call command
- ForwardCall command
- ListCallHistory command
- Hangup command
- Hold command
- ListActiveCalls command
- ListExtensions command
- ListExtensionTypes command
- Play command
- Record command
- Request command
- SendDTMF command
- Speak
- Unhold command
- ReceiveMessage command
- SendEmail command
- SendMessage command
- SendSMS command
- Array command
- Beep command
- Delay command
- DeleteFile command
- ForEach command
- GoTo command
- MoveFile command
- Reject command
- Route command
- SendAlarmNotification command
- SendMsg command
- UserInput command
- Var command
- WaitForMsg command
- CallSetup command
- Exit command
- ListAddressbokkContacts
- ListAddressbookNames command
- ReceiveAlarmNotification