telnyx-ai-assistants-c…
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
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.
/telnyx-sip-integrations-javascriptContext 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.
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. -->
npm install telnyx@6.74.2
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.
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).
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)
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)
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)
Deletes a stored custom credentials configuration.
`DELETE /custom_storage_credentials/{connection_id}`
await client.customStorageCredentials.delete('connection_id');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)
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)
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)
Deletes a stored Dialogflow Connection.
`DELETE /dialogflow_connections/{connection_id}`
await client.dialogflowConnections.delete('connection_id');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
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.