curl --request POST \
--url https://api.daily.co/v1/rooms/{room_name}/dialOut/start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sipUri": "<string>",
"phoneNumber": "<string>",
"extension": "<string>",
"waitBeforeExtensionDialSec": 0,
"displayName": "<string>",
"userId": "<string>",
"callerId": "<string>",
"callerName": "<string>",
"video": true,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900,
"layout": {
"preset": "sip-portrait",
"variant": "inset",
"mainParticipant": "patient-42",
"insetParticipant": "doctor-7"
}
},
"provider": "signalwire",
"codecs": {
"audio": [
[
"OPUS",
"G722",
"PCMU",
"PCMA"
]
],
"video": [
[
"H264",
"VP8"
]
]
}
}
'import requests
url = "https://api.daily.co/v1/rooms/{room_name}/dialOut/start"
payload = {
"sipUri": "<string>",
"phoneNumber": "<string>",
"extension": "<string>",
"waitBeforeExtensionDialSec": 0,
"displayName": "<string>",
"userId": "<string>",
"callerId": "<string>",
"callerName": "<string>",
"video": True,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900,
"layout": {
"preset": "sip-portrait",
"variant": "inset",
"mainParticipant": "patient-42",
"insetParticipant": "doctor-7"
}
},
"provider": "signalwire",
"codecs": {
"audio": [["OPUS", "G722", "PCMU", "PCMA"]],
"video": [["H264", "VP8"]]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sipUri: '<string>',
phoneNumber: '<string>',
extension: '<string>',
waitBeforeExtensionDialSec: 0,
displayName: '<string>',
userId: '<string>',
callerId: '<string>',
callerName: '<string>',
video: true,
videoSettings: {
width: 1280,
height: 720,
fps: 15,
videoBitrate: 900,
layout: {
preset: 'sip-portrait',
variant: 'inset',
mainParticipant: 'patient-42',
insetParticipant: 'doctor-7'
}
},
provider: 'signalwire',
codecs: {audio: [['OPUS', 'G722', 'PCMU', 'PCMA']], video: [['H264', 'VP8']]}
})
};
fetch('https://api.daily.co/v1/rooms/{room_name}/dialOut/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.daily.co/v1/rooms/{room_name}/dialOut/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sipUri' => '<string>',
'phoneNumber' => '<string>',
'extension' => '<string>',
'waitBeforeExtensionDialSec' => 0,
'displayName' => '<string>',
'userId' => '<string>',
'callerId' => '<string>',
'callerName' => '<string>',
'video' => true,
'videoSettings' => [
'width' => 1280,
'height' => 720,
'fps' => 15,
'videoBitrate' => 900,
'layout' => [
'preset' => 'sip-portrait',
'variant' => 'inset',
'mainParticipant' => 'patient-42',
'insetParticipant' => 'doctor-7'
]
],
'provider' => 'signalwire',
'codecs' => [
'audio' => [
[
'OPUS',
'G722',
'PCMU',
'PCMA'
]
],
'video' => [
[
'H264',
'VP8'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.daily.co/v1/rooms/{room_name}/dialOut/start"
payload := strings.NewReader("{\n \"sipUri\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"extension\": \"<string>\",\n \"waitBeforeExtensionDialSec\": 0,\n \"displayName\": \"<string>\",\n \"userId\": \"<string>\",\n \"callerId\": \"<string>\",\n \"callerName\": \"<string>\",\n \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900,\n \"layout\": {\n \"preset\": \"sip-portrait\",\n \"variant\": \"inset\",\n \"mainParticipant\": \"patient-42\",\n \"insetParticipant\": \"doctor-7\"\n }\n },\n \"provider\": \"signalwire\",\n \"codecs\": {\n \"audio\": [\n [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\"\n ]\n ],\n \"video\": [\n [\n \"H264\",\n \"VP8\"\n ]\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.daily.co/v1/rooms/{room_name}/dialOut/start")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sipUri\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"extension\": \"<string>\",\n \"waitBeforeExtensionDialSec\": 0,\n \"displayName\": \"<string>\",\n \"userId\": \"<string>\",\n \"callerId\": \"<string>\",\n \"callerName\": \"<string>\",\n \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900,\n \"layout\": {\n \"preset\": \"sip-portrait\",\n \"variant\": \"inset\",\n \"mainParticipant\": \"patient-42\",\n \"insetParticipant\": \"doctor-7\"\n }\n },\n \"provider\": \"signalwire\",\n \"codecs\": {\n \"audio\": [\n [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\"\n ]\n ],\n \"video\": [\n [\n \"H264\",\n \"VP8\"\n ]\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daily.co/v1/rooms/{room_name}/dialOut/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sipUri\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"extension\": \"<string>\",\n \"waitBeforeExtensionDialSec\": 0,\n \"displayName\": \"<string>\",\n \"userId\": \"<string>\",\n \"callerId\": \"<string>\",\n \"callerName\": \"<string>\",\n \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900,\n \"layout\": {\n \"preset\": \"sip-portrait\",\n \"variant\": \"inset\",\n \"mainParticipant\": \"patient-42\",\n \"insetParticipant\": \"doctor-7\"\n }\n },\n \"provider\": \"signalwire\",\n \"codecs\": {\n \"audio\": [\n [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\"\n ]\n ],\n \"video\": [\n [\n \"H264\",\n \"VP8\"\n ]\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": "true",
"sessionId": "UUID of the dial-out session"
}{
"error": "invalid-request-error",
"info": "missing required field"
}{
"error": "not-found",
"info": "room my-room does not seem to be hosting a call currently"
}{
"error": "service-temporarily-unavailable",
"info": "service is temporarily unavailable, please try again later"
}Room Dial Out Start
Start a dial-out in a room
curl --request POST \
--url https://api.daily.co/v1/rooms/{room_name}/dialOut/start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sipUri": "<string>",
"phoneNumber": "<string>",
"extension": "<string>",
"waitBeforeExtensionDialSec": 0,
"displayName": "<string>",
"userId": "<string>",
"callerId": "<string>",
"callerName": "<string>",
"video": true,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900,
"layout": {
"preset": "sip-portrait",
"variant": "inset",
"mainParticipant": "patient-42",
"insetParticipant": "doctor-7"
}
},
"provider": "signalwire",
"codecs": {
"audio": [
[
"OPUS",
"G722",
"PCMU",
"PCMA"
]
],
"video": [
[
"H264",
"VP8"
]
]
}
}
'import requests
url = "https://api.daily.co/v1/rooms/{room_name}/dialOut/start"
payload = {
"sipUri": "<string>",
"phoneNumber": "<string>",
"extension": "<string>",
"waitBeforeExtensionDialSec": 0,
"displayName": "<string>",
"userId": "<string>",
"callerId": "<string>",
"callerName": "<string>",
"video": True,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900,
"layout": {
"preset": "sip-portrait",
"variant": "inset",
"mainParticipant": "patient-42",
"insetParticipant": "doctor-7"
}
},
"provider": "signalwire",
"codecs": {
"audio": [["OPUS", "G722", "PCMU", "PCMA"]],
"video": [["H264", "VP8"]]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sipUri: '<string>',
phoneNumber: '<string>',
extension: '<string>',
waitBeforeExtensionDialSec: 0,
displayName: '<string>',
userId: '<string>',
callerId: '<string>',
callerName: '<string>',
video: true,
videoSettings: {
width: 1280,
height: 720,
fps: 15,
videoBitrate: 900,
layout: {
preset: 'sip-portrait',
variant: 'inset',
mainParticipant: 'patient-42',
insetParticipant: 'doctor-7'
}
},
provider: 'signalwire',
codecs: {audio: [['OPUS', 'G722', 'PCMU', 'PCMA']], video: [['H264', 'VP8']]}
})
};
fetch('https://api.daily.co/v1/rooms/{room_name}/dialOut/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.daily.co/v1/rooms/{room_name}/dialOut/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sipUri' => '<string>',
'phoneNumber' => '<string>',
'extension' => '<string>',
'waitBeforeExtensionDialSec' => 0,
'displayName' => '<string>',
'userId' => '<string>',
'callerId' => '<string>',
'callerName' => '<string>',
'video' => true,
'videoSettings' => [
'width' => 1280,
'height' => 720,
'fps' => 15,
'videoBitrate' => 900,
'layout' => [
'preset' => 'sip-portrait',
'variant' => 'inset',
'mainParticipant' => 'patient-42',
'insetParticipant' => 'doctor-7'
]
],
'provider' => 'signalwire',
'codecs' => [
'audio' => [
[
'OPUS',
'G722',
'PCMU',
'PCMA'
]
],
'video' => [
[
'H264',
'VP8'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.daily.co/v1/rooms/{room_name}/dialOut/start"
payload := strings.NewReader("{\n \"sipUri\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"extension\": \"<string>\",\n \"waitBeforeExtensionDialSec\": 0,\n \"displayName\": \"<string>\",\n \"userId\": \"<string>\",\n \"callerId\": \"<string>\",\n \"callerName\": \"<string>\",\n \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900,\n \"layout\": {\n \"preset\": \"sip-portrait\",\n \"variant\": \"inset\",\n \"mainParticipant\": \"patient-42\",\n \"insetParticipant\": \"doctor-7\"\n }\n },\n \"provider\": \"signalwire\",\n \"codecs\": {\n \"audio\": [\n [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\"\n ]\n ],\n \"video\": [\n [\n \"H264\",\n \"VP8\"\n ]\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.daily.co/v1/rooms/{room_name}/dialOut/start")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sipUri\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"extension\": \"<string>\",\n \"waitBeforeExtensionDialSec\": 0,\n \"displayName\": \"<string>\",\n \"userId\": \"<string>\",\n \"callerId\": \"<string>\",\n \"callerName\": \"<string>\",\n \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900,\n \"layout\": {\n \"preset\": \"sip-portrait\",\n \"variant\": \"inset\",\n \"mainParticipant\": \"patient-42\",\n \"insetParticipant\": \"doctor-7\"\n }\n },\n \"provider\": \"signalwire\",\n \"codecs\": {\n \"audio\": [\n [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\"\n ]\n ],\n \"video\": [\n [\n \"H264\",\n \"VP8\"\n ]\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daily.co/v1/rooms/{room_name}/dialOut/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sipUri\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"extension\": \"<string>\",\n \"waitBeforeExtensionDialSec\": 0,\n \"displayName\": \"<string>\",\n \"userId\": \"<string>\",\n \"callerId\": \"<string>\",\n \"callerName\": \"<string>\",\n \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900,\n \"layout\": {\n \"preset\": \"sip-portrait\",\n \"variant\": \"inset\",\n \"mainParticipant\": \"patient-42\",\n \"insetParticipant\": \"doctor-7\"\n }\n },\n \"provider\": \"signalwire\",\n \"codecs\": {\n \"audio\": [\n [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\"\n ]\n ],\n \"video\": [\n [\n \"H264\",\n \"VP8\"\n ]\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": "true",
"sessionId": "UUID of the dial-out session"
}{
"error": "invalid-request-error",
"info": "missing required field"
}{
"error": "not-found",
"info": "room my-room does not seem to be hosting a call currently"
}{
"error": "service-temporarily-unavailable",
"info": "service is temporarily unavailable, please try again later"
}Authorizations
Body
sipUri to call. uri should start with sip:. Query parameters appended to the sipUri will appear as SIP Headers in the INTIVE message at the remote SIP endpoint. Headers must start with "X-", e.g. to append a header "myexampleHeader" it is appended to sipUri as "sip:<dialout_sip_uri>?X-header-1=val-1&X-header-2=val-2".
The id of a purchased phone number on the domain, not the phone number itself. The phone number associated with this id is displayed as the caller ID on the called phone.
SIP only. The name the called device shows for the incoming call: the display-name of the SIP From header. Independent of displayName, which names the participant inside the room. Max 70 characters; ", \ and control characters are rejected. Not allowed with phoneNumber. A back-to-back user agent (B2BUA) between Daily and the device decides what its own leg shows; see caller name on the called device.
70The SIP provider for this dial-out. Applies to sipUri dial-out only. "daily" dials the sipUri through the Daily SIP provider, the recommended choice for SIP dial-out. A phoneNumber dial-out with "daily" returns 400. See SIP providers.
signalwire, daily Response
200