transports(daily): fix dialin-ready event handling
This commit is contained in:
@@ -49,8 +49,8 @@ class ElevenLabsTTSService(TTSService):
|
||||
|
||||
async with self._aiohttp_session.post(url, json=payload, headers=headers, params=querystring) as r:
|
||||
if r.status != 200:
|
||||
logger.error(f"Audio fetch status code: {r.status}, error: {r.text}")
|
||||
yield ErrorFrame(f"Audio fetch status code: {r.status}, error: {r.text}")
|
||||
logger.error(f"Error getting audio (status: {r.status}, error: {r.text()})")
|
||||
yield ErrorFrame(f"Error getting audio (status: {r.status}, error: {r.text()})")
|
||||
return
|
||||
|
||||
async for chunk in r.content:
|
||||
|
||||
@@ -735,17 +735,18 @@ class DailyTransport(BaseTransport):
|
||||
"Authorization": f"Bearer {self._params.api_key}",
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
}
|
||||
querystring = {
|
||||
data = {
|
||||
"callId": self._params.dialin_settings.call_id,
|
||||
"callDomain": self._params.dialin_settings.call_domain,
|
||||
"sipUri": sip_endpoint
|
||||
}
|
||||
|
||||
url = f"{self._params.api_url}/dialin/pinlessCallUpdate"
|
||||
|
||||
async with session.post(url, headers=headers, params=querystring) as r:
|
||||
async with session.post(url, headers=headers, data=data) as r:
|
||||
if r.status != 200:
|
||||
logger.error(
|
||||
f"Unable to handle dialin-ready event (status: {r.status}, error: {r.text})")
|
||||
f"Unable to handle dialin-ready event (status: {r.status}, error: {r.text()})")
|
||||
return
|
||||
|
||||
logger.debug("dialin-ready event handled successfully")
|
||||
|
||||
Reference in New Issue
Block a user