Open a WebRTC session
Exchanges an SDP offer for an answer, the way WHIP does. The offer holds one audio transceiver (`sendrecv`) and one data channel labelled `06line`, with every ICE candidate already gathered (no trickle ICE). Use the `ice_servers` returned with the ephemeral key. The session lives as long as the peer connection: it carries the audio of the calls placed or answered with its `id`, one at a time, and pushes `call.incoming`, `call.state` and `line.state` on the data channel. Audio is G.711 µ-law (PCMU), 8 kHz, which every WebRTC stack supports; an offer without PCMU gets no audio. Every session of the company hears `call.incoming` (a session of a key restricted to a line, only for its line), right after `session.ready` for a call already ringing, then `call.state` when the call stops ringing. A session closed with `DELETE` ends its call `hangup`; a session lost on the way (ICE failed) ends it `failed`.
Exchanges an SDP offer for an answer, the way WHIP does. The offer holds one audio transceiver (sendrecv) and
one data channel labelled 06line, with every ICE candidate already gathered (no trickle ICE). Use the
ice_servers returned with the ephemeral key.
The session lives as long as the peer connection: it carries the audio of the calls placed or answered with
its id, one at a time, and pushes call.incoming, call.state and line.state on the data channel.
Audio is G.711 µ-law (PCMU), 8 kHz, which every WebRTC stack supports; an offer without PCMU gets no audio.
Every session of the company hears call.incoming (a session of a key restricted to a line, only for its
line), right after session.ready for a call already ringing, then call.state when the call stops ringing.
A session closed with DELETE ends its call hangup; a session lost on the way (ICE failed) ends it failed.
AuthorizationBearer <token>Your API key, 06l_…. For servers only.
application/json- body
sdp*stringSDP offer.
Session open.
application/json- response
id*SessionIdA WebRTC session, from POST /v1/webrtc/sessions.
^rtc_[0-9a-z]{26}$sdp*stringSDP answer, audio PCMU.
curl -X POST 'https://api.06line.com/v1/webrtc/sessions' \ -H 'Content-Type: application/json' \ -d '{ "sdp": "v=0\r\no=- 4611731400430051336 2 IN IP4 127.0.0.1\r\n..."}'{ "id": "rtc_01jbq9h7r3m5x1k8t2v6c4d0ya", "sdp": "v=0\r\no=- 1902398745 2 IN IP4 0.0.0.0\r\n..."}List deliveries GET
The deliveries of the endpoint, newest first, each with the body sent and every try: HTTP status, error, the start of the response body, duration. Filter by `status` or `event_type`; pass `next_cursor` as `before` to get the next page. Deleted endpoints keep their log.
Close a WebRTC session DELETE
Closes the peer connection and hangs up its call, if any (`end_reason: hangup`). Closing the peer connection from the browser has the same effect. An ephemeral key restricted to a line closes only the sessions opened with that restriction.