Skip to main content
POST
/
calls
/
{call_control_id}
/
actions
/
bridge
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.calls.actions.bridge('call_control_id', {
  body_call_control_id: 'v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg',
});

console.log(response.data);
{
  "data": {
    "result": "ok"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

call_control_id
string
required

Unique identifier and token for controlling the call

Body

application/json

Bridge call request

call_control_id
string
required

The Call Control ID of the call you want to bridge with, can't be used together with queue parameter or video_room_id parameter.

Example:

"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"

client_state
string

Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.

Example:

"aGF2ZSBhIG5pY2UgZGF5ID1d"

command_id
string

Use this field to avoid duplicate commands. Telnyx will ignore any command with the same command_id for the same call_control_id.

Example:

"891510ac-f3e4-11e8-af5b-de00688a4901"

queue
string

The name of the queue you want to bridge with, can't be used together with call_control_id parameter or video_room_id parameter. Bridging with a queue means bridging with the first call in the queue. The call will always be removed from the queue regardless of whether bridging succeeds. Returns an error when the queue is empty.

Example:

"support"

video_room_id
string<uuid>

The ID of the video room you want to bridge with, can't be used together with call_control_id parameter or queue parameter.

Example:

"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"

video_room_context
string

The additional parameter that will be passed to the video conference. It is a text field and the user can decide how to use it. For example, you can set the participant name or pass JSON text. It can be used only with video_room_id parameter.

Example:

"Alice"

park_after_unbridge
string

Specifies behavior after the bridge ends (i.e. the opposite leg either hangs up or is transferred). If supplied with the value self, the current leg will be parked after unbridge. If not set, the default behavior is to hang up the leg.

Example:

"self"

play_ringtone
boolean
default:false

Specifies whether to play a ringtone if the call you want to bridge with has not yet been answered.

Example:

true

ringtone
enum<string>
default:us

Specifies which country ringtone to play when play_ringtone is set to true. If not set, the US ringtone will be played.

Available options:
at,
au,
be,
bg,
br,
ch,
cl,
cn,
cz,
de,
dk,
ee,
es,
fi,
fr,
gr,
hu,
il,
in,
it,
jp,
lt,
mx,
my,
nl,
no,
nz,
ph,
pl,
pt,
ru,
se,
sg,
th,
tw,
uk,
us-old,
us,
ve,
za
Example:

"pl"

record
enum<string>

Start recording automatically after an event. Disabled by default.

Available options:
record-from-answer
Example:

"record-from-answer"

record_channels
enum<string>
default:dual

Defines which channel should be recorded ('single' or 'dual') when record is specified.

Available options:
single,
dual
Example:

"single"

record_format
enum<string>
default:mp3

Defines the format of the recording ('wav' or 'mp3') when record is specified.

Available options:
wav,
mp3
Example:

"wav"

record_max_length
integer<int32>
default:0

Defines the maximum length for the recording in seconds when record is specified. The minimum value is 0. The maximum value is 43200. The default value is 0 (infinite).

Example:

1000

record_timeout_secs
integer<int32>
default:0

The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected when record is specified. The timer only starts when the speech is detected. Please note that call transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite).

Example:

100

record_track
enum<string>
default:both

The audio track to be recorded. Can be either both, inbound or outbound. If only single track is specified (inbound, outbound), channels configuration is ignored and it will be recorded as mono (single channel).

Available options:
both,
inbound,
outbound
Example:

"outbound"

record_trim
enum<string>

When set to trim-silence, silence will be removed from the beginning and end of the recording.

Available options:
trim-silence
Example:

"trim-silence"

record_custom_file_name
string

The custom recording file name to be used instead of the default call_leg_id. Telnyx will still add a Unix timestamp suffix.

Required string length: 1 - 40
Example:

"my_recording_file_name"

mute_dtmf
enum<string>
default:none

When enabled, DTMF tones are not passed to the call participant. The webhooks containing the DTMF information will be sent.

Available options:
none,
both,
self,
opposite
Example:

"opposite"

Response

Successful response upon making a call control command.

data
Call Control Command Result · object
Example:
{ "result": "ok" }