NewCdr
When a call is ended, the PBX will send a NewCdr report to the application server in real time.
Report parameters
| Parameter | Type | Description |
|---|---|---|
| event | String | Event type. |
| callid | String | The unique ID of each call. |
| timestart | String | The start time of the call. |
| callfrom | String | The caller number. |
| callto | Integer | The callee number. |
| callduraction | String | The call duration. |
| talkduraction | String | The talk duration. |
| srctrunkname | String | The name of the source trunk. |
| dsttrcunkname | String | The name of the destination trunk. |
| pincode | Integer | The password. |
| status | String | The call status.
|
| type | String | The call type.
|
| recording | String | The name of the call recording file. |
| didnumber | Integer | The number that the caller dialed. |
| agentringtime | String | The ringing duration between the time when the call enters the queue and an agent answers the incoming call. |
| sn | String | The PBX's serial number. |
Report example
Extension 1023 calls extension 2023.
POST / HTTP/1.1 Host: api.yeastarcloud.com Accept: application/json User-Agent: WebAPI Content-Type: application/json Accept: application/json { "event": "NewCdr", "callid": "1571897930.5", "timestart": "2019-10-23 22:18:50", "callfrom": "1023", "callto": "2023", "callduraction": "19", "talkduraction": "14", "srctrunkname": "", "dsttrcunkname": "", "pincode": "", "status": "ANSWERED", "type": "Internal", "recording": "20191024201242-1571897930.5-203-201-Internal.wav", "didnumber": "", "agentringtime": "0", "sn": "369451090405" }