Make and receive calls, transfer, bridge, and manage call lifecycle with Call Control. Includes application management and call events. This skill provides JavaScript SDK examples.
Make and receive calls, transfer, bridge, and manage call lifecycle with Call Control. Includes application management and call events. This skill provides JavaScript SDK examples.
POST /calls/{call_control_id}/actions/transfer — Required: to
const response = await client.calls.actions.transfer('call_control_id', {
to: '+18005550100',
});
console.log(response.data);
List all active calls for given connection
Lists all active calls for given connection.
GET /connections/{connection_id}/active_calls
// Automatically fetches more pages as needed.forawait (const connectionListActiveCallsResponse of client.connections.listActiveCalls(
'1293384261075731461',
)) {
console.log(connectionListActiveCallsResponse.call_control_id);
}
List call control applications
Return a list of call control applications.
GET /call_control_applications
// Automatically fetches more pages as needed.forawait (const callControlApplication of client.callControlApplications.list()) {
console.log(callControlApplication.id);
}
Create a call control application
Create a call control application.
POST /call_control_applications — Required: application_name, webhook_event_url
// Automatically fetches more pages as needed.forawait (const callEventListResponse of client.callEvents.list()) {
console.log(callEventListResponse.call_leg_id);
}
Webhooks
The following webhook events are sent to your configured webhook URL.
All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for verification (Standard Webhooks compatible).