Adding telnyx serializer

This commit is contained in:
Rafal Skorski
2025-01-23 15:39:46 +01:00
parent 89b87289e2
commit 8eef21db6e
4 changed files with 125 additions and 7 deletions

View File

@@ -30,9 +30,10 @@ async def websocket_endpoint(websocket: WebSocket):
await start_data.__anext__()
call_data = json.loads(await start_data.__anext__())
print(call_data, flush=True)
stream_sid = call_data["stream_id"]
stream_id = call_data["stream_id"]
encoding = call_data["start"]["media_format"]["encoding"]
print("WebSocket connection accepted")
await run_bot(websocket, stream_sid)
await run_bot(websocket, stream_id, encoding)
if __name__ == "__main__":