/telnyx-sip-integrations-javascript
Manage call recordings, media storage, Dialogflow integration, and external connections for SIP trunking. This skill provides JavaScript SDK examples.
$ npx -y skills add team-telnyx/ai --skill telnyx-sip-integrations-javascript --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/telnyx-sip-integrations-javascript
Context preview
The summary Claude sees to decide when to auto-load this skill.
Manage call recordings, media storage, Dialogflow integration, and external connections for SIP trunking. This skill provides JavaScript SDK examples.
SKILL.md
telnyx-sip-integrations-javascript.SKILL.mdname: telnyx-sip-integrations-javascript
description: >-
Manage call recordings, media storage, Dialogflow integration, and external
connections for SIP trunking. This skill provides JavaScript SDK examples.
metadata:
author: telnyx
product: sip-integrations
language: javascript
generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Sip Integrations - JavaScript
Installation
npm install telnyx@6.74.2
Setup
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});All examples below assume `client` is already initialized as shown above.
Error Handling
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
try {
const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' });
} catch (err) {
if (err instanceof Telnyx.APIConnectionError) {
console.error('Network error — check connectivity and retry');
} else if (err instanceof Telnyx.RateLimitError) {
// 429: rate limited — wait and retry with exponential backoff
const retryAfter = err.headers?.['retry-after'] || 1;
await new Promise(r => setTimeout(r, retryAfter * 1000));
} else if (err instanceof Telnyx.APIError) {
console.error(`API error ${err.status}: ${err.message}`);
if (err.status === 422) {
console.error('Validation error — check required fields and formats');
}
}
}Common error codes: `401` invalid API key, `403` insufficient permissions, `404` resource not found, `422` validation error (check field formats), `429` rate limited (retry with exponential backoff).
Important Notes
- **Pagination:** List methods return an auto-paginating iterator. Use `for await (const item of result) { ... }` to iterate through all pages automatically.
Retrieve a stored credential
Returns the information about custom storage credentials.
`GET /custom_storage_credentials/{connection_id}`
const customStorageCredential = await client.customStorageCredentials.retrieve('connection_id');
console.log(customStorageCredential.connection_id);Returns: `backend` (enum: gcs, s3, azure), `configuration` (object)
Create a custom storage credential
Creates a custom storage credentials configuration.
`POST /custom_storage_credentials/{connection_id}`
const customStorageCredential = await client.customStorageCredentials.create('connection_id', {
backend: 'gcs',
configuration: { backend: 'gcs' },
});
console.log(customStorageCredential.connection_id);Returns: `backend` (enum: gcs, s3, azure), `configuration` (object)
Update a stored credential
Updates a stored custom credentials configuration.
`PUT /custom_storage_credentials/{connection_id}`
const customStorageCredential = await client.customStorageCredentials.update('connection_id', {
backend: 'gcs',
configuration: { backend: 'gcs' },
});
console.log(customStorageCredential.connection_id);Returns: `backend` (enum: gcs, s3, azure), `configuration` (object)
Delete a stored credential
Deletes a stored custom credentials configuration.
`DELETE /custom_storage_credentials/{connection_id}`
await client.customStorageCredentials.delete('connection_id');Retrieve stored Dialogflow Connection
Return details of the Dialogflow connection associated with the given CallControl connection.
`GET /dialogflow_connections/{connection_id}`
const dialogflowConnection = await client.dialogflowConnections.retrieve('connection_id');
console.log(dialogflowConnection.data);Returns: `connection_id` (string), `conversation_profile_id` (string), `environment` (string), `record_type` (string), `service_account` (string)
Create a Dialogflow Connection
Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.
`POST /dialogflow_connections/{connection_id}`
const dialogflowConnection = await client.dialogflowConnections.create('connection_id', {
service_account: {
type: 'bar',
project_id: 'bar',
private_key_id: 'bar',
private_key: 'bar',
client_email: 'bar',
client_id: 'bar',
auth_uri: 'bar',
token_uri: 'bar',
auth_provider_x509_cert_url: 'bar',
client_x509_cert_url: 'bar',
},
});
console.log(dialogflowConnection.data);Returns: `connection_id` (string), `conversation_profile_id` (string), `environment` (string), `record_type` (string), `service_account` (string)
Update stored Dialogflow Connection
Updates a stored Dialogflow Connection.
`PUT /dialogflow_connections/{connection_id}`
const dialogflowConnection = await client.dialogflowConnections.update('connection_id', {
service_account: {
type: 'bar',
project_id: 'bar',
private_key_id: 'bar',
private_key: 'bar',
client_email: 'bar',
client_id: 'bar',
auth_uri: 'bar',
token_uri: 'bar',
auth_provider_x509_cert_url: 'bar',
client_x509_cert_url: 'bar',
},
});
console.log(dialogflowConnection.data);Returns: `connection_id` (string), `conversation_profile_id` (string), `environment` (string), `record_type` (string), `service_account` (string)
Delete stored Dialogflow Connection
Deletes a stored Dialogflow Connection.
`DELETE /dialogflow_connections/{connection_id}`
await client.dialogflowConnections.delete('connection_id');List all External Connections
This endpoint returns a list of your External Connections inside the 'data' attribute of the response. External Connections are used by Telnyx customers to seamless configure SIP trunking integrations with Telnyx Partners, through External Voice Integrations in Mission Control Portal.
`GET /external_
Read more
name: telnyx-sip-integrations-javascript description: >- Manage call recordings, media storage, Dialogflow integration, and external connections for SIP trunking. This skill provides JavaScript SDK examples. metadata: author: telnyx product: sip-integrations language: javascript generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Sip Integrations - JavaScript
Installation
npm install telnyx@6.74.2
Setup
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});All examples below assume `client` is already initialized as shown above.
Error Handling
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
try {
const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' });
} catch (err) {
if (err instanceof Telnyx.APIConnectionError) {
console.error('Network error — check connectivity and retry');
} else if (err instanceof Telnyx.RateLimitError) {
// 429: rate limited — wait and retry with exponential backoff
const retryAfter = err.headers?.['retry-after'] || 1;
await new Promise(r => setTimeout(r, retryAfter * 1000));
} else if (err instanceof Telnyx.APIError) {
console.error(`API error ${err.status}: ${err.message}`);
if (err.status === 422) {
console.error('Validation error — check required fields and formats');
}
}
}Common error codes: `401` invalid API key, `403` insufficient permissions, `404` resource not found, `422` validation error (check field formats), `429` rate limited (retry with exponential backoff).
Important Notes
- **Pagination:** List methods return an auto-paginating iterator. Use `for await (const item of result) { ... }` to iterate through all pages automatically.
Retrieve a stored credential
Returns the information about custom storage credentials.
`GET /custom_storage_credentials/{connection_id}`
const customStorageCredential = await client.customStorageCredentials.retrieve('connection_id');
console.log(customStorageCredential.connection_id);Returns: `backend` (enum: gcs, s3, azure), `configuration` (object)
Create a custom storage credential
Creates a custom storage credentials configuration.
`POST /custom_storage_credentials/{connection_id}`
const customStorageCredential = await client.customStorageCredentials.create('connection_id', {
backend: 'gcs',
configuration: { backend: 'gcs' },
});
console.log(customStorageCredential.connection_id);Returns: `backend` (enum: gcs, s3, azure), `configuration` (object)
Update a stored credential
Updates a stored custom credentials configuration.
`PUT /custom_storage_credentials/{connection_id}`
const customStorageCredential = await client.customStorageCredentials.update('connection_id', {
backend: 'gcs',
configuration: { backend: 'gcs' },
});
console.log(customStorageCredential.connection_id);Returns: `backend` (enum: gcs, s3, azure), `configuration` (object)
Delete a stored credential
Deletes a stored custom credentials configuration.
`DELETE /custom_storage_credentials/{connection_id}`
await client.customStorageCredentials.delete('connection_id');Retrieve stored Dialogflow Connection
Return details of the Dialogflow connection associated with the given CallControl connection.
`GET /dialogflow_connections/{connection_id}`
const dialogflowConnection = await client.dialogflowConnections.retrieve('connection_id');
console.log(dialogflowConnection.data);Returns: `connection_id` (string), `conversation_profile_id` (string), `environment` (string), `record_type` (string), `service_account` (string)
Create a Dialogflow Connection
Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.
`POST /dialogflow_connections/{connection_id}`
const dialogflowConnection = await client.dialogflowConnections.create('connection_id', {
service_account: {
type: 'bar',
project_id: 'bar',
private_key_id: 'bar',
private_key: 'bar',
client_email: 'bar',
client_id: 'bar',
auth_uri: 'bar',
token_uri: 'bar',
auth_provider_x509_cert_url: 'bar',
client_x509_cert_url: 'bar',
},
});
console.log(dialogflowConnection.data);Returns: `connection_id` (string), `conversation_profile_id` (string), `environment` (string), `record_type` (string), `service_account` (string)
Update stored Dialogflow Connection
Updates a stored Dialogflow Connection.
`PUT /dialogflow_connections/{connection_id}`
const dialogflowConnection = await client.dialogflowConnections.update('connection_id', {
service_account: {
type: 'bar',
project_id: 'bar',
private_key_id: 'bar',
private_key: 'bar',
client_email: 'bar',
client_id: 'bar',
auth_uri: 'bar',
token_uri: 'bar',
auth_provider_x509_cert_url: 'bar',
client_x509_cert_url: 'bar',
},
});
console.log(dialogflowConnection.data);Returns: `connection_id` (string), `conversation_profile_id` (string), `environment` (string), `record_type` (string), `service_account` (string)
Delete stored Dialogflow Connection
Deletes a stored Dialogflow Connection.
`DELETE /dialogflow_connections/{connection_id}`
await client.dialogflowConnections.delete('connection_id');List all External Connections
This endpoint returns a list of your External Connections inside the 'data' attribute of the response. External Connections are used by Telnyx customers to seamless configure SIP trunking integrations with Telnyx Partners, through External Voice Integrations in Mission Control Portal.
`GET /external_
This repo is the one-stop shop for AI Agents and AI-first developers building with Telnyx — everything an agent needs to build production-grade applications and manage its account, from signup to funding.
Repo: team-telnyx/ai
Other skills on team-telnyx-ai.
- /telnyx-ai-assistants-curl
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-go
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-java
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-javascript
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-python
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-ruby
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill

