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>
15 lines
575 B
JavaScript
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';
|
|
}
|