Skip to main content

Dial

POST 
/calls

Dial a number or SIP URI from a given connection. A successful response will include a call_leg_id which can be used to correlate the command with subsequent webhooks.

Expected Webhooks:

  • call.initiated
  • call.answered or call.hangup
  • call.machine.detection.ended if answering_machine_detection was requested
  • call.machine.greeting.ended if answering_machine_detection was requested to detect the end of machine greeting
  • call.machine.premium.detection.ended if answering_machine_detection=premium was requested
  • call.machine.premium.greeting.ended if answering_machine_detection=premium was requested and a beep was detected
  • streaming.started, streaming.stopped or streaming.failed if stream_url was set

When the record parameter is set to record-from-answer, the response will include a recording_id field.

Request

Responses

200:

Successful response with details about a call status that includes recording_id.

400:

Bad request. The request was invalid or cannot be served. Common causes include: audio file download failures, attempting to delete non-empty queues, invalid characters in the request, or character encoding errors.

422:

Unprocessable entity. The request was well-formed but could not be processed due to semantic errors. This includes validation errors, invalid parameter values, call state errors, conference errors, queue errors, recording/transcription errors, and business logic violations.

500:

Internal server error. An unexpected error occurred on the server. This is typically returned for unhandled exceptions or system failures.

503:

Service unavailable. The service is temporarily unavailable. This may occur during maintenance or when the service is overloaded.

default:

Unexpected error