telnyx-sip-java

📁 team-telnyx/telnyx-ext-agent-skills 📅 Today
3
总安装量
1
周安装量
#54975
全站排名
安装命令
npx skills add https://github.com/team-telnyx/telnyx-ext-agent-skills --skill telnyx-sip-java

Agent 安装分布

windsurf 1
amp 1
opencode 1
cursor 1
kimi-cli 1
kiro-cli 1

Skill 文档

Telnyx Sip – Java

Installation

// See https://github.com/team-telnyx/telnyx-java for Maven/Gradle setup

Setup

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

TelnyxClient client = TelnyxOkHttpClient.fromEnv();

All examples below assume client is already initialized as shown above.

Get all outbound voice profiles

Get all outbound voice profiles belonging to the user that match the given filters.

GET /outbound_voice_profiles

import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileListPage;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileListParams;

OutboundVoiceProfileListPage page = client.outboundVoiceProfiles().list();

Create an outbound voice profile

Create an outbound voice profile.

POST /outbound_voice_profiles — Required: name

Optional: billing_group_id (uuid), call_recording (object), calling_window (object), concurrent_call_limit ([‘integer’, ‘null’]), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), max_destination_rate (number), service_plan (enum), tags (array[string]), traffic_type (enum), usage_payment_method (enum), whitelisted_destinations (array[string])

import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileCreateParams;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileCreateResponse;

OutboundVoiceProfileCreateParams params = OutboundVoiceProfileCreateParams.builder()
    .name("office")
    .build();
OutboundVoiceProfileCreateResponse outboundVoiceProfile = client.outboundVoiceProfiles().create(params);

Retrieve an outbound voice profile

Retrieves the details of an existing outbound voice profile.

GET /outbound_voice_profiles/{id}

import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileRetrieveParams;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileRetrieveResponse;

OutboundVoiceProfileRetrieveResponse outboundVoiceProfile = client.outboundVoiceProfiles().retrieve("1293384261075731499");

Updates an existing outbound voice profile.

PATCH /outbound_voice_profiles/{id} — Required: name

Optional: billing_group_id (uuid), call_recording (object), calling_window (object), concurrent_call_limit ([‘integer’, ‘null’]), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), max_destination_rate (number), service_plan (enum), tags (array[string]), traffic_type (enum), usage_payment_method (enum), whitelisted_destinations (array[string])

import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileUpdateParams;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileUpdateResponse;

OutboundVoiceProfileUpdateParams params = OutboundVoiceProfileUpdateParams.builder()
    .id("1293384261075731499")
    .name("office")
    .build();
OutboundVoiceProfileUpdateResponse outboundVoiceProfile = client.outboundVoiceProfiles().update(params);

Delete an outbound voice profile

Deletes an existing outbound voice profile.

DELETE /outbound_voice_profiles/{id}

import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileDeleteParams;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileDeleteResponse;

OutboundVoiceProfileDeleteResponse outboundVoiceProfile = client.outboundVoiceProfiles().delete("1293384261075731499");

List connections

Returns a list of your connections irrespective of type.

GET /connections

import com.telnyx.sdk.models.connections.ConnectionListPage;
import com.telnyx.sdk.models.connections.ConnectionListParams;

ConnectionListPage page = client.connections().list();

Retrieve a connection

Retrieves the high-level details of an existing connection.

GET /connections/{id}

import com.telnyx.sdk.models.connections.ConnectionRetrieveParams;
import com.telnyx.sdk.models.connections.ConnectionRetrieveResponse;

ConnectionRetrieveResponse connection = client.connections().retrieve("id");

List credential connections

Returns a list of your credential connections.

GET /credential_connections

import com.telnyx.sdk.models.credentialconnections.CredentialConnectionListPage;
import com.telnyx.sdk.models.credentialconnections.CredentialConnectionListParams;

CredentialConnectionListPage page = client.credentialConnections().list();

Create a credential connection

Creates a credential connection.

POST /credential_connections — Required: user_name, password, connection_name

Optional: active (boolean), anchorsite_override (enum), android_push_credential_id ([‘string’, ‘null’]), call_cost_in_webhooks (boolean), default_on_hold_comfort_noise_enabled (boolean), dtmf_type (enum), encode_contact_header_enabled (boolean), encrypted_media (enum), inbound (object), ios_push_credential_id ([‘string’, ‘null’]), jitter_buffer (object), noise_suppression (enum), noise_suppression_details (object), onnet_t38_passthrough_enabled (boolean), outbound (object), rtcp_settings (object), sip_uri_calling_preference (enum), tags (array[string]), webhook_api_version (enum), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.credentialconnections.CredentialConnectionCreateParams;
import com.telnyx.sdk.models.credentialconnections.CredentialConnectionCreateResponse;

