Merge pull request #177 from pipecat-ai/aleix/dialin-ready-missing-sipuri

transports(daily): fix dialin-ready event handling
This commit is contained in:
Aleix Conchillo Flaqué
2024-05-24 05:39:31 +08:00
committed by GitHub
3 changed files with 12 additions and 5 deletions

View File

@@ -5,6 +5,12 @@ All notable changes to **pipecat** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.0.23] - 2024-05-23
### Fixed
- Fixed an issue handling Daily transport `dialin-ready` event.
## [0.0.22] - 2024-05-23
### Added

View File

@@ -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:

View File

@@ -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")