diff --git a/backend/fastrtc/stream.py b/backend/fastrtc/stream.py index fc320ca..d1b53ac 100644 --- a/backend/fastrtc/stream.py +++ b/backend/fastrtc/stream.py @@ -785,7 +785,8 @@ class Stream(WebRTCConnectionMixin): response = VoiceResponse() response.say("Connecting to the AI assistant.") connect = Connect() - connect.stream(url=f"wss://{request.url.hostname}/telephone/handler") + path = request.url.path.removesuffix("/telephone/incoming") + connect.stream(url=f"wss://{request.url.hostname}{path}/telephone/handler") response.append(connect) response.say("The call has been disconnected.") return HTMLResponse(content=str(response), media_type="application/xml")