CredentialConnectionCreateParams params = CredentialConnectionCreateParams.builder()
    .connectionName("my name")
    .password("my123secure456password789")
    .userName("myusername123")
    .build();
CredentialConnectionCreateResponse credentialConnection = client.credentialConnections().create(params);

Retrieve a credential connection

Retrieves the details of an existing credential connection.

GET /credential_connections/{id}

import com.telnyx.sdk.models.credentialconnections.CredentialConnectionRetrieveParams;
import com.telnyx.sdk.models.credentialconnections.CredentialConnectionRetrieveResponse;

CredentialConnectionRetrieveResponse credentialConnection = client.credentialConnections().retrieve("id");

Update a credential connection

Updates settings of an existing credential connection.

PATCH /credential_connections/{id}

Optional: active (boolean), anchorsite_override (enum), android_push_credential_id ([‘string’, ‘null’]), call_cost_in_webhooks (boolean), connection_name (string), default_on_hold_comfort_noise_enabled (boolean), dtmf_type (enum), encode_contact_header_enabled (boolean), encrypted_media (enum), inbound (object), ios_push_credential_id ([‘string’, ‘null’]), jitter_buffer (object), noise_suppression (enum), noise_suppression_details (object), onnet_t38_passthrough_enabled (boolean), outbound (object), password (string), rtcp_settings (object), sip_uri_calling_preference (enum), tags (array[string]), user_name (string), webhook_api_version (enum), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.credentialconnections.CredentialConnectionUpdateParams;
import com.telnyx.sdk.models.credentialconnections.CredentialConnectionUpdateResponse;

CredentialConnectionUpdateResponse credentialConnection = client.credentialConnections().update("id");

Delete a credential connection

Deletes an existing credential connection.

DELETE /credential_connections/{id}

import com.telnyx.sdk.models.credentialconnections.CredentialConnectionDeleteParams;
import com.telnyx.sdk.models.credentialconnections.CredentialConnectionDeleteResponse;

CredentialConnectionDeleteResponse credentialConnection = client.credentialConnections().delete("id");

Check a Credential Connection Registration Status

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

import com.telnyx.sdk.models.credentialconnections.actions.ActionCheckRegistrationStatusParams;
import com.telnyx.sdk.models.credentialconnections.actions.ActionCheckRegistrationStatusResponse;

ActionCheckRegistrationStatusResponse response = client.credentialConnections().actions().checkRegistrationStatus("id");

List Ips

Get all IPs belonging to the user that match the given filters.

GET /ips

import com.telnyx.sdk.models.ips.IpListPage;
import com.telnyx.sdk.models.ips.IpListParams;

IpListPage page = client.ips().list();

Create an Ip

Create a new IP object.

POST /ips — Required: ip_address

Optional: connection_id (string), port (integer)

import com.telnyx.sdk.models.ips.IpCreateParams;
import com.telnyx.sdk.models.ips.IpCreateResponse;

IpCreateParams params = IpCreateParams.builder()
    .ipAddress("192.168.0.0")
    .build();
IpCreateResponse ip = client.ips().create(params);

Retrieve an Ip

Return the details regarding a specific IP.

GET /ips/{id}

import com.telnyx.sdk.models.ips.IpRetrieveParams;
import com.telnyx.sdk.models.ips.IpRetrieveResponse;

IpRetrieveResponse ip = client.ips().retrieve("6a09cdc3-8948-47f0-aa62-74ac943d6c58");

Update an Ip

Update the details of a specific IP.

PATCH /ips/{id} — Required: ip_address

Optional: connection_id (string), port (integer)

import com.telnyx.sdk.models.ips.IpUpdateParams;
import com.telnyx.sdk.models.ips.IpUpdateResponse;

