The details on the WebSocket format are as below:
Event on starting the audio stream
{
"sequenceNumber": 0,
"event": "start",
"start": {
"callId": "8c43a765-94fa-4ee9-b9a3-242703e41f63",
"streamId": "b77e037d-4119-44b5-902d-25826b654539",
"accountId": "155747",
"tracks": [
"inbound",
"outbound"
],
"mediaFormat": {
"encoding": "audio/x-l16",
"sampleRate": 8000
}
},
"extra_headers": "{}"
}
Event on receiving an inbound media event
{
"sequenceNumber": 887,
"streamId": "20170ada-f610-433b-8758-c02a2aab3662",
"event": "media",
"media": {
"track": "inbound",
"timestamp": "1687353805345",
"chunk": 469,
"payload": "CAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAA="
},
"extra_headers": "{}"
}
A similar event is sent for outbound audio streams; for them, the track value is “outbound.”