feat: Ozonetel V3 dial endpoint, worklist query fixes

- Switch outbound dial to /CAServicesV3/mdlConnection.php (tbManualDial)
- Use both Apikey + Basic Auth headers matching Ozonetel toolbar pattern
- Auto-login agent before dial attempt
- Dial controller returns 502 (not 401) for Ozonetel errors to prevent session logout
- Fix worklist: remove non-existent callId from followUp query
- Fix worklist: use unquoted MISSED enum, remove callerNumber subfield issue
- Worklist controller resolves agent name from platform currentUser API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 18:34:32 +05:30
parent 9688d5144e
commit a0df752cfd
3 changed files with 85 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ export class WorklistService {
id name createdAt
typeCustom status scheduledAt completedAt
priority assignedAgent
patientId callId
patientId
} } } }`,
undefined,
authHeader,
@@ -77,9 +77,9 @@ export class WorklistService {
private async getMissedCalls(agentName: string, authHeader: string): Promise<any[]> {
try {
const data = await this.platform.queryWithAuth<any>(
`{ calls(first: 20, filter: { agentName: { eq: "${agentName}" }, callStatus: { eq: "MISSED" } }, orderBy: [{ startedAt: DescNullsLast }]) { edges { node {
`{ calls(first: 20, filter: { agentName: { eq: "${agentName}" }, callStatus: { eq: MISSED } }, orderBy: [{ startedAt: DescNullsLast }]) { edges { node {
id name createdAt
direction callStatus callerNumber agentName
direction callStatus agentName
startedAt endedAt durationSec
disposition leadId
} } } }`,