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.
  • ANSWERED: The callee answers the call.
  • NO ANSWERED: The callee does not answer the call.
  • BUSY: The callee is in busy state.
  • VOICEMAIL: The callee does not answer the call, and receives a new voicemail.
type String The call type.
  • Internal
  • Outbound
  • Inbound
recording String The name of the call recording file.
didnumber Integer The number that the caller dialed.
agentringtime String The ringing duration before the agent answers the incoming call.
sn String The PBX's serial number.

Report example

Extension 1023 calls extension 2023.

POST / HTTP/1.1
Host: 192.168.5.150: 8260
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"    
}