From 89cb0f089e128a6192d0de90b751e3537da0b1c4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 04:01:00 +0000 Subject: [PATCH 1/4] Initial plan From 7e60320a746184391233630489c53ffa69ce0637 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 04:04:11 +0000 Subject: [PATCH 2/4] fix: set enable_dialout to False in PSTN runner to prevent room creation failures Co-authored-by: jamsea <614910+jamsea@users.noreply.github.com> --- src/pipecat/runner/daily.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/runner/daily.py b/src/pipecat/runner/daily.py index cfb754dfd..d61f14381 100644 --- a/src/pipecat/runner/daily.py +++ b/src/pipecat/runner/daily.py @@ -229,7 +229,7 @@ async def configure( provider=sip_provider, ) room_properties.sip = sip_params - room_properties.enable_dialout = True # Enable outbound calls if needed + room_properties.enable_dialout = False # Requires dialout entitlement on Daily plan room_properties.start_video_off = not sip_enable_video # Voice-only by default # Create room parameters From e11b48631230fe5affd0dbaf9aaf6598f3c6e4aa Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Tue, 17 Mar 2026 08:54:07 -0400 Subject: [PATCH 3/4] fix: clean up configure() type hints, deduplicate token expiry, and improve comment Narrow misleading Optional type hints on parameters that never accept None, extract the duplicated token_exp_duration * 60 * 60 calculation, remove unnecessary forward-reference quotes on DailyMeetingTokenProperties, and clarify why enable_dialout is explicitly set to False. --- changelog/4048.changed.md | 1 + src/pipecat/runner/daily.py | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 changelog/4048.changed.md diff --git a/changelog/4048.changed.md b/changelog/4048.changed.md new file mode 100644 index 000000000..e5b9aab06 --- /dev/null +++ b/changelog/4048.changed.md @@ -0,0 +1 @@ +- Narrowed misleading `Optional` type hints and deduplicated token expiry calculation in `configure()` (`pipecat.runner.daily`). diff --git a/src/pipecat/runner/daily.py b/src/pipecat/runner/daily.py index d61f14381..099d931a4 100644 --- a/src/pipecat/runner/daily.py +++ b/src/pipecat/runner/daily.py @@ -79,16 +79,16 @@ async def configure( aiohttp_session: aiohttp.ClientSession, *, api_key: Optional[str] = None, - room_exp_duration: Optional[float] = 2.0, - token_exp_duration: Optional[float] = 2.0, + room_exp_duration: float = 2.0, + token_exp_duration: float = 2.0, sip_caller_phone: Optional[str] = None, - sip_enable_video: Optional[bool] = False, - sip_num_endpoints: Optional[int] = 1, + sip_enable_video: bool = False, + sip_num_endpoints: int = 1, sip_codecs: Optional[Dict[str, List[str]]] = None, sip_provider: Optional[str] = None, room_geo: Optional[str] = None, room_properties: Optional[DailyRoomProperties] = None, - token_properties: Optional["DailyMeetingTokenProperties"] = None, + token_properties: Optional[DailyMeetingTokenProperties] = None, ) -> DailyRoomConfig: """Configure Daily room URL and token with optional SIP capabilities. @@ -184,6 +184,8 @@ async def configure( aiohttp_session=aiohttp_session, ) + token_expiry_seconds: float = token_exp_duration * 60 * 60 + # Check for existing room URL (only in standard mode) existing_room_url = os.getenv("DAILY_ROOM_URL") if existing_room_url and not sip_enabled: @@ -192,11 +194,12 @@ async def configure( room_url = existing_room_url # Create token and return standard format - expiry_time: float = token_exp_duration * 60 * 60 token_params = None if token_properties: token_params = DailyMeetingTokenParams(properties=token_properties) - token = await daily_rest_helper.get_token(room_url, expiry_time, params=token_params) + token = await daily_rest_helper.get_token( + room_url, token_expiry_seconds, params=token_params + ) return DailyRoomConfig(room_url=room_url, token=token) # Create a new room @@ -229,7 +232,10 @@ async def configure( provider=sip_provider, ) room_properties.sip = sip_params - room_properties.enable_dialout = False # Requires dialout entitlement on Daily plan + # Explicitly disable dialout to prevent room creation failures on + # accounts where dialout defaults to enabled but the plan lacks the + # required dialout entitlement. + room_properties.enable_dialout = False room_properties.start_video_off = not sip_enable_video # Voice-only by default # Create room parameters @@ -241,7 +247,6 @@ async def configure( logger.info(f"Created Daily room: {room_url}") # Create meeting token - token_expiry_seconds = token_exp_duration * 60 * 60 token_params = None if token_properties: token_params = DailyMeetingTokenParams(properties=token_properties) From 091f88e42e4b8456dde672acfbcc4a3677fb4ef5 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Tue, 17 Mar 2026 09:03:50 -0400 Subject: [PATCH 4/4] feat: add enable_dialout parameter to configure() for dial-out rooms Expose enable_dialout as a configure() parameter (default False) so dial-out examples can opt in without needing to build DailyRoomProperties manually. --- changelog/4048.changed.md | 2 +- src/pipecat/runner/daily.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/changelog/4048.changed.md b/changelog/4048.changed.md index e5b9aab06..edef83283 100644 --- a/changelog/4048.changed.md +++ b/changelog/4048.changed.md @@ -1 +1 @@ -- Narrowed misleading `Optional` type hints and deduplicated token expiry calculation in `configure()` (`pipecat.runner.daily`). +- Added `enable_dialout` parameter to `configure()` in `pipecat.runner.daily` to support dial-out rooms. Also narrowed misleading `Optional` type hints and deduplicated token expiry calculation. diff --git a/src/pipecat/runner/daily.py b/src/pipecat/runner/daily.py index 099d931a4..b9bcb6e3d 100644 --- a/src/pipecat/runner/daily.py +++ b/src/pipecat/runner/daily.py @@ -84,6 +84,7 @@ async def configure( sip_caller_phone: Optional[str] = None, sip_enable_video: bool = False, sip_num_endpoints: int = 1, + enable_dialout: bool = False, sip_codecs: Optional[Dict[str, List[str]]] = None, sip_provider: Optional[str] = None, room_geo: Optional[str] = None, @@ -105,6 +106,8 @@ async def configure( When provided, enables SIP functionality and returns SipRoomConfig. sip_enable_video: Whether video is enabled for SIP. sip_num_endpoints: Number of allowed SIP endpoints. + enable_dialout: Whether to enable outbound dialing (PSTN or SIP) on the room. + Requires dial-out entitlement on your Daily account. sip_codecs: Codecs to support for audio and video. If None, uses Daily defaults. Example: {"audio": ["OPUS"], "video": ["H264"]} sip_provider: SIP provider name (e.g., "daily"). Only used when @@ -159,6 +162,7 @@ async def configure( sip_caller_phone is not None, sip_enable_video is not False, sip_num_endpoints != 1, + enable_dialout is not False, sip_codecs is not None, sip_provider is not None, room_geo is not None, @@ -232,10 +236,7 @@ async def configure( provider=sip_provider, ) room_properties.sip = sip_params - # Explicitly disable dialout to prevent room creation failures on - # accounts where dialout defaults to enabled but the plan lacks the - # required dialout entitlement. - room_properties.enable_dialout = False + room_properties.enable_dialout = enable_dialout room_properties.start_video_off = not sip_enable_video # Voice-only by default # Create room parameters