Skip to content

Use explicit Daily room config with SIP provider for Twilio bots#197

Open
vr000m wants to merge 4 commits intomainfrom
twilio-sip-explicit-room-config
Open

Use explicit Daily room config with SIP provider for Twilio bots#197
vr000m wants to merge 4 commits intomainfrom
twilio-sip-explicit-room-config

Conversation

@vr000m
Copy link
Contributor

@vr000m vr000m commented Mar 11, 2026

Summary

  • dial-in: Replace simple configure(session, sip_caller_phone=...) with explicit DailyRoomProperties and DailyRoomSipParams for full control over room configuration (geo, expiry, SIP provider). Pass to_phone through to bot for future multi-region Twilio credential selection.
  • dial-out: Set explicit room properties (geo, enable_dialout, expiry). Add provider field to DialoutSettings so it can be passed via curl in start_dialout. Add dialout event handlers (on_dialout_connected, on_dialout_stopped, on_dialout_warning) for better observability.
  • Add .env.example files to both Twilio bot directories.
  • Update dial-in README examples to include the new to_phone field.

Test plan

  • Dial-in: Configure Twilio webhook, call the number, verify bot connects and converses
  • Dial-out: Run curl -X POST http://localhost:8080/dialout with provider: "daily", verify bot dials out and converses
  • Verify rooms are created in us-east-1 geo with correct expiry (600s)
  • Verify dial-out works without provider field (backward compatibility)

vr000m added 2 commits March 10, 2026 20:33
- dial-in: Use DailyRoomProperties with geo, expiry, and SIP params
  instead of simple configure() call. Pass sip_provider and to_phone
  through to bot for future multi-region credential selection.
- dial-out: Set explicit room properties (geo, enable_dialout, expiry).
  Add provider field to DialoutSettings so it can be passed via curl.
  Add dialout event handlers for better observability.
- Add .env.example files to both Twilio bot directories.
- Update dial-in README examples to include to_phone field.
@vr000m vr000m requested a review from markbackman March 11, 2026 03:46
Copy link
Contributor

@markbackman markbackman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments. The biggest being trying to absorb the change into configure() if possible to make it easier to use SIP.

Both directories already have env.example (without dot prefix).
Copy link
Contributor

@markbackman markbackman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's merge once 0.0.106 is released.

- Rename titles to show the full call path
- Add ASCII flow diagrams
- Explain provider="daily" and why Twilio is involved
- Link to daily-pstn-* examples for Daily-owned numbers
- Add note about dynamic callerId via SIP URI overloading
- Add note about Daily Provider static IP advantage for ACLs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants