Endpoint
Request Parameters
The phone number to call. Must be in E.164 format (e.g., +1234567890).
Unique verification identifier for tracking this call session.
Request Body Example
Response
Success Response
Success message containing the Twilio call SID
Error Responses
400 Bad Request
Returned when request validation fails:500 Internal Server Error
Returned when the call fails to initiate:How It Works
- Validation: Request body is validated using Joi schema
- Database Record: Creates a new call record in Supabase with status “in_progress”
- Twilio Call: Initiates outbound call using Twilio API
- WebSocket Stream: Connects call to media stream endpoint for real-time processing
- Response: Returns Twilio call SID on success
The call automatically connects to a WebSocket stream at
/media-stream/{verification}/{callId} for real-time audio processing.Code Examples
Implementation Details
The endpoint performs the following operations from/home/daytona/workspace/source/highway-backend/routes.js:35:
- Validates request using Joi schema
- Inserts call record into Supabase
callstable - Creates Twilio call with TwiML instructions
- Connects call to WebSocket stream for media processing
- Enables call recording with transcription
- WebSocket stream connection
- Call recording with transcription
- Automatic hangup after stream completes