telnyx-sip-go

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- 由Telnyx OpenAPI规范自动生成,请勿编辑。 -->

Telnyx Sip - Go

Telnyx Sip - Go

Installation

安装

bash
go get github.com/team-telnyx/telnyx-go
bash
go get github.com/team-telnyx/telnyx-go

Setup

初始化配置

go
import (
  "context"
  "fmt"
  "os"

  "github.com/team-telnyx/telnyx-go"
  "github.com/team-telnyx/telnyx-go/option"
)

client := telnyx.NewClient(
  option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)
All examples below assume
client
is already initialized as shown above.
go
import (
  "context"
  "fmt"
  "os"

  "github.com/team-telnyx/telnyx-go"
  "github.com/team-telnyx/telnyx-go/option"
)

client := telnyx.NewClient(
  option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)
以下所有示例均假设
client
已按照上述方式完成初始化。

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:
go
import "errors"

result, err := client.Messages.Send(ctx, params)
if err != nil {
  var apiErr *telnyx.Error
  if errors.As(err, &apiErr) {
    switch apiErr.StatusCode {
    case 422:
      fmt.Println("Validation error — check required fields and formats")
    case 429:
      // Rate limited — wait and retry with exponential backoff
      fmt.Println("Rate limited, retrying...")
    default:
      fmt.Printf("API error %d: %s\n", apiErr.StatusCode, apiErr.Error())
    }
  } else {
    fmt.Println("Network error — check connectivity and retry")
  }
}
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).
所有API调用都可能因网络错误、限流(429)、校验错误(422)或认证错误(401)而失败,生产环境代码中请务必处理错误:
go
import "errors"

result, err := client.Messages.Send(ctx, params)
if err != nil {
  var apiErr *telnyx.Error
  if errors.As(err, &apiErr) {
    switch apiErr.StatusCode {
    case 422:
      fmt.Println("校验错误 — 请检查必填字段和格式")
    case 429:
      // 触发限流 — 等待后使用指数退避策略重试
      fmt.Println("触发限流,重试中...")
    default:
      fmt.Printf("API错误 %d: %s\n", apiErr.StatusCode, apiErr.Error())
    }
  } else {
    fmt.Println("网络错误 — 请检查网络连接后重试")
  }
}
常见错误码:
401
无效API密钥、
403
权限不足、
404
资源不存在、
422
校验错误(请检查字段格式)、
429
触发限流(请使用指数退避策略重试)。

Important Notes

重要说明

  • Pagination: Use
    ListAutoPaging()
    for automatic iteration:
    iter := client.Resource.ListAutoPaging(ctx, params); for iter.Next() { item := iter.Current() }
    .
  • 分页: 使用
    ListAutoPaging()
    实现自动遍历:
    iter := client.Resource.ListAutoPaging(ctx, params); for iter.Next() { item := iter.Current() }
    .

List all Access IP Ranges

列出所有访问IP段

