api/javascript/telnyx-sip-javascript/SKILL.md
Configure SIP trunking connections and outbound voice profiles. Use when connecting PBX systems or managing SIP infrastructure. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-sip-javascriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
npm install telnyx
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.
Get all outbound voice profiles belonging to the user that match the given filters.
GET /outbound_voice_profiles
// Automatically fetches more pages as needed.
for await (const outboundVoiceProfile of client.outboundVoiceProfiles.list()) {
console.log(outboundVoiceProfile.id);
}
Create an outbound voice profile.
POST /outbound_voice_profiles — Required: name
const outboundVoiceProfile = await client.outboundVoiceProfiles.create({ name: 'office' });
console.log(outboundVoiceProfile.data);
Retrieves the details of an existing outbound voice profile.
GET /outbound_voice_profiles/{id}
const outboundVoiceProfile = await client.outboundVoiceProfiles.retrieve('1293384261075731499');
console.log(outboundVoiceProfile.data);
PATCH /outbound_voice_profiles/{id} — Required: name
const outboundVoiceProfile = await client.outboundVoiceProfiles.update('1293384261075731499', {
name: 'office',
});
console.log(outboundVoiceProfile.data);
Deletes an existing outbound voice profile.
DELETE /outbound_voice_profiles/{id}
const outboundVoiceProfile = await client.outboundVoiceProfiles.delete('1293384261075731499');
console.log(outboundVoiceProfile.data);
Returns a list of your connections irrespective of type.
GET /connections
// Automatically fetches more pages as needed.
for await (const connectionListResponse of client.connections.list()) {
console.log(connectionListResponse.id);
}
Retrieves the high-level details of an existing connection.
GET /connections/{id}
const connection = await client.connections.retrieve('id');
console.log(connection.data);
Returns a list of your credential connections.
GET /credential_connections
// Automatically fetches more pages as needed.
for await (const credentialConnection of client.credentialConnections.list()) {
console.log(credentialConnection.id);
}
Creates a credential connection.
POST /credential_connections — Required: user_name, password, connection_name
const credentialConnection = await client.credentialConnections.create({
connection_name: 'my name',
password: 'my123secure456password789',
user_name: 'myusername123',
});
console.log(credentialConnection.data);
Retrieves the details of an existing credential connection.
GET /credential_connections/{id}
const credentialConnection = await client.credentialConnections.retrieve('id');
console.log(credentialConnection.data);
Updates settings of an existing credential connection.
PATCH /credential_connections/{id}
const credentialConnection = await client.credentialConnections.update('id');
console.log(credentialConnection.data);
Deletes an existing credential connection.
DELETE /credential_connections/{id}
const credentialConnection = await client.credentialConnections.delete('id');
console.log(credentialConnection.data);
Checks the registration_status for a credential connection, (registration_status) as well as the timestamp for the last SIP registration event (registration_status_updated_at)
POST /credential_connections/{id}/actions/check_registration_status
const response = await client.credentialConnections.actions.checkRegistrationStatus('id');
console.log(response.data);
Get all IPs belonging to the user that match the given filters.
GET /ips
// Automatically fetches more pages as needed.
for await (const ip of client.ips.list()) {
console.log(ip.id);
}
Create a new IP object.
POST /ips — Required: ip_address
const ip = await client.ips.create({ ip_address: '192.168.0.0' });
console.log(ip.data);
Return the details regarding a specific IP.
GET /ips/{id}
const ip = await client.ips.retrieve('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(ip.data);
Update the details of a specific IP.
PATCH /ips/{id} — Required: ip_address
const ip = await client.ips.update('6a09cdc3-8948-47f0-aa62-74ac943d6c58', {
ip_address: '192.168.0.0',
});
console.log(ip.data);
Delete an IP.
DELETE /ips/{id}
const ip = await client.ips.delete('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(ip.data);
Returns a list of your IP connections.
GET /ip_connections
// Automatically fetches more pages as needed.
for await (const ipConnection of client.ipConnections.list()) {
console.log(ipConnection.id);
}
Creates an IP connection.
POST /ip_connections
const ipConnection = await client.ipConnections.create();
console.log(ipConnection.data);
Retrieves the details of an existing ip connection.
GET /ip_connections/{id}
const ipConnection = await client.ipConnections.retrieve('id');
console.log(ipConnection.data);
Updates settings of an existing IP connection.
PATCH /ip_connections/{id}
const ipConnection = await client.ipConnections.update('id');
console.log(ipConnection.data);
Deletes an existing IP connection.
DELETE /ip_connections/{id}
const ipConnection = await client.ipConnections.delete('id');
console.log(ipConnection.data);
Get all FQDNs belonging to the user that match the given filters.
GET /fqdns
// Automatically fetches more pages as needed.
for await (const fqdn of client.fqdns.list()) {
console.log(fqdn.id);
}
Create a new FQDN object.
POST /fqdns — Required: fqdn, dns_record_type, connection_id
const fqdn = await client.fqdns.create({
connection_id: '1516447646313612565',
dns_record_type: 'a',
fqdn: 'example.com',
});
console.log(fqdn.data);
Return the details regarding a specific FQDN.
GET /fqdns/{id}
const fqdn = await client.fqdns.retrieve('id');
console.log(fqdn.data);
Update the details of a specific FQDN.
PATCH /fqdns/{id}
const fqdn = await client.fqdns.update('id');
console.log(fqdn.data);
Delete an FQDN.
DELETE /fqdns/{id}
const fqdn = await client.fqdns.delete('id');
console.log(fqdn.data);
Returns a list of your FQDN connections.
GET /fqdn_connections
// Automatically fetches more pages as needed.
for await (const fqdnConnection of client.fqdnConnections.list()) {
console.log(fqdnConnection.id);
}
Creates a FQDN connection.
POST /fqdn_connections — Required: connection_name
const fqdnConnection = await client.fqdnConnections.create({ connection_name: 'string' });
console.log(fqdnConnection.data);
Retrieves the details of an existing FQDN connection.
GET /fqdn_connections/{id}
const fqdnConnection = await client.fqdnConnections.retrieve('id');
console.log(fqdnConnection.data);
Updates settings of an existing FQDN connection.
PATCH /fqdn_connections/{id}
const fqdnConnection = await client.fqdnConnections.update('id');
console.log(fqdnConnection.data);
Deletes an FQDN connection.
DELETE /fqdn_connections/{id}
const fqdnConnection = await client.fqdnConnections.delete('id');
console.log(fqdnConnection.data);
GET /v2/mobile_voice_connections
// Automatically fetches more pages as needed.
for await (const mobileVoiceConnection of client.mobileVoiceConnections.list()) {
console.log(mobileVoiceConnection.id);
}
POST /v2/mobile_voice_connections
const mobileVoiceConnection = await client.mobileVoiceConnections.create();
console.log(mobileVoiceConnection.data);
GET /v2/mobile_voice_connections/{id}
const mobileVoiceConnection = await client.mobileVoiceConnections.retrieve('id');
console.log(mobileVoiceConnection.data);
PATCH /v2/mobile_voice_connections/{id}
const mobileVoiceConnection = await client.mobileVoiceConnections.update('id');
console.log(mobileVoiceConnection.data);
DELETE /v2/mobile_voice_connections/{id}
const mobileVoiceConnection = await client.mobileVoiceConnections.delete('id');
console.log(mobileVoiceConnection.data);
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.