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

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

const response = await client.calls.actions.startForking('call_control_id');

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

Fork media request

rx
string

The network target, udp:ip_address:port, where the call's incoming RTP media packets should be forwarded.

Example:

"udp:192.0.2.1:9000"

stream_type
enum<string>
default:decrypted

Optionally specify a media type to stream. If decrypted selected, Telnyx will decrypt incoming SIP media before forking to the target. rx and tx are required fields if decrypted selected.

Available options:
decrypted
Example:

"decrypted"

tx
string

The network target, udp:ip_address:port, where the call's outgoing RTP media packets should be forwarded.

Example:

"udp:192.0.2.1:9001"

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"

Response

Successful response upon making a call control command.

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