services/cdr.ts stores every AMI Cdr event in cdr and, 5 s after a call's last event, builds its calls row (direction, status, from, to, DID, answered by, talk time) and call_extensions (caller, rang, answered) per 04 §5.4; linkedids without a calls row are caught up on AMI connect. Aggregation is idempotent. test/asterisk/cdr-record.ts records 8 scenarios with our config, the fake voip.ms (now shared in provider.ts) and baresip phones; each has a fixture and a test with the expected calls row. Queue abandon and park come with M8. Found while recording: Asterisk 24's Cdr event has no LinkedID unless cdr_manager maps it, its times carry no zone (now usegmtime), and the mappings read CDR variables, so the dialplan sets CDR(SP_DID) and CDR(SP_DIRECTION) next to the channel variables. The Asterisk image needs a rebuild for the cdr_manager.conf change. Task: M7-T1
29 lines
708 B
JSON
29 lines
708 B
JSON
[
|
|
{
|
|
"Event": "Cdr",
|
|
"Privilege": "cdr,all",
|
|
"AccountCode": "",
|
|
"Source": "103",
|
|
"Destination": "104",
|
|
"DestinationContext": "sp-from-ext",
|
|
"CallerID": "\"Carol\" <103>",
|
|
"Channel": "PJSIP/103-00000004",
|
|
"DestinationChannel": "",
|
|
"LastApplication": "Hangup",
|
|
"LastData": "",
|
|
"StartTime": "2026-10-18 19:33:19",
|
|
"AnswerTime": "2026-10-18 19:33:19",
|
|
"EndTime": "2026-10-18 19:33:19",
|
|
"Duration": "0",
|
|
"BillableSeconds": "0",
|
|
"Disposition": "ANSWERED",
|
|
"AMAFlags": "DOCUMENTATION",
|
|
"UniqueID": "1792351999.7",
|
|
"UserField": "",
|
|
"LinkedID": "1792351999.7",
|
|
"sp_did": "",
|
|
"sp_direction": "",
|
|
"sp_recording": ""
|
|
}
|
|
]
|