From 2d8308bed8e530ce0171aeb1e76b2feed053b1e9 Mon Sep 17 00:00:00 2001 From: saridsa2 Date: Thu, 16 Apr 2026 17:33:35 +0530 Subject: [PATCH] fix: remove hardcoded Inbound_918041763265 campaign fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default campaign name was hardcoded to 'Inbound_918041763265'. After the Ozonetel campaigns were renamed (Inbound_918041763265 → Global, Inbound_918041763400 → Ramaiah), agent login/dial would break because the old name doesn't exist on Ozonetel anymore. Campaign name now comes exclusively from the Agent entity's campaignName field (per-agent) or the OZONETEL_CAMPAIGN_NAME env var (per-workspace). No hardcoded fallback. --- src/auth/agent-config.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/auth/agent-config.service.ts b/src/auth/agent-config.service.ts index 965d84a..4a22f88 100644 --- a/src/auth/agent-config.service.ts +++ b/src/auth/agent-config.service.ts @@ -29,7 +29,11 @@ export class AgentConfigService { return this.telephony.getConfig().sip.wsPort || '444'; } private get defaultCampaignName(): string { - return this.telephony.getConfig().ozonetel.campaignName || 'Inbound_918041763265'; + // No hardcoded fallback — each Agent entity's own campaignName + // field is the source of truth. Env var is the per-workspace + // default; if neither is set, the Ozonetel login will use + // whatever the agent's entity specifies. + return this.telephony.getConfig().ozonetel.campaignName || ''; } async getByMemberId(memberId: string): Promise {