SIP

Daily supports both SIP Dialin and SIP Dialout along with the following codecs:

  • Audio: PCMU/PCMA, G722, Opus
  • Video: H264, VP8.

We've tested SIP to work with CPaaS vendors (Twilio, Telnyx, SignalWire) and SIP hardware.

Enable SIP

  • Ensure your Daily account is a paid account (add a credit card in the dashboard)
  • We've removed the requirement for a paid-support plan for SIP, it is now available for all pay-as-you-go accounts.
  • Daily supports multiple SIP dial-in and SIP dial-out, the default max_sip_pstn_sessions_per_room=5. Please write to help@daily.co to increase this number.

SIP dial-in (audio only)

Provision the room for a single SIP dial-in

To enable SIP dial-in on a room, use the room properties REST API to set the "sip" property. As follows:

When this is done, a new read-only "sip_uri" property will be added to your room, as can be seen in the response:

You can disable SIP on your room by setting the "sip" property to null.

Provising multiple SIP dial-ins

Multiple SIP dial-in can be configured for a room using room sip property num_endpoints. Each SIP and PSTN connection counts towards the max_sip_pstn_sessions_per_room limit. For example, if you set num_endpoints=5, then initiating a SIP dialout or a PSTN connection will fail, as all SIP endpoints have been configured for SIP dial-in.

To enable multiple SIP dial-in on a room, use the room properties REST API to set the "sip" property. As follows:

When this is done, "sip_uri" contains addition "extra_endpoints" property, as can be seen in the response:

SIP dial-in (audio and video)

Provision the room with SIP video

To enable video SIP dial-in on a room, use the room properties REST API to set the "sip" property. As follows:

When this is done, a new read-only "sip_uri" property will be added to your room, as can be seen in the response:

Dynamically passing display_name for SIP dial-in

display_name is configured as part of the room creation or set as room property. Sometimes diplay name is not know at the time of room creation. For such case sip participant's name can be passed as query parameter to sip_uri. Name must be urlencoded to handle special character (space, &, % ..) e.g. my user name is encoded with encodeURIComponent and passed in as my%20user%20name. See example, below

when x-daily_display_name is not passed, the display_name set in the room property is used for each incoming SIP dial-in

How to test SIP dial-in

Once the meeting session starts, the SIP worker(s) will startup and when the SIP URIs are registered with the SIP network, dialin-ready will fire for each unique SIP URI. Then the third-party SIP client may dial the endpoints provided in the "sip_uri".

  • A Daily "sip_uri" endpoint can only be used by one SIP client at a time.
  • If multiple SIP clients need to join a room, please select an appropriate num_endpoints.
  • When the SIP call is established, a new participant with the "display_name" will join the Daily call
  • After a disconnection, the SIP client may reuse "sip_uri" to dial again and re-join the call
  • Similarly, if the SIP call fails for some reason, the SIP client will need to re-establish the call
  • If the Daily or the SIP call ends, that SIP participant(s) will leave the call and the SIP call legs will be terminated
  • If possible, we recommend that SIP clients use the Opus codec for optimal quality and latency
  • You can disable SIP on your room by setting the "sip" property to null.

SIP Dial-out

A Daily room can dialout to a one or more "sipUri", please make sure that the sipUri is prefixed with "sip:`". The API can be invoked from within the client libraries or via the REST API.

You can dialout with SIP Video disabled

Or dialout with SIP Video enabled.

Call Transfer and SIP REFER

Call Transfer moves the SIP connection within Daily, i.e., from one Daily room to another, typically within call centers where you want to move a call from one Agent to another Agent.

Alternatively, you would use SIP REFER when moving an established SIP call away from Daily to an external SIP address. The most common example is that the IVR is outside of Daily, when a selection is made by the enduser, the call is forwarded to a Daily Room where a Human Agent or a Voice Bot services the call, after the call is done, the Agent or Voice Bot wishes to send the call back toe IVR without dropping the inbound call, in this case, since the IVR's SIP URI is external to Daily, you need to invoke SIP REFER.

You can transfer a dial-in call and sip refer with the Daily API or use Client SDK APIs: sipCallTransfer(), sipRefer() calls found in our daily-js.

// sessionId, is the sip sessionId
// toEndpoint is the target Daily sip address, sip:123456780@example.sip.daily.co
callObject.sipCallTransfer(sessionId, toEndpoint);
//for transfering outside daily.co sip address, use sipRefer instead
// toEndpoint is the target sip address, sip:refer-address@sip.example.com
callObject.sipRefer(sessionId, toEndpoint);