collabSupport/services/callReport/env.js
jmcqueen a25fc08fe2 Rename /voicereport to /callreport with scoped user and phone targets.
Add store/email/phone filtering, richer call-line formatting, CDR feed pagination and queueing, and split Jira poller enrichment into testable modules.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 10:10:03 -04:00

15 lines
575 B
JavaScript

// services/callReport/env.js
// CALLREPORT_* env vars (VOICEREPORT_* accepted for backward compatibility).
export function callReportEnvInt(suffix, fallback) {
const v = Number(process.env[`CALLREPORT_${suffix}`] ?? process.env[`VOICEREPORT_${suffix}`]);
return Number.isFinite(v) ? v : fallback;
}
export function callReportEnvFlag(suffix, defaultValue = false) {
const raw = String(
process.env[`CALLREPORT_${suffix}`] ?? process.env[`VOICEREPORT_${suffix}`] ?? '',
).toLowerCase();
if (!raw) return defaultValue;
return raw === 'true' || raw === '1';
}