Skip to main content

Call Status Types

Calls progress through these statuses:
StatusDescription
SCHEDULEDCall is queued and waiting to be initiated
ONGOINGCall is currently in progress
COMPLETEDCall finished successfully
MISSEDCall was not answered
FAILEDCall failed due to technical error

Checking Call Status

Live Status (30 Days)

For recent calls, use the live status endpoint:
curl --location 'https://sa.dialgen.ai/api/v1/status/call?callId=call_123' \
--header 'Authorization: Bearer YOUR_API_KEY'
Response:
{
  "callId": "call_123",
  "status": "ONGOING",
  "startTime": "2025-11-15T14:30:01.123Z",
  "phoneNumber": "+15551234567",
  "contactId": "contact_456",
  "batchId": null,
  "error": null,
  "duration": null,
  "recordingUrl": null
}

Persistent Status (After 30 Days)

For older calls, use the persistent status endpoint:
curl --location 'https://sa.dialgen.ai/api/v1/call/check-status?callId=call_123' \
--header 'Authorization: Bearer YOUR_API_KEY'
Live status is cached for 30 days. After that, use the persistent status endpoint for historical data.

Call Lifecycle

1

SCHEDULED

Call is queued in the system
2

ONGOING

Call is connected and conversation is active
3

COMPLETED / MISSED / FAILED

Call has ended with a final status

Status Details

SCHEDULED

  • Call is in queue
  • Waiting to be initiated
  • Can be cancelled

ONGOING

  • Call is connected
  • Conversation in progress
  • Real-time transcription active
  • Duration counter running

COMPLETED

  • Call ended successfully
  • Recording available
  • Transcript available
  • Metrics generated
  • Summary created

MISSED

  • Call was not answered
  • Will retry based on retry strategy
  • No recording or transcript

FAILED

  • Technical error occurred
  • Error message available
  • May retry based on error type

Monitoring Active Calls

Track ongoing calls in real-time:
async function monitorCall(callId) {
  let status = 'ONGOING';
  
  while (status === 'ONGOING' || status === 'SCHEDULED') {
    const response = await fetch(
      `https://sa.dialgen.ai/api/v1/status/call?callId=${callId}`,
      {
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY'
        }
      }
    );
    
    const data = await response.json();
    status = data.status;
    
    if (data.duration) {
      console.log(`Call duration: ${data.duration}s`);
    }
    
    if (status === 'ONGOING') {
      await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5s
    }
  }
  
  console.log(`Call ended with status: ${status}`);
}

Error Handling

Common Error Codes

Error CodeDescription
INVALID_NUMBERPhone number is invalid
BUSYLine is busy
NO_ANSWERCall was not answered
NETWORK_ERRORNetwork connectivity issue
INSUFFICIENT_CREDITSNot enough credits to place call

Retry Behavior

  • BUSY: Retries after busyDelay
  • NO_ANSWER: Retries after noAnswerDelay
  • Other errors: May not retry depending on error type

Webhooks for Status Updates

Receive real-time status updates via webhooks:
{
  "webhooks": {
    "onCallComplete": "https://api.yourcompany.com/webhooks/call-complete"
  }
}

Webhook Payload

{
  "event": "call.completed",
  "callId": "call_123",
  "status": "COMPLETED",
  "duration": 180,
  "contactId": "contact_456",
  "summary": "Call summary...",
  "recordingUrl": "https://..."
}

Next Steps