Dial Phone Webrtc
POST/api/webphone/dial
Initiate an outbound phone call using WebRTC.
Flow:
- Create unique call ID and room
- Generate token for frontend to join room
- Return connection details to frontend
- Frontend joins room with WebRTC
- 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
- 200
- 404
- 422
Successful Response
Not found
Validation Error