fix: E.164 phone format for outbound call records (+91 prefix)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 16:27:50 +05:30
parent c807cf737f
commit 9dc02e107a

View File

@@ -156,7 +156,7 @@ export class OzonetelAgentController {
name: `Outbound — ${body.callerPhone}`, name: `Outbound — ${body.callerPhone}`,
direction: 'OUTBOUND', direction: 'OUTBOUND',
callStatus: 'COMPLETED', callStatus: 'COMPLETED',
callerNumber: { primaryPhoneNumber: body.callerPhone }, callerNumber: { primaryPhoneNumber: `+91${body.callerPhone.replace(/^\+?91/, '')}` },
agentName: agentId, agentName: agentId,
durationSec: body.durationSec ?? 0, durationSec: body.durationSec ?? 0,
disposition: body.disposition, disposition: body.disposition,