Skip to main content

Dial Phone Webrtc

POST 

/api/webphone/dial

Initiate an outbound phone call using WebRTC.

Flow:

  1. Create unique call ID and room
  2. Generate token for frontend to join room
  3. Return connection details to frontend
  4. Frontend joins room with WebRTC
  5. Backend creates SIP participant (background) to bridge to PSTN

Args: request: Dial request with number/agent ID and caller ID background_tasks: FastAPI background tasks for async processing web_context: Authenticated user context phone_call_service: Phone call service for managing calls

Returns: PhoneCallResponse with connection details

Request

Responses

Successful Response