api:pbx:cdrhistory
Table of Contents
API : PBX : CDR History
Request
This request returns details about the path a call took through the PBX.
| URL | https://api.telecomx.dk/pbx/cdrhistory/CALL-ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGE, OWNER if calls belongs to the customer RESELLER if customer belongs to the reseller or ADMIN. |
|
| Params | CALL-ID | Id of the call. |
Query examples
https://api.telecomx.dk/pbx/cdrhistory/f378478ghuidhu3y8fghiufdgiueyufhguerguio
Response
| JSON object | ||
|---|---|---|
| _id | Id | Unique Id of the CDR History item. |
| callId | String | Call-ID from SIP. |
| logged | Date | Date and time when this record was logged. Also used for auto-expire. |
| pbx | String | Hostname of the PBX server that handled the call. |
| customer | Id | Id of customer the caller belongs to or callee called into. |
| history | Array | List of events during the call. |
| history.date | Date | When the event occurred. |
| history.action | String | Human readable description of what happened. |
| history.callerNumber | String | Callers number. |
| history.callerName | String | Callers name, if available. |
| history.callerExtension | Id | Id of callers extension, if call originated from a SIP or mobile phone. |
| history.calleeNumber | String | Callee's number. |
| history.calleeName | String | Callee's name, if available. |
| history.calleeExtension | Id | Id of callee's extension, if call terminated on a SIP or mobile phone. |
Example
{ _id: ObjectId('12345789012457890ABCD'), callId: 'f737tye73yt8hefv7ebvg@192.168.0.2', logged: ISODate('2018-01-01T00:00:00.000Z'), pbx: 'pbx1.telecomx.dk', customer: ObjectId('12345678901234567890AAAA'), history: [ { date: ISODate('2018-01-01T00:00:00.000Z'), action: 'Call answered', callerNumber: '+4570305050', callerName: 'Telecom X', callerExtension: null, calleeNumber: '+4570305060', calleeName: 'Acme Soap and Shampoo', calleeExtension: ObjectId('1234567890123457890FEDE') }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | callId | Call ID not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/cdrhistory.txt · Last modified: 2020/11/25 13:36 by Per Møller