mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-05-18 20:08:19 +00:00
fix: remove hardcoded Inbound_918041763265 campaign fallback
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
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.
This commit is contained in:
@@ -29,7 +29,11 @@ export class AgentConfigService {
|
|||||||
return this.telephony.getConfig().sip.wsPort || '444';
|
return this.telephony.getConfig().sip.wsPort || '444';
|
||||||
}
|
}
|
||||||
private get defaultCampaignName(): string {
|
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<AgentConfig | null> {
|
async getByMemberId(memberId: string): Promise<AgentConfig | null> {
|
||||||
|
|||||||
Reference in New Issue
Block a user