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
895 B
JSON
29 lines
895 B
JSON
[
|
|
{
|
|
"Event": "Cdr",
|
|
"Privilege": "cdr,all",
|
|
"AccountCode": "",
|
|
"Source": "13125551234",
|
|
"Destination": "13125550000",
|
|
"DestinationContext": "sp-route-aaaaaaaa-0000-4000-8000-000000000001",
|
|
"CallerID": "\"Alice\" <13125551234>",
|
|
"Channel": "PJSIP/101-0000000b",
|
|
"DestinationChannel": "PJSIP/trunk-7d3e9a52-1c4b-4f6e-9a0d-2b8c5e1f4a37-0000000c",
|
|
"LastApplication": "Dial",
|
|
"LastData": "PJSIP/13125550000@trunk-7d3e9a52-1c4b-4f6e-9a0d-2b8c5e1f4a37,120",
|
|
"StartTime": "2026-10-18 19:34:01",
|
|
"AnswerTime": "2026-10-18 19:34:01",
|
|
"EndTime": "2026-10-18 19:34:06",
|
|
"Duration": "5",
|
|
"BillableSeconds": "5",
|
|
"Disposition": "ANSWERED",
|
|
"AMAFlags": "DOCUMENTATION",
|
|
"UniqueID": "1792352041.27",
|
|
"UserField": "",
|
|
"LinkedID": "1792352041.27",
|
|
"sp_did": "",
|
|
"sp_direction": "outbound",
|
|
"sp_recording": ""
|
|
}
|
|
]
|