mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 01:49:23 +08:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user