Twilio SIP and PSTN Configurations

  1. REST API to start dialout from Daily into Twilio
    1. Room should be created with enable_dialout set to true
    2. https://docs.daily.co/reference/rest-api/rooms/dialout/start
  2. Twilio Configuration
    1. Buy a phone-number
    2. Configure a SIP Domain
    3. Webhook code that executes when the Twilio SIP URI gets a dialout from Daily’s meeting room.

Call Daily’s dialOut API with

curl -H "Content-Type: application/json" \
     -H "Authorization: Bearer $TOKEN" \
     -XPOST -d '{"sipUri": "<sip:$PHONE@$domain.sip.twilio.com>", \
				"displayName":$PHONE, "video":false }' \
     <https://api.daily.co/v1/rooms/$ROOM/dialOut/start>

Twilio Configuration

A. Buy a phone number

Untitled

B. Configure a SIP Domain (e.g., daily-twilio-integration — you can choose any name here. Whatever you choose, you’ll have to use in the examples)

Untitled

C. webhook code that executes when the above SIP URI gets a dialout from Daily’s meeting room

This is code running at: https://ldcwrxkisf.execute-api.us-east-2.amazonaws.com/prod/twilioDialOutHandler — you will have to create your own lambda or similar to handle the hooks