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-gobash
go get github.com/team-telnyx/telnyx-goSetup
初始化配置
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 is already initialized as shown above.
clientgo
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")),
)以下所有示例均假设已按照上述方式完成初始化。
clientError 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: invalid API key, insufficient permissions,
resource not found, validation error (check field formats),
rate limited (retry with exponential backoff).
401403404422429所有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("网络错误 — 请检查网络连接后重试")
}
}常见错误码: 无效API密钥、 权限不足、 资源不存在、 校验错误(请检查字段格式)、 触发限流(请使用指数退避策略重试)。
401403404422429Important Notes
重要说明
- Pagination: Use for automatic iteration:
ListAutoPaging().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_rangesgo
page, err := client.AccessIPRanges.List(context.Background(), telnyx.AccessIPRangeListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (string), (date-time), (string), (string), (enum: pending, added), (date-time), (string)
cidr_blockcreated_atdescriptionidstatusupdated_atuser_idGET /access_ip_rangesgo
page, err := client.AccessIPRanges.List(context.Background(), telnyx.AccessIPRangeListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(字符串)、(日期时间)、(字符串)、(字符串)、(枚举值:pending待处理、added已添加)、(日期时间)、(字符串)
cidr_blockcreated_atdescriptionidstatusupdated_atuser_idCreate new Access IP Range
创建新的访问IP段
POST /access_ip_rangescidr_blockOptional: (string)
descriptiongo
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: (string), (date-time), (string), (string), (enum: pending, added), (date-time), (string)
cidr_blockcreated_atdescriptionidstatusupdated_atuser_idPOST /access_ip_rangescidr_block可选参数:(字符串)
descriptiongo
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)返回值:(字符串)、(日期时间)、(字符串)、(字符串)、(枚举值:pending待处理、added已添加)、(日期时间)、(字符串)
cidr_blockcreated_atdescriptionidstatusupdated_atuser_idDelete 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: (string), (date-time), (string), (string), (enum: pending, added), (date-time), (string)
cidr_blockcreated_atdescriptionidstatusupdated_atuser_idDELETE /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)返回值:(字符串)、(日期时间)、(字符串)、(字符串)、(枚举值:pending待处理、added已添加)、(日期时间)、(字符串)
cidr_blockcreated_atdescriptionidstatusupdated_atuser_idList connections
列出连接
Returns a list of your connections irrespective of type.
GET /connectionsgo
page, err := client.Connections.List(context.Background(), telnyx.ConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string), (string), (string), (string), (string), (array[string]), (string), (enum: 1, 2), (uri), (uri)
activeanchorsite_overrideconnection_namecreated_atidoutbound_voice_profile_idrecord_typetagsupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_url返回你所有类型的连接列表。
GET /connectionsgo
page, err := client.Connections.List(context.Background(), telnyx.ConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串数组)、(字符串)、(枚举值:1, 2)、(uri)、(uri)
activeanchorsite_overrideconnection_namecreated_atidoutbound_voice_profile_idrecord_typetagsupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlRetrieve 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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string), (string), (string), (string), (string), (array[string]), (string), (enum: 1, 2), (uri), (uri)
activeanchorsite_overrideconnection_namecreated_atidoutbound_voice_profile_idrecord_typetagsupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_url获取现有连接的概览信息。如需获取特定的认证信息,请使用对应连接类型的端点。
GET /connections/{id}go
connection, err := client.Connections.Get(context.Background(), "id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", connection.Data)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串数组)、(字符串)、(枚举值:1, 2)、(uri)、(uri)
activeanchorsite_overrideconnection_namecreated_atidoutbound_voice_profile_idrecord_typetagsupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlList credential connections
列出凭证连接
Returns a list of your credential connections.
GET /credential_connectionsgo
page, err := client.CredentialConnections.List(context.Background(), telnyx.CredentialConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (enum: disabled, unrestricted, internal), (array[string]), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs返回你的凭证连接列表。
GET /credential_connectionsgo
page, err := client.CredentialConnections.List(context.Background(), telnyx.CredentialConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsCreate a credential connection
创建凭证连接
Creates a credential connection.
POST /credential_connectionsuser_namepasswordconnection_nameOptional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (object), (enum: disabled, unrestricted, internal), (array[string]), (enum: 1, 2, texml), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingssip_uri_calling_preferencetagswebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (enum: disabled, unrestricted, internal), (array[string]), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs创建一个凭证连接。
POST /credential_connectionsuser_namepasswordconnection_name可选参数:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(枚举值:1, 2, texml)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingssip_uri_calling_preferencetagswebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
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)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsRetrieve 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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (enum: disabled, unrestricted, internal), (array[string]), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs获取现有凭证连接的详细信息。
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)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsUpdate a credential connection
更新凭证连接
Updates settings of an existing credential connection.
PATCH /credential_connections/{id}Optional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (object), (enum: disabled, unrestricted, internal), (array[string]), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrtcp_settingssip_uri_calling_preferencetagsuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
credentialConnection, err := client.CredentialConnections.Update(
context.Background(),
"id",
telnyx.CredentialConnectionUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", credentialConnection.Data)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (enum: disabled, unrestricted, internal), (array[string]), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs更新现有凭证连接的配置。
PATCH /credential_connections/{id}可选参数:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrtcp_settingssip_uri_calling_preferencetagsuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
credentialConnection, err := client.CredentialConnections.Update(
context.Background(),
"id",
telnyx.CredentialConnectionUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", credentialConnection.Data)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsDelete 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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (enum: disabled, unrestricted, internal), (array[string]), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs删除现有凭证连接。
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)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(枚举值:disabled禁用、unrestricted不受限、internal内部)、(字符串数组)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingssip_uri_calling_preferencetagsupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsCheck a Credential Connection Registration Status
检查凭证连接注册状态
Checks the registration_status for a credential connection, () as well as the timestamp for the last SIP registration event ()
registration_statusregistration_status_updated_atPOST /credential_connections/{id}/actions/check_registration_statusgo
response, err := client.CredentialConnections.Actions.CheckRegistrationStatus(context.Background(), "id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)Returns: (string), (string), (integer), (string), (string), (enum: Not Applicable, Not Registered, Failed, Expired, Registered, Unregistered), (string), (string)
ip_addresslast_registrationportrecord_typesip_usernamestatustransportuser_agent检查凭证连接的(注册状态)以及最近一次SIP注册事件的时间戳
registration_statusregistration_status_updated_atPOST /credential_connections/{id}/actions/check_registration_statusgo
response, err := client.CredentialConnections.Actions.CheckRegistrationStatus(context.Background(), "id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)返回值:(字符串)、(字符串)、(整数)、(字符串)、(字符串)、(枚举值:Not Applicable不适用、Not Registered未注册、Failed失败、Expired已过期、Registered已注册、Unregistered已注销)、(字符串)、(字符串)
ip_addresslast_registrationportrecord_typesip_usernamestatustransportuser_agentList FQDN connections
列出FQDN连接
Returns a list of your FQDN connections.
GET /fqdn_connectionsgo
page, err := client.FqdnConnections.List(context.Background(), telnyx.FqdnConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (boolean), (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (boolean), (boolean), (object), (string | null), (object), (boolean), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (boolean), (boolean), (array[string]), (boolean), (enum: UDP, TCP, TLS), (string), (integer), (string), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs返回你的FQDN连接列表。
GET /fqdn_connectionsgo
page, err := client.FqdnConnections.List(context.Background(), telnyx.FqdnConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(布尔值)、(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(布尔值)、(布尔值)、(对象)、(字符串 | 空)、(对象)、(布尔值)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(布尔值)、(布尔值)、(字符串数组)、(布尔值)、(枚举值:UDP, TCP, TLS)、(字符串)、(整数)、(字符串)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsCreate an FQDN connection
创建FQDN连接
Creates a FQDN connection.
POST /fqdn_connectionsconnection_nameOptional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (object), (string | null), (object), (boolean), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (object), (array[string]), (enum: UDP, TCP, TLS), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
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: (boolean), (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (boolean), (boolean), (object), (string | null), (object), (boolean), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (boolean), (boolean), (array[string]), (boolean), (enum: UDP, TCP, TLS), (string), (integer), (string), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs创建一个FQDN连接。
POST /fqdn_connectionsconnection_name可选参数:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(对象)、(字符串 | 空)、(对象)、(布尔值)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
fqdnConnection, err := client.FqdnConnections.New(context.Background(), telnyx.FqdnConnectionNewParams{
ConnectionName: "my-resource",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", fqdnConnection.Data)返回值:(布尔值)、(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(布尔值)、(布尔值)、(对象)、(字符串 | 空)、(对象)、(布尔值)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(布尔值)、(布尔值)、(字符串数组)、(布尔值)、(枚举值:UDP, TCP, TLS)、(字符串)、(整数)、(字符串)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsRetrieve 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: (boolean), (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (boolean), (boolean), (object), (string | null), (object), (boolean), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (boolean), (boolean), (array[string]), (boolean), (enum: UDP, TCP, TLS), (string), (integer), (string), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs获取现有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)返回值:(布尔值)、(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(布尔值)、(布尔值)、(对象)、(字符串 | 空)、(对象)、(布尔值)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(布尔值)、(布尔值)、(字符串数组)、(布尔值)、(枚举值:UDP, TCP, TLS)、(字符串)、(整数)、(字符串)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsUpdate an FQDN connection
更新FQDN连接
Updates settings of an existing FQDN connection.
PATCH /fqdn_connections/{id}Optional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (object), (array[string]), (enum: UDP, TCP, TLS), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
fqdnConnection, err := client.FqdnConnections.Update(
context.Background(),
"1293384261075731499",
telnyx.FqdnConnectionUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", fqdnConnection.Data)Returns: (boolean), (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (boolean), (boolean), (object), (string | null), (object), (boolean), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (boolean), (boolean), (array[string]), (boolean), (enum: UDP, TCP, TLS), (string), (integer), (string), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs更新现有FQDN连接的配置。
PATCH /fqdn_connections/{id}可选参数:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
fqdnConnection, err := client.FqdnConnections.Update(
context.Background(),
"1293384261075731499",
telnyx.FqdnConnectionUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", fqdnConnection.Data)返回值:(布尔值)、(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(布尔值)、(布尔值)、(对象)、(字符串 | 空)、(对象)、(布尔值)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(布尔值)、(布尔值)、(字符串数组)、(布尔值)、(枚举值:UDP, TCP, TLS)、(字符串)、(整数)、(字符串)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsDelete 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: (boolean), (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (boolean), (boolean), (object), (string | null), (object), (boolean), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (string), (object), (boolean), (boolean), (array[string]), (boolean), (enum: UDP, TCP, TLS), (string), (integer), (string), (string), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs删除一个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)返回值:(布尔值)、(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(布尔值)、(布尔值)、(对象)、(字符串 | 空)、(对象)、(布尔值)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(字符串)、(对象)、(布尔值)、(布尔值)、(字符串数组)、(布尔值)、(枚举值:UDP, TCP, TLS)、(字符串)、(整数)、(字符串)、(字符串)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeadjust_dtmf_timestampanchorsite_overrideandroid_push_credential_idcall_cost_enabledcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidignore_dtmf_durationignore_mark_bitinboundios_push_credential_idjitter_buffermicrosoft_teams_sbcnoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundpasswordrecord_typertcp_settingsrtp_pass_codecs_on_stream_changesend_normalized_timestampstagsthird_party_control_enabledtransport_protocoltxt_nametxt_ttltxt_valueupdated_atuser_namewebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsList FQDNs
列出FQDN
Get all FQDNs belonging to the user that match the given filters.
GET /fqdnsgo
page, err := client.Fqdns.List(context.Background(), telnyx.FqdnListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (string), (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_at获取当前用户下符合筛选条件的所有FQDN。
GET /fqdnsgo
page, err := client.Fqdns.List(context.Background(), telnyx.FqdnListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(整数)、(字符串)、(字符串)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_atCreate an FQDN
创建FQDN
Create a new FQDN object.
POST /fqdnsfqdndns_record_typeconnection_idOptional: (integer | null)
portgo
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: (string), (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_at创建一个新的FQDN对象。
POST /fqdnsfqdndns_record_typeconnection_id可选参数:(整数 | 空)
portgo
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_idcreated_atdns_record_typefqdnidportrecord_typeupdated_atRetrieve 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: (string), (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_at返回指定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_idcreated_atdns_record_typefqdnidportrecord_typeupdated_atUpdate an FQDN
更新FQDN
Update the details of a specific FQDN.
PATCH /fqdns/{id}Optional: (string), (string), (string), (integer | null)
connection_iddns_record_typefqdnportgo
fqdn, err := client.Fqdns.Update(
context.Background(),
"1517907029795014409",
telnyx.FqdnUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", fqdn.Data)Returns: (string), (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_at更新指定FQDN的详细信息。
PATCH /fqdns/{id}可选参数:(字符串)、(字符串)、(字符串)、(整数 | 空)
connection_iddns_record_typefqdnportgo
fqdn, err := client.Fqdns.Update(
context.Background(),
"1517907029795014409",
telnyx.FqdnUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", fqdn.Data)返回值:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(整数)、(字符串)、(字符串)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_atDelete 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: (string), (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atdns_record_typefqdnidportrecord_typeupdated_at删除一个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_idcreated_atdns_record_typefqdnidportrecord_typeupdated_atList Ip connections
列出IP连接
Returns a list of your IP connections.
GET /ip_connectionsgo
page, err := client.IPConnections.List(context.Background(), telnyx.IPConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (object), (array[string]), (enum: UDP, TCP, TLS), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs返回你的IP连接列表。
GET /ip_connectionsgo
page, err := client.IPConnections.List(context.Background(), telnyx.IPConnectionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsCreate an Ip connection
创建IP连接
Creates an IP connection.
POST /ip_connectionsOptional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (object), (array[string]), (enum: UDP, TCP, TLS), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (object), (array[string]), (enum: UDP, TCP, TLS), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs创建一个IP连接。
POST /ip_connections可选参数:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
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)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsRetrieve 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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (object), (array[string]), (enum: UDP, TCP, TLS), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs获取现有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)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsUpdate an Ip connection
更新IP连接
Updates settings of an existing IP connection.
PATCH /ip_connections/{id}Optional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (object), (array[string]), (enum: UDP, TCP, TLS), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
ipConnection, err := client.IPConnections.Update(
context.Background(),
"id",
telnyx.IPConnectionUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", ipConnection.Data)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (object), (array[string]), (enum: UDP, TCP, TLS), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs更新现有IP连接的配置。
PATCH /ip_connections/{id}可选参数:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namedefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediainboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrtcp_settingstagstransport_protocolwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsgo
ipConnection, err := client.IPConnections.Update(
context.Background(),
"id",
telnyx.IPConnectionUpdateParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", ipConnection.Data)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsDelete 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: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (string | null), (boolean), (string), (string), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (enum: SRTP, None), (string), (object), (string | null), (object), (enum: inbound, outbound, both, disabled), (object), (boolean), (object), (string), (object), (array[string]), (enum: UDP, TCP, TLS), (string), (enum: 1, 2), (uri), (uri), (integer | null)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secs删除现有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)返回值:(布尔值)、(枚举值:Latency按延迟、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(字符串 | 空)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值:RFC 2833、Inband带内、SIP INFO)、(布尔值)、(枚举值:SRTP、None无)、(字符串)、(对象)、(字符串 | 空)、(对象)、(枚举值:inbound入站、outbound出站、both双向、disabled禁用)、(对象)、(布尔值)、(对象)、(字符串)、(对象)、(字符串数组)、(枚举值:UDP, TCP, TLS)、(字符串)、(枚举值:1, 2)、(uri)、(uri)、(整数 | 空)
activeanchorsite_overrideandroid_push_credential_idcall_cost_in_webhooksconnection_namecreated_atdefault_on_hold_comfort_noise_enableddtmf_typeencode_contact_header_enabledencrypted_mediaidinboundios_push_credential_idjitter_buffernoise_suppressionnoise_suppression_detailsonnet_t38_passthrough_enabledoutboundrecord_typertcp_settingstagstransport_protocolupdated_atwebhook_api_versionwebhook_event_failover_urlwebhook_event_urlwebhook_timeout_secsList Ips
列出IP
Get all IPs belonging to the user that match the given filters.
GET /ipsgo
page, err := client.IPs.List(context.Background(), telnyx.IPListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atidip_addressportrecord_typeupdated_at获取当前用户下符合筛选条件的所有IP。
GET /ipsgo
page, err := client.IPs.List(context.Background(), telnyx.IPListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(字符串)、(字符串)、(字符串)、(字符串)、(整数)、(字符串)、(字符串)
connection_idcreated_atidip_addressportrecord_typeupdated_atCreate an Ip
创建IP
Create a new IP object.
POST /ipsip_addressOptional: (string), (integer)
connection_idportgo
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: (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atidip_addressportrecord_typeupdated_at创建一个新的IP对象。
POST /ipsip_address可选参数:(字符串)、(整数)
connection_idportgo
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_idcreated_atidip_addressportrecord_typeupdated_atRetrieve 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: (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atidip_addressportrecord_typeupdated_at返回指定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_idcreated_atidip_addressportrecord_typeupdated_atUpdate an Ip
更新IP
Update the details of a specific IP.
PATCH /ips/{id}ip_addressOptional: (string), (integer)
connection_idportgo
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: (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atidip_addressportrecord_typeupdated_at更新指定IP的详细信息。
PATCH /ips/{id}ip_address可选参数:(字符串)、(整数)
connection_idportgo
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_idcreated_atidip_addressportrecord_typeupdated_atDelete 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: (string), (string), (string), (string), (integer), (string), (string)
connection_idcreated_atidip_addressportrecord_typeupdated_at删除一个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_idcreated_atidip_addressportrecord_typeupdated_atGet all outbound voice profiles
获取所有外呼语音配置文件
Get all outbound voice profiles belonging to the user that match the given filters.
GET /outbound_voice_profilesgo
page, err := client.OutboundVoiceProfiles.List(context.Background(), telnyx.OutboundVoiceProfileListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)Returns: (uuid), (object), (object), (integer | null), (integer), (string), (string), (boolean), (boolean), (string), (number), (string), (string), (enum: global), (array[string]), (enum: conversational), (string), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinations获取当前用户下符合筛选条件的所有外呼语音配置文件。
GET /outbound_voice_profilesgo
page, err := client.OutboundVoiceProfiles.List(context.Background(), telnyx.OutboundVoiceProfileListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)返回值:(uuid)、(对象)、(对象)、(整数 | 空)、(整数)、(字符串)、(字符串)、(布尔值)、(布尔值)、(字符串)、(数字)、(字符串)、(字符串)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(字符串)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinationsCreate an outbound voice profile
创建外呼语音配置文件
Create an outbound voice profile.
POST /outbound_voice_profilesnameOptional: (uuid), (object), (object), (integer | null), (string), (boolean), (boolean), (number), (enum: global), (array[string]), (enum: conversational), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitdaily_spend_limitdaily_spend_limit_enabledenabledmax_destination_rateservice_plantagstraffic_typeusage_payment_methodwhitelisted_destinationsgo
outboundVoiceProfile, err := client.OutboundVoiceProfiles.New(context.Background(), telnyx.OutboundVoiceProfileNewParams{
Name: "office",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", outboundVoiceProfile.Data)Returns: (uuid), (object), (object), (integer | null), (integer), (string), (string), (boolean), (boolean), (string), (number), (string), (string), (enum: global), (array[string]), (enum: conversational), (string), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinations创建一个外呼语音配置文件。
POST /outbound_voice_profilesname可选参数:(uuid)、(对象)、(对象)、(整数 | 空)、(字符串)、(布尔值)、(布尔值)、(数字)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitdaily_spend_limitdaily_spend_limit_enabledenabledmax_destination_rateservice_plantagstraffic_typeusage_payment_methodwhitelisted_destinationsgo
outboundVoiceProfile, err := client.OutboundVoiceProfiles.New(context.Background(), telnyx.OutboundVoiceProfileNewParams{
Name: "office",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", outboundVoiceProfile.Data)返回值:(uuid)、(对象)、(对象)、(整数 | 空)、(整数)、(字符串)、(字符串)、(布尔值)、(布尔值)、(字符串)、(数字)、(字符串)、(字符串)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(字符串)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinationsRetrieve 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: (uuid), (object), (object), (integer | null), (integer), (string), (string), (boolean), (boolean), (string), (number), (string), (string), (enum: global), (array[string]), (enum: conversational), (string), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinations获取现有外呼语音配置文件的详细信息。
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)返回值:(uuid)、(对象)、(对象)、(整数 | 空)、(整数)、(字符串)、(字符串)、(布尔值)、(布尔值)、(字符串)、(数字)、(字符串)、(字符串)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(字符串)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinationsUpdates an existing outbound voice profile.
更新现有外呼语音配置文件
PATCH /outbound_voice_profiles/{id}nameOptional: (uuid), (object), (object), (integer | null), (string), (boolean), (boolean), (number), (enum: global), (array[string]), (enum: conversational), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitdaily_spend_limitdaily_spend_limit_enabledenabledmax_destination_rateservice_plantagstraffic_typeusage_payment_methodwhitelisted_destinationsgo
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: (uuid), (object), (object), (integer | null), (integer), (string), (string), (boolean), (boolean), (string), (number), (string), (string), (enum: global), (array[string]), (enum: conversational), (string), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinationsPATCH /outbound_voice_profiles/{id}name可选参数:(uuid)、(对象)、(对象)、(整数 | 空)、(字符串)、(布尔值)、(布尔值)、(数字)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitdaily_spend_limitdaily_spend_limit_enabledenabledmax_destination_rateservice_plantagstraffic_typeusage_payment_methodwhitelisted_destinationsgo
outboundVoiceProfile, err := client.OutboundVoiceProfiles.Update(
context.Background(),
"1293384261075731499",
telnyx.OutboundVoiceProfileUpdateParams{
Name: "office",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", outboundVoiceProfile.Data)返回值:(uuid)、(对象)、(对象)、(整数 | 空)、(整数)、(字符串)、(字符串)、(布尔值)、(布尔值)、(字符串)、(数字)、(字符串)、(字符串)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(字符串)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinationsDelete 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: (uuid), (object), (object), (integer | null), (integer), (string), (string), (boolean), (boolean), (string), (number), (string), (string), (enum: global), (array[string]), (enum: conversational), (string), (enum: rate-deck), (array[string])
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinations删除现有外呼语音配置文件。
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)返回值:(uuid)、(对象)、(对象)、(整数 | 空)、(整数)、(字符串)、(字符串)、(布尔值)、(布尔值)、(字符串)、(数字)、(字符串)、(字符串)、(枚举值:global全球)、(字符串数组)、(枚举值:conversational会话型)、(字符串)、(枚举值:rate-deck费率表)、(字符串数组)
billing_group_idcall_recordingcalling_windowconcurrent_call_limitconnections_countcreated_atdaily_spend_limitdaily_spend_limit_enabledenabledidmax_destination_ratenamerecord_typeservice_plantagstraffic_typeupdated_atusage_payment_methodwhitelisted_destinations