Receive the phone's WebRTC signaling (Server-Sent Events)
A Server-Sent Events stream. Each event is named signal and its
data is one JSON signaling message from the phone, identified by
its action (for example webrtc_offer, webrtc_ice,
stream_ready). A keep-alive comment arrives every 15 seconds.
The stream stays open until the client disconnects.
curl --request GET \
--url https://api.lusor.ai/v1/sessions/{id}/stream/events \
--header 'X-Api-Key: <api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.lusor.ai/v1/sessions/{id}/stream/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/sessions/{id}/stream/events"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"action": "stream_ready",
"session_id": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Workspace API key, created in the dashboard under Settings → API Keys.
Path Parameters
Session ID.
Query Parameters
Workspace the request is scoped to. Optional for API keys: a key is bound to one workspace when it is created, and naming any other workspace returns an opaque 404.
Response
Event stream
One signaling message from the phone, relayed as the phone sent it.
action says what it is; the other fields depend on it (for
example the SDP of a webrtc_offer, or the candidate of a
webrtc_ice).
Was this page helpful?
curl --request GET \
--url https://api.lusor.ai/v1/sessions/{id}/stream/events \
--header 'X-Api-Key: <api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.lusor.ai/v1/sessions/{id}/stream/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/sessions/{id}/stream/events"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"action": "stream_ready",
"session_id": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
