Fixed path for telephone/handler in handle_incoming_call (#280)

Co-authored-by: Freddy Boulton <41651716+freddyaboulton@users.noreply.github.com>
This commit is contained in:
Aman Chauhan
2025-04-23 12:39:45 -04:00
committed by GitHub
co-authored by Freddy Boulton
parent 16bfb5be13
commit f3308b6e81
+2 -1
View File
@@ -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")