JSON API » cdrs » cdrs/events/list
Gets the fields of call related events. Events presently supported are DTMF digits entered in IVRs and pattern menus.
Input parameters
Requires authentication and the callshop or cdrs role privileges.
If the uniqueid is specified then only events for that call will be returned. If the uniqueid is not specified then the customer, start, and end times should be specified, and all events for calls during that period will be returned.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
uniqueid | String | Uniqueid of call to get events for. | No | Empty string. |
customer | Integer | Customer to get costs for. | No | Customer of authentication user. |
start | Integer | Start Unix timestamp. | Recommended | 0 |
end | Integer | End Unix timestamp. | Recommended | Now. |
Responses
Code | Description |
---|---|
200 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
500 | An internal error occurred. Check the key and message fields for more details. |
Data returned
An array of fields, one row for each call event.
Example: With required and recommended parameters
http://enswitch.example.com/api/json/cdrs/events/list/?auth_username=user;auth_password=password;uniqueid=1234567890.123456{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "uniqueid":"1234567890.123456", "time":1234567890, "customer":3, "stype":"ivr", "snumber":"2", "data":6" }, { "uniqueid":"1234567899.123457", "time":1234567899, "customer":3, "stype":"patternmenu", "snumber":"1", "data":3" }, ] }
Change history
Version | Changes |
---|---|
4.3 | Function added. |