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>",
"video": true,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900
},
"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>",
"video": True,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900
},
"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>',
video: true,
videoSettings: {width: 1280, height: 720, fps: 15, videoBitrate: 900},
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>',
'video' => true,
'videoSettings' => [
'width' => 1280,
'height' => 720,
'fps' => 15,
'videoBitrate' => 900
],
'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 \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900\n },\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 \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900\n },\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 \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900\n },\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"
}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>",
"video": true,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900
},
"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>",
"video": True,
"videoSettings": {
"width": 1280,
"height": 720,
"fps": 15,
"videoBitrate": 900
},
"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>',
video: true,
videoSettings: {width: 1280, height: 720, fps: 15, videoBitrate: 900},
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>',
'video' => true,
'videoSettings' => [
'width' => 1280,
'height' => 720,
'fps' => 15,
'videoBitrate' => 900
],
'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 \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900\n },\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 \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900\n },\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 \"video\": true,\n \"videoSettings\": {\n \"width\": 1280,\n \"height\": 720,\n \"fps\": 15,\n \"videoBitrate\": 900\n },\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"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
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".
phone number to call. number must start with country code e.g +1
the extension to dial after dialed number is connected. e.g. 1234
number of seconds to wait before dialing the extension, once dialed number is connected.
0 <= x <= 60The sipUri or The phone participant is shown with this name in the web UI.
userId to assign to the participant. default userId is null.
determine the phone number used for outbound call (i.e. phone number displayed on the called phone). purchased phone
Enable SIP video in the room, only available for sipUri.
Video encoding settings. Only applicable when video is true.
Show child attributes
Show child attributes
Specify the codecs to use for dial-out.
Show child attributes
Show child attributes
Response
200