IpUpdateParams params = IpUpdateParams.builder()
    .id("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .ipAddress("192.168.0.0")
    .build();
IpUpdateResponse ip = client.ips().update(params);

Delete an Ip

Delete an IP.

DELETE /ips/{id}

import com.telnyx.sdk.models.ips.IpDeleteParams;
import com.telnyx.sdk.models.ips.IpDeleteResponse;

IpDeleteResponse ip = client.ips().delete("6a09cdc3-8948-47f0-aa62-74ac943d6c58");

List Ip connections

Returns a list of your IP connections.

GET /ip_connections

import com.telnyx.sdk.models.ipconnections.IpConnectionListPage;
import com.telnyx.sdk.models.ipconnections.IpConnectionListParams;

IpConnectionListPage page = client.ipConnections().list();

Create an Ip connection

Creates an IP connection.

POST /ip_connections

Optional: active (boolean), anchorsite_override (enum), android_push_credential_id ([‘string’, ‘null’]), call_cost_in_webhooks (boolean), connection_name (string), default_on_hold_comfort_noise_enabled (boolean), dtmf_type (enum), encode_contact_header_enabled (boolean), encrypted_media (enum), inbound (object), ios_push_credential_id ([‘string’, ‘null’]), jitter_buffer (object), noise_suppression (enum), noise_suppression_details (object), onnet_t38_passthrough_enabled (boolean), outbound (object), rtcp_settings (object), tags (array[string]), transport_protocol (enum), webhook_api_version (enum), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.ipconnections.IpConnectionCreateParams;
import com.telnyx.sdk.models.ipconnections.IpConnectionCreateResponse;

IpConnectionCreateResponse ipConnection = client.ipConnections().create();

Retrieve an Ip connection

Retrieves the details of an existing ip connection.

GET /ip_connections/{id}

import com.telnyx.sdk.models.ipconnections.IpConnectionRetrieveParams;
import com.telnyx.sdk.models.ipconnections.IpConnectionRetrieveResponse;

IpConnectionRetrieveResponse ipConnection = client.ipConnections().retrieve("id");

Update an Ip connection

Updates settings of an existing IP connection.

PATCH /ip_connections/{id}

Optional: active (boolean), anchorsite_override (enum), android_push_credential_id ([‘string’, ‘null’]), call_cost_in_webhooks (boolean), connection_name (string), default_on_hold_comfort_noise_enabled (boolean), dtmf_type (enum), encode_contact_header_enabled (boolean), encrypted_media (enum), inbound (object), ios_push_credential_id ([‘string’, ‘null’]), jitter_buffer (object), noise_suppression (enum), noise_suppression_details (object), onnet_t38_passthrough_enabled (boolean), outbound (object), rtcp_settings (object), tags (array[string]), transport_protocol (enum), webhook_api_version (enum), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.ipconnections.IpConnectionUpdateParams;
import com.telnyx.sdk.models.ipconnections.IpConnectionUpdateResponse;

IpConnectionUpdateResponse ipConnection = client.ipConnections().update("id");

Delete an Ip connection

Deletes an existing IP connection.

DELETE /ip_connections/{id}

import com.telnyx.sdk.models.ipconnections.IpConnectionDeleteParams;
import com.telnyx.sdk.models.ipconnections.IpConnectionDeleteResponse;

IpConnectionDeleteResponse ipConnection = client.ipConnections().delete("id");

List FQDNs

Get all FQDNs belonging to the user that match the given filters.

GET /fqdns

import com.telnyx.sdk.models.fqdns.FqdnListPage;
import com.telnyx.sdk.models.fqdns.FqdnListParams;

FqdnListPage page = client.fqdns().list();

Create an FQDN

Create a new FQDN object.

POST /fqdns — Required: fqdn, dns_record_type, connection_id

Optional: port ([‘integer’, ‘null’])

import com.telnyx.sdk.models.fqdns.FqdnCreateParams;
import com.telnyx.sdk.models.fqdns.FqdnCreateResponse;

FqdnCreateParams params = FqdnCreateParams.builder()
    .connectionId("1516447646313612565")
    .dnsRecordType("a")
    .fqdn("example.com")
    .build();
FqdnCreateResponse fqdn = client.fqdns().create(params);

Retrieve an FQDN

Return the details regarding a specific FQDN.

GET /fqdns/{id}

import com.telnyx.sdk.models.fqdns.FqdnRetrieveParams;
import com.telnyx.sdk.models.fqdns.FqdnRetrieveResponse;

FqdnRetrieveResponse fqdn = client.fqdns().retrieve("1517907029795014409");

Update an FQDN

Update the details of a specific FQDN.

PATCH /fqdns/{id}

Optional: connection_id (string), dns_record_type (string), fqdn (string), port ([‘integer’, ‘null’])

import com.telnyx.sdk.models.fqdns.FqdnUpdateParams;
import com.telnyx.sdk.models.fqdns.FqdnUpdateResponse;

FqdnUpdateResponse fqdn = client.fqdns().update("1517907029795014409");

Delete an FQDN

Delete an FQDN.

DELETE /fqdns/{id}

import com.telnyx.sdk.models.fqdns.FqdnDeleteParams;
import com.telnyx.sdk.models.fqdns.FqdnDeleteResponse;

FqdnDeleteResponse fqdn = client.fqdns().delete("1517907029795014409");

List FQDN connections

Returns a list of your FQDN connections.

GET /fqdn_connections

import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionListPage;
import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionListParams;

FqdnConnectionListPage page = client.fqdnConnections().list();

Create an FQDN connection

Creates a FQDN connection.

POST /fqdn_connections — Required: connection_name

Optional: active (boolean), anchorsite_override (enum), android_push_credential_id ([‘string’, ‘null’]), call_cost_in_webhooks (boolean), default_on_hold_comfort_noise_enabled (boolean), dtmf_type (enum), encode_contact_header_enabled (boolean), encrypted_media (enum), inbound (object), ios_push_credential_id ([‘string’, ‘null’]), jitter_buffer (object), microsoft_teams_sbc (boolean), noise_suppression (enum), noise_suppression_details (object), onnet_t38_passthrough_enabled (boolean), outbound (object), rtcp_settings (object), tags (array[string]), transport_protocol (enum), webhook_api_version (enum), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionCreateParams;
import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionCreateResponse;

FqdnConnectionCreateParams params = FqdnConnectionCreateParams.builder()
    .connectionName("string")
    .build();
FqdnConnectionCreateResponse fqdnConnection = client.fqdnConnections().create(params);

Retrieve an FQDN connection

Retrieves the details of an existing FQDN connection.

GET /fqdn_connections/{id}

import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionRetrieveParams;
import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionRetrieveResponse;

FqdnConnectionRetrieveResponse fqdnConnection = client.fqdnConnections().retrieve("1293384261075731499");

Update an FQDN connection

Updates settings of an existing FQDN connection.

PATCH /fqdn_connections/{id}

Optional: active (boolean), anchorsite_override (enum), android_push_credential_id ([‘string’, ‘null’]), call_cost_in_webhooks (boolean), connection_name (string), default_on_hold_comfort_noise_enabled (boolean), dtmf_type (enum), encode_contact_header_enabled (boolean), encrypted_media (enum), inbound (object), ios_push_credential_id ([‘string’, ‘null’]), jitter_buffer (object), noise_suppression (enum), noise_suppression_details (object), onnet_t38_passthrough_enabled (boolean), outbound (object), rtcp_settings (object), tags (array[string]), transport_protocol (enum), webhook_api_version (enum), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionUpdateParams;
import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionUpdateResponse;

FqdnConnectionUpdateResponse fqdnConnection = client.fqdnConnections().update("1293384261075731499");

Delete an FQDN connection

Deletes an FQDN connection.

DELETE /fqdn_connections/{id}

import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionDeleteParams;
import com.telnyx.sdk.models.fqdnconnections.FqdnConnectionDeleteResponse;

FqdnConnectionDeleteResponse fqdnConnection = client.fqdnConnections().delete("1293384261075731499");

List Mobile Voice Connections

GET /v2/mobile_voice_connections

import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionListPage;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionListParams;

MobileVoiceConnectionListPage page = client.mobileVoiceConnections().list();

Create a Mobile Voice Connection

POST /v2/mobile_voice_connections

Optional: active (boolean), connection_name (string), inbound (object), outbound (object), tags (array[string]), webhook_api_version (enum), webhook_event_failover_url ([‘string’, ‘null’]), webhook_event_url ([‘string’, ‘null’]), webhook_timeout_secs ([‘integer’, ‘null’])

import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionCreateParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionCreateResponse;

MobileVoiceConnectionCreateResponse mobileVoiceConnection = client.mobileVoiceConnections().create();

Retrieve a Mobile Voice Connection

GET /v2/mobile_voice_connections/{id}

import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionRetrieveParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionRetrieveResponse;

MobileVoiceConnectionRetrieveResponse mobileVoiceConnection = client.mobileVoiceConnections().retrieve("id");

Update a Mobile Voice Connection

PATCH /v2/mobile_voice_connections/{id}

Optional: active (boolean), connection_name (string), inbound (object), outbound (object), tags (array[string]), webhook_api_version (enum), webhook_event_failover_url ([‘string’, ‘null’]), webhook_event_url ([‘string’, ‘null’]), webhook_timeout_secs (integer)

import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateResponse;

MobileVoiceConnectionUpdateResponse mobileVoiceConnection = client.mobileVoiceConnections().update("id");

Delete a Mobile Voice Connection

DELETE /v2/mobile_voice_connections/{id}

import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionDeleteParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionDeleteResponse;

MobileVoiceConnectionDeleteResponse mobileVoiceConnection = client.mobileVoiceConnections().delete("id");