GET /access_ip_ranges
go
	page, err := client.AccessIPRanges.List(context.Background(), telnyx.AccessIPRangeListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
cidr_block
(string),
created_at
(date-time),
description
(string),
id
(string),
status
(enum: pending, added),
updated_at
(date-time),
user_id
(string)
GET /access_ip_ranges
go
	page, err := client.AccessIPRanges.List(context.Background(), telnyx.AccessIPRangeListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
cidr_block
(字符串)、
created_at
(日期时间)、
description
(字符串)、
id
(字符串)、
status
(枚举值:pending待处理、added已添加)、
updated_at
(日期时间)、
user_id
(字符串)

Create new Access IP Range

创建新的访问IP段

POST /access_ip_ranges
— Required:
cidr_block
Optional:
description
(string)
go
	accessIPRange, err := client.AccessIPRanges.New(context.Background(), telnyx.AccessIPRangeNewParams{
		CidrBlock: "203.0.113.0/24",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", accessIPRange.ID)
Returns:
cidr_block
(string),
created_at
(date-time),
description
(string),
id
(string),
status
(enum: pending, added),
updated_at
(date-time),
user_id
(string)
POST /access_ip_ranges
— 必填参数:
cidr_block
可选参数:
description
(字符串)
go
	accessIPRange, err := client.AccessIPRanges.New(context.Background(), telnyx.AccessIPRangeNewParams{
		CidrBlock: "203.0.113.0/24",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", accessIPRange.ID)
返回值:
cidr_block
(字符串)、
created_at
(日期时间)、
description
(字符串)、
id
(字符串)、
status
(枚举值:pending待处理、added已添加)、
updated_at
(日期时间)、
user_id
(字符串)

Delete access IP ranges

删除访问IP段

DELETE /access_ip_ranges/{access_ip_range_id}
go
	accessIPRange, err := client.AccessIPRanges.Delete(context.Background(), "access_ip_range_id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", accessIPRange.ID)
Returns:
cidr_block
(string),
created_at
(date-time),
description
(string),
id
(string),
status
(enum: pending, added),
updated_at
(date-time),
user_id
(string)
DELETE /access_ip_ranges/{access_ip_range_id}
go
	accessIPRange, err := client.AccessIPRanges.Delete(context.Background(), "access_ip_range_id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", accessIPRange.ID)
返回值:
cidr_block
(字符串)、
created_at
(日期时间)、
description
(字符串)、
id
(字符串)、
status
(枚举值:pending待处理、added已添加)、
updated_at
(日期时间)、
user_id
(字符串)

List connections

列出连接

Returns a list of your connections irrespective of type.
GET /connections
go
	page, err := client.Connections.List(context.Background(), telnyx.ConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
connection_name
(string),
created_at
(string),
id
(string),
outbound_voice_profile_id
(string),
record_type
(string),
tags
(array[string]),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri)
返回你所有类型的连接列表。
GET /connections
go
	page, err := client.Connections.List(context.Background(), telnyx.ConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
connection_name
(字符串)、
created_at
(字符串)、
id
(字符串)、
outbound_voice_profile_id
(字符串)、
record_type
(字符串)、
tags
(字符串数组)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)

Retrieve a connection

获取连接详情

Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type.
GET /connections/{id}
go
	connection, err := client.Connections.Get(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", connection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
connection_name
(string),
created_at
(string),
id
(string),
outbound_voice_profile_id
(string),
record_type
(string),
tags
(array[string]),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri)
获取现有连接的概览信息。如需获取特定的认证信息,请使用对应连接类型的端点。
GET /connections/{id}
go
	connection, err := client.Connections.Get(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", connection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
connection_name
(字符串)、
created_at
(字符串)、
id
(字符串)、
outbound_voice_profile_id
(字符串)、
record_type
(字符串)、
tags
(字符串数组)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)

List credential connections

列出凭证连接

Returns a list of your credential connections.
GET /credential_connections
go
	page, err := client.CredentialConnections.List(context.Background(), telnyx.CredentialConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
返回你的凭证连接列表。
GET /credential_connections
go
	page, err := client.CredentialConnections.List(context.Background(), telnyx.CredentialConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Create a credential connection

创建凭证连接

Creates a credential connection.
POST /credential_connections
— Required:
user_name
,
password
,
connection_name
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
webhook_api_version
(enum: 1, 2, texml),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
go
	credentialConnection, err := client.CredentialConnections.New(context.Background(), telnyx.CredentialConnectionNewParams{
		ConnectionName: "my name",
		Password:       "my123secure456password789",
		UserName:       "myusername123",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
创建一个凭证连接。
POST /credential_connections
— 必填参数:
user_name
password
connection_name
可选参数:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
webhook_api_version
(枚举值:1, 2, texml)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)
go
	credentialConnection, err := client.CredentialConnections.New(context.Background(), telnyx.CredentialConnectionNewParams{
		ConnectionName: "my name",
		Password:       "my123secure456password789",
		UserName:       "myusername123",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Retrieve a credential connection

获取凭证连接详情

Retrieves the details of an existing credential connection.
GET /credential_connections/{id}
go
	credentialConnection, err := client.CredentialConnections.Get(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
获取现有凭证连接的详细信息。
GET /credential_connections/{id}
go
	credentialConnection, err := client.CredentialConnections.Get(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Update a credential connection

更新凭证连接

Updates settings of an existing credential connection.
PATCH /credential_connections/{id}
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
go
	credentialConnection, err := client.CredentialConnections.Update(
		context.Background(),
		"id",
		telnyx.CredentialConnectionUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
更新现有凭证连接的配置。
PATCH /credential_connections/{id}
可选参数:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)
go
	credentialConnection, err := client.CredentialConnections.Update(
		context.Background(),
		"id",
		telnyx.CredentialConnectionUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Delete a credential connection

删除凭证连接

Deletes an existing credential connection.
DELETE /credential_connections/{id}
go
	credentialConnection, err := client.CredentialConnections.Delete(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
sip_uri_calling_preference
(enum: disabled, unrestricted, internal),
tags
(array[string]),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
删除现有凭证连接。
DELETE /credential_connections/{id}
go
	credentialConnection, err := client.CredentialConnections.Delete(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", credentialConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
sip_uri_calling_preference
(枚举值:disabled禁用、unrestricted不受限、internal内部)、
tags
(字符串数组)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

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
go
	response, err := client.CredentialConnections.Actions.CheckRegistrationStatus(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)
Returns:
ip_address
(string),
last_registration
(string),
port
(integer),
record_type
(string),
sip_username
(string),
status
(enum: Not Applicable, Not Registered, Failed, Expired, Registered, Unregistered),
transport
(string),
user_agent
(string)
检查凭证连接的
registration_status
(注册状态)以及最近一次SIP注册事件的时间戳
registration_status_updated_at
POST /credential_connections/{id}/actions/check_registration_status
go
	response, err := client.CredentialConnections.Actions.CheckRegistrationStatus(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)
返回值:
ip_address
(字符串)、
last_registration
(字符串)、
port
(整数)、
record_type
(字符串)、
sip_username
(字符串)、
status
(枚举值:Not Applicable不适用、Not Registered未注册、Failed失败、Expired已过期、Registered已注册、Unregistered已注销)、
transport
(字符串)、
user_agent
(字符串)

List FQDN connections

列出FQDN连接

Returns a list of your FQDN connections.
GET /fqdn_connections
go
	page, err := client.FqdnConnections.List(context.Background(), telnyx.FqdnConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
active
(boolean),
adjust_dtmf_timestamp
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_enabled
(boolean),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
ignore_dtmf_duration
(boolean),
ignore_mark_bit
(boolean),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
microsoft_teams_sbc
(boolean),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
rtp_pass_codecs_on_stream_change
(boolean),
send_normalized_timestamps
(boolean),
tags
(array[string]),
third_party_control_enabled
(boolean),
transport_protocol
(enum: UDP, TCP, TLS),
txt_name
(string),
txt_ttl
(integer),
txt_value
(string),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
返回你的FQDN连接列表。
GET /fqdn_connections
go
	page, err := client.FqdnConnections.List(context.Background(), telnyx.FqdnConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
active
(布尔值)、
adjust_dtmf_timestamp
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_enabled
(布尔值)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
ignore_dtmf_duration
(布尔值)、
ignore_mark_bit
(布尔值)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
microsoft_teams_sbc
(布尔值)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
rtp_pass_codecs_on_stream_change
(布尔值)、
send_normalized_timestamps
(布尔值)、
tags
(字符串数组)、
third_party_control_enabled
(布尔值)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
txt_name
(字符串)、
txt_ttl
(整数)、
txt_value
(字符串)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Create an FQDN connection

创建FQDN连接

Creates a FQDN connection.
POST /fqdn_connections
— Required:
connection_name
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
microsoft_teams_sbc
(boolean),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
go
	fqdnConnection, err := client.FqdnConnections.New(context.Background(), telnyx.FqdnConnectionNewParams{
		ConnectionName: "my-resource",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
Returns:
active
(boolean),
adjust_dtmf_timestamp
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_enabled
(boolean),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
ignore_dtmf_duration
(boolean),
ignore_mark_bit
(boolean),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
microsoft_teams_sbc
(boolean),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
rtp_pass_codecs_on_stream_change
(boolean),
send_normalized_timestamps
(boolean),
tags
(array[string]),
third_party_control_enabled
(boolean),
transport_protocol
(enum: UDP, TCP, TLS),
txt_name
(string),
txt_ttl
(integer),
txt_value
(string),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
创建一个FQDN连接。
POST /fqdn_connections
— 必填参数:
connection_name
可选参数:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
microsoft_teams_sbc
(布尔值)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)
go
	fqdnConnection, err := client.FqdnConnections.New(context.Background(), telnyx.FqdnConnectionNewParams{
		ConnectionName: "my-resource",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
返回值:
active
(布尔值)、
adjust_dtmf_timestamp
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_enabled
(布尔值)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
ignore_dtmf_duration
(布尔值)、
ignore_mark_bit
(布尔值)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
microsoft_teams_sbc
(布尔值)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
rtp_pass_codecs_on_stream_change
(布尔值)、
send_normalized_timestamps
(布尔值)、
tags
(字符串数组)、
third_party_control_enabled
(布尔值)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
txt_name
(字符串)、
txt_ttl
(整数)、
txt_value
(字符串)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Retrieve an FQDN connection

获取FQDN连接详情

Retrieves the details of an existing FQDN connection.
GET /fqdn_connections/{id}
go
	fqdnConnection, err := client.FqdnConnections.Get(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
Returns:
active
(boolean),
adjust_dtmf_timestamp
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_enabled
(boolean),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
ignore_dtmf_duration
(boolean),
ignore_mark_bit
(boolean),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
microsoft_teams_sbc
(boolean),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
rtp_pass_codecs_on_stream_change
(boolean),
send_normalized_timestamps
(boolean),
tags
(array[string]),
third_party_control_enabled
(boolean),
transport_protocol
(enum: UDP, TCP, TLS),
txt_name
(string),
txt_ttl
(integer),
txt_value
(string),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
获取现有FQDN连接的详细信息。
GET /fqdn_connections/{id}
go
	fqdnConnection, err := client.FqdnConnections.Get(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
返回值:
active
(布尔值)、
adjust_dtmf_timestamp
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_enabled
(布尔值)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
ignore_dtmf_duration
(布尔值)、
ignore_mark_bit
(布尔值)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
microsoft_teams_sbc
(布尔值)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
rtp_pass_codecs_on_stream_change
(布尔值)、
send_normalized_timestamps
(布尔值)、
tags
(字符串数组)、
third_party_control_enabled
(布尔值)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
txt_name
(字符串)、
txt_ttl
(整数)、
txt_value
(字符串)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Update an FQDN connection

更新FQDN连接

Updates settings of an existing FQDN connection.
PATCH /fqdn_connections/{id}
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
go
	fqdnConnection, err := client.FqdnConnections.Update(
		context.Background(),
		"1293384261075731499",
		telnyx.FqdnConnectionUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
Returns:
active
(boolean),
adjust_dtmf_timestamp
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_enabled
(boolean),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
ignore_dtmf_duration
(boolean),
ignore_mark_bit
(boolean),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
microsoft_teams_sbc
(boolean),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
rtp_pass_codecs_on_stream_change
(boolean),
send_normalized_timestamps
(boolean),
tags
(array[string]),
third_party_control_enabled
(boolean),
transport_protocol
(enum: UDP, TCP, TLS),
txt_name
(string),
txt_ttl
(integer),
txt_value
(string),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
更新现有FQDN连接的配置。
PATCH /fqdn_connections/{id}
可选参数:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)
go
	fqdnConnection, err := client.FqdnConnections.Update(
		context.Background(),
		"1293384261075731499",
		telnyx.FqdnConnectionUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
返回值:
active
(布尔值)、
adjust_dtmf_timestamp
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_enabled
(布尔值)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
ignore_dtmf_duration
(布尔值)、
ignore_mark_bit
(布尔值)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
microsoft_teams_sbc
(布尔值)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
rtp_pass_codecs_on_stream_change
(布尔值)、
send_normalized_timestamps
(布尔值)、
tags
(字符串数组)、
third_party_control_enabled
(布尔值)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
txt_name
(字符串)、
txt_ttl
(整数)、
txt_value
(字符串)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Delete an FQDN connection

删除FQDN连接

Deletes an FQDN connection.
DELETE /fqdn_connections/{id}
go
	fqdnConnection, err := client.FqdnConnections.Delete(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
Returns:
active
(boolean),
adjust_dtmf_timestamp
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_enabled
(boolean),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
ignore_dtmf_duration
(boolean),
ignore_mark_bit
(boolean),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
microsoft_teams_sbc
(boolean),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
password
(string),
record_type
(string),
rtcp_settings
(object),
rtp_pass_codecs_on_stream_change
(boolean),
send_normalized_timestamps
(boolean),
tags
(array[string]),
third_party_control_enabled
(boolean),
transport_protocol
(enum: UDP, TCP, TLS),
txt_name
(string),
txt_ttl
(integer),
txt_value
(string),
updated_at
(string),
user_name
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
删除一个FQDN连接。
DELETE /fqdn_connections/{id}
go
	fqdnConnection, err := client.FqdnConnections.Delete(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdnConnection.Data)
返回值:
active
(布尔值)、
adjust_dtmf_timestamp
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_enabled
(布尔值)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
ignore_dtmf_duration
(布尔值)、
ignore_mark_bit
(布尔值)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
microsoft_teams_sbc
(布尔值)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
password
(字符串)、
record_type
(字符串)、
rtcp_settings
(对象)、
rtp_pass_codecs_on_stream_change
(布尔值)、
send_normalized_timestamps
(布尔值)、
tags
(字符串数组)、
third_party_control_enabled
(布尔值)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
txt_name
(字符串)、
txt_ttl
(整数)、
txt_value
(字符串)、
updated_at
(字符串)、
user_name
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

List FQDNs

列出FQDN

Get all FQDNs belonging to the user that match the given filters.
GET /fqdns
go
	page, err := client.Fqdns.List(context.Background(), telnyx.FqdnListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
connection_id
(string),
created_at
(string),
dns_record_type
(string),
fqdn
(string),
id
(string),
port
(integer),
record_type
(string),
updated_at
(string)
获取当前用户下符合筛选条件的所有FQDN。
GET /fqdns
go
	page, err := client.Fqdns.List(context.Background(), telnyx.FqdnListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
dns_record_type
(字符串)、
fqdn
(字符串)、
id
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Create an FQDN

创建FQDN

Create a new FQDN object.
POST /fqdns
— Required:
fqdn
,
dns_record_type
,
connection_id
Optional:
port
(integer | null)
go
	fqdn, err := client.Fqdns.New(context.Background(), telnyx.FqdnNewParams{
		ConnectionID:  "1516447646313612565",
		DNSRecordType: "a",
		Fqdn:          "example.com",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
Returns:
connection_id
(string),
created_at
(string),
dns_record_type
(string),
fqdn
(string),
id
(string),
port
(integer),
record_type
(string),
updated_at
(string)
创建一个新的FQDN对象。
POST /fqdns
— 必填参数:
fqdn
dns_record_type
connection_id
可选参数:
port
(整数 | 空)
go
	fqdn, err := client.Fqdns.New(context.Background(), telnyx.FqdnNewParams{
		ConnectionID:  "1516447646313612565",
		DNSRecordType: "a",
		Fqdn:          "example.com",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
dns_record_type
(字符串)、
fqdn
(字符串)、
id
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Retrieve an FQDN

获取FQDN详情

Return the details regarding a specific FQDN.
GET /fqdns/{id}
go
	fqdn, err := client.Fqdns.Get(context.Background(), "1517907029795014409")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
Returns:
connection_id
(string),
created_at
(string),
dns_record_type
(string),
fqdn
(string),
id
(string),
port
(integer),
record_type
(string),
updated_at
(string)
返回指定FQDN的详细信息。
GET /fqdns/{id}
go
	fqdn, err := client.Fqdns.Get(context.Background(), "1517907029795014409")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
dns_record_type
(字符串)、
fqdn
(字符串)、
id
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Update an FQDN

更新FQDN

Update the details of a specific FQDN.
PATCH /fqdns/{id}
Optional:
connection_id
(string),
dns_record_type
(string),
fqdn
(string),
port
(integer | null)
go
	fqdn, err := client.Fqdns.Update(
		context.Background(),
		"1517907029795014409",
		telnyx.FqdnUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
Returns:
connection_id
(string),
created_at
(string),
dns_record_type
(string),
fqdn
(string),
id
(string),
port
(integer),
record_type
(string),
updated_at
(string)
更新指定FQDN的详细信息。
PATCH /fqdns/{id}
可选参数:
connection_id
(字符串)、
dns_record_type
(字符串)、
fqdn
(字符串)、
port
(整数 | 空)
go
	fqdn, err := client.Fqdns.Update(
		context.Background(),
		"1517907029795014409",
		telnyx.FqdnUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
dns_record_type
(字符串)、
fqdn
(字符串)、
id
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Delete an FQDN

删除FQDN

Delete an FQDN.
DELETE /fqdns/{id}
go
	fqdn, err := client.Fqdns.Delete(context.Background(), "1517907029795014409")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
Returns:
connection_id
(string),
created_at
(string),
dns_record_type
(string),
fqdn
(string),
id
(string),
port
(integer),
record_type
(string),
updated_at
(string)
删除一个FQDN。
DELETE /fqdns/{id}
go
	fqdn, err := client.Fqdns.Delete(context.Background(), "1517907029795014409")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", fqdn.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
dns_record_type
(字符串)、
fqdn
(字符串)、
id
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

List Ip connections

列出IP连接

Returns a list of your IP connections.
GET /ip_connections
go
	page, err := client.IPConnections.List(context.Background(), telnyx.IPConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
record_type
(string),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
返回你的IP连接列表。
GET /ip_connections
go
	page, err := client.IPConnections.List(context.Background(), telnyx.IPConnectionListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
record_type
(字符串)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Create an Ip connection

创建IP连接

Creates an IP connection.
POST /ip_connections
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
go
	ipConnection, err := client.IPConnections.New(context.Background(), telnyx.IPConnectionNewParams{
		ConnectionName: "my-ip-connection",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
record_type
(string),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
创建一个IP连接。
POST /ip_connections
可选参数:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)
go
	ipConnection, err := client.IPConnections.New(context.Background(), telnyx.IPConnectionNewParams{
		ConnectionName: "my-ip-connection",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
record_type
(字符串)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Retrieve an Ip connection

获取IP连接详情

Retrieves the details of an existing ip connection.
GET /ip_connections/{id}
go
	ipConnection, err := client.IPConnections.Get(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
record_type
(string),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
获取现有IP连接的详细信息。
GET /ip_connections/{id}
go
	ipConnection, err := client.IPConnections.Get(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
record_type
(字符串)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Update an Ip connection

更新IP连接

Updates settings of an existing IP connection.
PATCH /ip_connections/{id}
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
go
	ipConnection, err := client.IPConnections.Update(
		context.Background(),
		"id",
		telnyx.IPConnectionUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
record_type
(string),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
更新现有IP连接的配置。
PATCH /ip_connections/{id}
可选参数:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)
go
	ipConnection, err := client.IPConnections.Update(
		context.Background(),
		"id",
		telnyx.IPConnectionUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
record_type
(字符串)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

Delete an Ip connection

删除IP连接

Deletes an existing IP connection.
DELETE /ip_connections/{id}
go
	ipConnection, err := client.IPConnections.Delete(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
android_push_credential_id
(string | null),
call_cost_in_webhooks
(boolean),
connection_name
(string),
created_at
(string),
default_on_hold_comfort_noise_enabled
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
encode_contact_header_enabled
(boolean),
encrypted_media
(enum: SRTP, None),
id
(string),
inbound
(object),
ios_push_credential_id
(string | null),
jitter_buffer
(object),
noise_suppression
(enum: inbound, outbound, both, disabled),
noise_suppression_details
(object),
onnet_t38_passthrough_enabled
(boolean),
outbound
(object),
record_type
(string),
rtcp_settings
(object),
tags
(array[string]),
transport_protocol
(enum: UDP, TCP, TLS),
updated_at
(string),
webhook_api_version
(enum: 1, 2),
webhook_event_failover_url
(uri),
webhook_event_url
(uri),
webhook_timeout_secs
(integer | null)
删除现有IP连接。
DELETE /ip_connections/{id}
go
	ipConnection, err := client.IPConnections.Delete(context.Background(), "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ipConnection.Data)
返回值:
active
(布尔值)、
anchorsite_override
(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、
android_push_credential_id
(字符串 | 空)、
call_cost_in_webhooks
(布尔值)、
connection_name
(字符串)、
created_at
(字符串)、
default_on_hold_comfort_noise_enabled
(布尔值)、
dtmf_type
(枚举值:RFC 2833、Inband带内、SIP INFO)、
encode_contact_header_enabled
(布尔值)、
encrypted_media
(枚举值:SRTP、None无)、
id
(字符串)、
inbound
(对象)、
ios_push_credential_id
(字符串 | 空)、
jitter_buffer
(对象)、
noise_suppression
(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、
noise_suppression_details
(对象)、
onnet_t38_passthrough_enabled
(布尔值)、
outbound
(对象)、
record_type
(字符串)、
rtcp_settings
(对象)、
tags
(字符串数组)、
transport_protocol
(枚举值:UDP, TCP, TLS)、
updated_at
(字符串)、
webhook_api_version
(枚举值:1, 2)、
webhook_event_failover_url
(uri)、
webhook_event_url
(uri)、
webhook_timeout_secs
(整数 | 空)

List Ips

列出IP

Get all IPs belonging to the user that match the given filters.
GET /ips
go
	page, err := client.IPs.List(context.Background(), telnyx.IPListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
connection_id
(string),
created_at
(string),
id
(string),
ip_address
(string),
port
(integer),
record_type
(string),
updated_at
(string)
获取当前用户下符合筛选条件的所有IP。
GET /ips
go
	page, err := client.IPs.List(context.Background(), telnyx.IPListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
id
(字符串)、
ip_address
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Create an Ip

创建IP

Create a new IP object.
POST /ips
— Required:
ip_address
Optional:
connection_id
(string),
port
(integer)
go
	ip, err := client.IPs.New(context.Background(), telnyx.IPNewParams{
		IPAddress: "192.168.0.0",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
Returns:
connection_id
(string),
created_at
(string),
id
(string),
ip_address
(string),
port
(integer),
record_type
(string),
updated_at
(string)
创建一个新的IP对象。
POST /ips
— 必填参数:
ip_address
可选参数:
connection_id
(字符串)、
port
(整数)
go
	ip, err := client.IPs.New(context.Background(), telnyx.IPNewParams{
		IPAddress: "192.168.0.0",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
id
(字符串)、
ip_address
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Retrieve an Ip

获取IP详情

Return the details regarding a specific IP.
GET /ips/{id}
go
	ip, err := client.IPs.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
Returns:
connection_id
(string),
created_at
(string),
id
(string),
ip_address
(string),
port
(integer),
record_type
(string),
updated_at
(string)
返回指定IP的详细信息。
GET /ips/{id}
go
	ip, err := client.IPs.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
id
(字符串)、
ip_address
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Update an Ip

更新IP

Update the details of a specific IP.
PATCH /ips/{id}
— Required:
ip_address
Optional:
connection_id
(string),
port
(integer)
go
	ip, err := client.IPs.Update(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.IPUpdateParams{
			IPAddress: "192.168.0.0",
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
Returns:
connection_id
(string),
created_at
(string),
id
(string),
ip_address
(string),
port
(integer),
record_type
(string),
updated_at
(string)
更新指定IP的详细信息。
PATCH /ips/{id}
— 必填参数:
ip_address
可选参数:
connection_id
(字符串)、
port
(整数)
go
	ip, err := client.IPs.Update(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.IPUpdateParams{
			IPAddress: "192.168.0.0",
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
id
(字符串)、
ip_address
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Delete an Ip

删除IP

Delete an IP.
DELETE /ips/{id}
go
	ip, err := client.IPs.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
Returns:
connection_id
(string),
created_at
(string),
id
(string),
ip_address
(string),
port
(integer),
record_type
(string),
updated_at
(string)
删除一个IP。
DELETE /ips/{id}
go
	ip, err := client.IPs.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", ip.Data)
返回值:
connection_id
(字符串)、
created_at
(字符串)、
id
(字符串)、
ip_address
(字符串)、
port
(整数)、
record_type
(字符串)、
updated_at
(字符串)

Get all outbound voice profiles

获取所有外呼语音配置文件

Get all outbound voice profiles belonging to the user that match the given filters.
GET /outbound_voice_profiles
go
	page, err := client.OutboundVoiceProfiles.List(context.Background(), telnyx.OutboundVoiceProfileListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
Returns:
billing_group_id
(uuid),
call_recording
(object),
calling_window
(object),
concurrent_call_limit
(integer | null),
connections_count
(integer),
created_at
(string),
daily_spend_limit
(string),
daily_spend_limit_enabled
(boolean),
enabled
(boolean),
id
(string),
max_destination_rate
(number),
name
(string),
record_type
(string),
service_plan
(enum: global),
tags
(array[string]),
traffic_type
(enum: conversational),
updated_at
(string),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
获取当前用户下符合筛选条件的所有外呼语音配置文件。
GET /outbound_voice_profiles
go
	page, err := client.OutboundVoiceProfiles.List(context.Background(), telnyx.OutboundVoiceProfileListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)
返回值:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
connections_count
(整数)、
created_at
(字符串)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
id
(字符串)、
max_destination_rate
(数字)、
name
(字符串)、
record_type
(字符串)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
updated_at
(字符串)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)

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: global),
tags
(array[string]),
traffic_type
(enum: conversational),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.New(context.Background(), telnyx.OutboundVoiceProfileNewParams{
		Name: "office",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
Returns:
billing_group_id
(uuid),
call_recording
(object),
calling_window
(object),
concurrent_call_limit
(integer | null),
connections_count
(integer),
created_at
(string),
daily_spend_limit
(string),
daily_spend_limit_enabled
(boolean),
enabled
(boolean),
id
(string),
max_destination_rate
(number),
name
(string),
record_type
(string),
service_plan
(enum: global),
tags
(array[string]),
traffic_type
(enum: conversational),
updated_at
(string),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
创建一个外呼语音配置文件。
POST /outbound_voice_profiles
— 必填参数:
name
可选参数:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
max_destination_rate
(数字)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.New(context.Background(), telnyx.OutboundVoiceProfileNewParams{
		Name: "office",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
返回值:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
connections_count
(整数)、
created_at
(字符串)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
id
(字符串)、
max_destination_rate
(数字)、
name
(字符串)、
record_type
(字符串)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
updated_at
(字符串)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)

Retrieve an outbound voice profile

获取外呼语音配置文件详情

Retrieves the details of an existing outbound voice profile.
GET /outbound_voice_profiles/{id}
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.Get(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
Returns:
billing_group_id
(uuid),
call_recording
(object),
calling_window
(object),
concurrent_call_limit
(integer | null),
connections_count
(integer),
created_at
(string),
daily_spend_limit
(string),
daily_spend_limit_enabled
(boolean),
enabled
(boolean),
id
(string),
max_destination_rate
(number),
name
(string),
record_type
(string),
service_plan
(enum: global),
tags
(array[string]),
traffic_type
(enum: conversational),
updated_at
(string),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
获取现有外呼语音配置文件的详细信息。
GET /outbound_voice_profiles/{id}
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.Get(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
返回值:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
connections_count
(整数)、
created_at
(字符串)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
id
(字符串)、
max_destination_rate
(数字)、
name
(字符串)、
record_type
(字符串)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
updated_at
(字符串)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)

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: global),
tags
(array[string]),
traffic_type
(enum: conversational),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.Update(
		context.Background(),
		"1293384261075731499",
		telnyx.OutboundVoiceProfileUpdateParams{
			Name: "office",
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
Returns:
billing_group_id
(uuid),
call_recording
(object),
calling_window
(object),
concurrent_call_limit
(integer | null),
connections_count
(integer),
created_at
(string),
daily_spend_limit
(string),
daily_spend_limit_enabled
(boolean),
enabled
(boolean),
id
(string),
max_destination_rate
(number),
name
(string),
record_type
(string),
service_plan
(enum: global),
tags
(array[string]),
traffic_type
(enum: conversational),
updated_at
(string),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
PATCH /outbound_voice_profiles/{id}
— 必填参数:
name
可选参数:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
max_destination_rate
(数字)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.Update(
		context.Background(),
		"1293384261075731499",
		telnyx.OutboundVoiceProfileUpdateParams{
			Name: "office",
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
返回值:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
connections_count
(整数)、
created_at
(字符串)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
id
(字符串)、
max_destination_rate
(数字)、
name
(字符串)、
record_type
(字符串)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
updated_at
(字符串)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)

Delete an outbound voice profile

删除外呼语音配置文件

Deletes an existing outbound voice profile.
DELETE /outbound_voice_profiles/{id}
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.Delete(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
Returns:
billing_group_id
(uuid),
call_recording
(object),
calling_window
(object),
concurrent_call_limit
(integer | null),
connections_count
(integer),
created_at
(string),
daily_spend_limit
(string),
daily_spend_limit_enabled
(boolean),
enabled
(boolean),
id
(string),
max_destination_rate
(number),
name
(string),
record_type
(string),
service_plan
(enum: global),
tags
(array[string]),
traffic_type
(enum: conversational),
updated_at
(string),
usage_payment_method
(enum: rate-deck),
whitelisted_destinations
(array[string])
删除现有外呼语音配置文件。
DELETE /outbound_voice_profiles/{id}
go
	outboundVoiceProfile, err := client.OutboundVoiceProfiles.Delete(context.Background(), "1293384261075731499")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", outboundVoiceProfile.Data)
返回值:
billing_group_id
(uuid)、
call_recording
(对象)、
calling_window
(对象)、
concurrent_call_limit
(整数 | 空)、
connections_count
(整数)、
created_at
(字符串)、
daily_spend_limit
(字符串)、
daily_spend_limit_enabled
(布尔值)、
enabled
(布尔值)、
id
(字符串)、
max_destination_rate
(数字)、
name
(字符串)、
record_type
(字符串)、
service_plan
(枚举值:global全球)、
tags
(字符串数组)、
traffic_type
(枚举值:conversational会话型)、
updated_at
(字符串)、
usage_payment_method
(枚举值:rate-deck费率表)、
whitelisted_destinations
(字符串数组)