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