Connect to RustPBX
Clients establish a connection with RustPBX via WebSocket, and different call types are distinguished by path.
Path
Select different WebSocket paths based on audio transmission method:
/call: Audio stream transmitted via WebSocket/call/sip: Establish calls using SIP protocol, RTP transmits audio./call/webrtc: Establish calls directly using SDP Offer.
Parameters
Parameter description:
id: Used to set the Session ID for the call, defaults to server-generated UUID.- In answering scenarios, it needs to be set to the
dialogIdin the webhook request (see Answer/Reject).
- In answering scenarios, it needs to be set to the
dump: Whether to print commands and events, defaults to printing. Directory and file are the same as recording files, file ends withevents.jsonl.pingInterval: WebSocket Ping interval, in seconds.serverSideTrack: Set the server-side Track ID, defaults toserverSideTrack(mainly includes TTS and Play Track IDs).
Example
'ws://localhost:8080/call/sip?id=session123&dump=true'
- SIP call
- Set sessionId to
session123 - Dump commands and events