iamdoubz 71440ac85d cdr: store Cdr events, aggregate calls, fixtures from real calls
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
2026-10-18 14:37:14 -05:00
2026-10-17 22:34:01 -05:00
2026-10-17 14:11:09 -05:00
2026-10-17 14:11:09 -05:00
2026-10-17 14:11:09 -05:00

SelfPhoneNG

A fully open source, self-hosted business phone system: extensions, desk phones and a browser softphone, voicemail to email, IVRs, ring groups, queues, office hours, call recording, live dashboard, SMS and phone provisioning. Bring your own SIP trunk and numbers (reference provider: voip.ms). Built on Asterisk 24 LTS + TypeScript + PostgreSQL 18.

Status: specification stage. Nothing is built yet.

License: AGPL-3.0-or-later.

S
Description
Open source, self hosted alternative for 3cx
https://github.com/iamdoubz/selfphoneng
Readme AGPL-3.0
9.2 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 83.9%
JavaScript 15%
Shell 0.7%
Dockerfile 0.3%