Movatterモバイル変換


[0]ホーム

URL:


openapi

package
v1.26.5Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License:MITImports:6Imported by:1

Details

Repository

github.com/twilio/twilio-go

Links

README

Go API client for openapi

This is the public Twilio REST API.

Overview

This API client was generated by theOpenAPI Generator project from the OpenAPI specs located attwilio/twilio-oai. By using theOpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: com.twilio.oai.TwilioGoGeneratorFor more information, please visithttps://support.twilio.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assertgo get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative tohttps://trunking.twilio.com

ClassMethodHTTP requestDescription
TrunksApiCreateTrunkPost /v1/Trunks
TrunksApiDeleteTrunkDelete /v1/Trunks/{Sid}
TrunksApiFetchTrunkGet /v1/Trunks/{Sid}
TrunksApiListTrunkGet /v1/Trunks
TrunksApiUpdateTrunkPost /v1/Trunks/{Sid}
TrunksCredentialListsApiCreateCredentialListPost /v1/Trunks/{TrunkSid}/CredentialLists
TrunksCredentialListsApiDeleteCredentialListDelete /v1/Trunks/{TrunkSid}/CredentialLists/{Sid}
TrunksCredentialListsApiFetchCredentialListGet /v1/Trunks/{TrunkSid}/CredentialLists/{Sid}
TrunksCredentialListsApiListCredentialListGet /v1/Trunks/{TrunkSid}/CredentialLists
TrunksIpAccessControlListsApiCreateIpAccessControlListPost /v1/Trunks/{TrunkSid}/IpAccessControlListsAssociate an IP Access Control List with a Trunk
TrunksIpAccessControlListsApiDeleteIpAccessControlListDelete /v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}Remove an associated IP Access Control List from a Trunk
TrunksIpAccessControlListsApiFetchIpAccessControlListGet /v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}
TrunksIpAccessControlListsApiListIpAccessControlListGet /v1/Trunks/{TrunkSid}/IpAccessControlListsList all IP Access Control Lists for a Trunk
TrunksOriginationUrlsApiCreateOriginationUrlPost /v1/Trunks/{TrunkSid}/OriginationUrls
TrunksOriginationUrlsApiDeleteOriginationUrlDelete /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}
TrunksOriginationUrlsApiFetchOriginationUrlGet /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}
TrunksOriginationUrlsApiListOriginationUrlGet /v1/Trunks/{TrunkSid}/OriginationUrls
TrunksOriginationUrlsApiUpdateOriginationUrlPost /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}
TrunksPhoneNumbersApiCreatePhoneNumberPost /v1/Trunks/{TrunkSid}/PhoneNumbers
TrunksPhoneNumbersApiDeletePhoneNumberDelete /v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}
TrunksPhoneNumbersApiFetchPhoneNumberGet /v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}
TrunksPhoneNumbersApiListPhoneNumberGet /v1/Trunks/{TrunkSid}/PhoneNumbers
TrunksRecordingApiFetchRecordingGet /v1/Trunks/{TrunkSid}/Recording
TrunksRecordingApiUpdateRecordingPost /v1/Trunks/{TrunkSid}/Recording

Documentation For Models

Documentation For Authorization

accountSid_authToken

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{    UserName: "username",    Password: "password",})r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeApiServiceadded inv0.11.0

type ApiService struct {// contains filtered or unexported fields}

funcNewApiServiceadded inv0.11.0

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService

funcNewApiServiceWithClientadded inv0.11.0

func NewApiServiceWithClient(clienttwilio.BaseClient) *ApiService

func (*ApiService)CreateCredentialListadded inv0.11.0

func (c *ApiService) CreateCredentialList(TrunkSidstring, params *CreateCredentialListParams) (*TrunkingV1CredentialList,error)

func (*ApiService)CreateIpAccessControlListadded inv0.11.0

func (c *ApiService) CreateIpAccessControlList(TrunkSidstring, params *CreateIpAccessControlListParams) (*TrunkingV1IpAccessControlList,error)

Associate an IP Access Control List with a Trunk

func (*ApiService)CreateOriginationUrladded inv0.11.0

func (c *ApiService) CreateOriginationUrl(TrunkSidstring, params *CreateOriginationUrlParams) (*TrunkingV1OriginationUrl,error)

func (*ApiService)CreatePhoneNumberadded inv0.11.0

func (c *ApiService) CreatePhoneNumber(TrunkSidstring, params *CreatePhoneNumberParams) (*TrunkingV1PhoneNumber,error)

func (*ApiService)CreateTrunkadded inv0.11.0

func (c *ApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1Trunk,error)

func (*ApiService)DeleteCredentialListadded inv0.11.0

func (c *ApiService) DeleteCredentialList(TrunkSidstring, Sidstring)error

func (*ApiService)DeleteIpAccessControlListadded inv0.11.0

func (c *ApiService) DeleteIpAccessControlList(TrunkSidstring, Sidstring)error

Remove an associated IP Access Control List from a Trunk

func (*ApiService)DeleteOriginationUrladded inv0.11.0

func (c *ApiService) DeleteOriginationUrl(TrunkSidstring, Sidstring)error

func (*ApiService)DeletePhoneNumberadded inv0.11.0

func (c *ApiService) DeletePhoneNumber(TrunkSidstring, Sidstring)error

func (*ApiService)DeleteTrunkadded inv0.11.0

func (c *ApiService) DeleteTrunk(Sidstring)error

func (*ApiService)FetchCredentialListadded inv0.11.0

func (c *ApiService) FetchCredentialList(TrunkSidstring, Sidstring) (*TrunkingV1CredentialList,error)

func (*ApiService)FetchIpAccessControlListadded inv0.11.0

func (c *ApiService) FetchIpAccessControlList(TrunkSidstring, Sidstring) (*TrunkingV1IpAccessControlList,error)

func (*ApiService)FetchOriginationUrladded inv0.11.0

func (c *ApiService) FetchOriginationUrl(TrunkSidstring, Sidstring) (*TrunkingV1OriginationUrl,error)

func (*ApiService)FetchPhoneNumberadded inv0.11.0

func (c *ApiService) FetchPhoneNumber(TrunkSidstring, Sidstring) (*TrunkingV1PhoneNumber,error)

func (*ApiService)FetchRecordingadded inv0.11.0

func (c *ApiService) FetchRecording(TrunkSidstring) (*TrunkingV1Recording,error)

func (*ApiService)FetchTrunkadded inv0.11.0

func (c *ApiService) FetchTrunk(Sidstring) (*TrunkingV1Trunk,error)

func (*ApiService)ListCredentialListadded inv0.11.0

func (c *ApiService) ListCredentialList(TrunkSidstring, params *ListCredentialListParams) ([]TrunkingV1CredentialList,error)

Lists CredentialList records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService)ListIpAccessControlListadded inv0.11.0

func (c *ApiService) ListIpAccessControlList(TrunkSidstring, params *ListIpAccessControlListParams) ([]TrunkingV1IpAccessControlList,error)

Lists IpAccessControlList records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService)ListOriginationUrladded inv0.11.0

func (c *ApiService) ListOriginationUrl(TrunkSidstring, params *ListOriginationUrlParams) ([]TrunkingV1OriginationUrl,error)

Lists OriginationUrl records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService)ListPhoneNumberadded inv0.11.0

func (c *ApiService) ListPhoneNumber(TrunkSidstring, params *ListPhoneNumberParams) ([]TrunkingV1PhoneNumber,error)

Lists PhoneNumber records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService)ListTrunkadded inv0.11.0

func (c *ApiService) ListTrunk(params *ListTrunkParams) ([]TrunkingV1Trunk,error)

Lists Trunk records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService)PageCredentialListadded inv0.13.0

func (c *ApiService) PageCredentialList(TrunkSidstring, params *ListCredentialListParams, pageToken, pageNumberstring) (*ListCredentialListResponse,error)

Retrieve a single page of CredentialList records from the API. Request is executed immediately.

func (*ApiService)PageIpAccessControlListadded inv0.13.0

func (c *ApiService) PageIpAccessControlList(TrunkSidstring, params *ListIpAccessControlListParams, pageToken, pageNumberstring) (*ListIpAccessControlListResponse,error)

Retrieve a single page of IpAccessControlList records from the API. Request is executed immediately.

func (*ApiService)PageOriginationUrladded inv0.13.0

func (c *ApiService) PageOriginationUrl(TrunkSidstring, params *ListOriginationUrlParams, pageToken, pageNumberstring) (*ListOriginationUrlResponse,error)

Retrieve a single page of OriginationUrl records from the API. Request is executed immediately.

func (*ApiService)PagePhoneNumberadded inv0.13.0

func (c *ApiService) PagePhoneNumber(TrunkSidstring, params *ListPhoneNumberParams, pageToken, pageNumberstring) (*ListPhoneNumberResponse,error)

Retrieve a single page of PhoneNumber records from the API. Request is executed immediately.

func (*ApiService)PageTrunkadded inv0.13.0

func (c *ApiService) PageTrunk(params *ListTrunkParams, pageToken, pageNumberstring) (*ListTrunkResponse,error)

Retrieve a single page of Trunk records from the API. Request is executed immediately.

func (*ApiService)RequestHandleradded inv1.25.0

func (c *ApiService) RequestHandler() *twilio.RequestHandler

func (*ApiService)StreamCredentialListadded inv0.13.0

func (c *ApiService) StreamCredentialList(TrunkSidstring, params *ListCredentialListParams) (chanTrunkingV1CredentialList, chanerror)

Streams CredentialList records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService)StreamIpAccessControlListadded inv0.13.0

func (c *ApiService) StreamIpAccessControlList(TrunkSidstring, params *ListIpAccessControlListParams) (chanTrunkingV1IpAccessControlList, chanerror)

Streams IpAccessControlList records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService)StreamOriginationUrladded inv0.13.0

func (c *ApiService) StreamOriginationUrl(TrunkSidstring, params *ListOriginationUrlParams) (chanTrunkingV1OriginationUrl, chanerror)

Streams OriginationUrl records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService)StreamPhoneNumberadded inv0.13.0

func (c *ApiService) StreamPhoneNumber(TrunkSidstring, params *ListPhoneNumberParams) (chanTrunkingV1PhoneNumber, chanerror)

Streams PhoneNumber records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService)StreamTrunkadded inv0.13.0

func (c *ApiService) StreamTrunk(params *ListTrunkParams) (chanTrunkingV1Trunk, chanerror)

Streams Trunk records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService)UpdateOriginationUrladded inv0.11.0

func (c *ApiService) UpdateOriginationUrl(TrunkSidstring, Sidstring, params *UpdateOriginationUrlParams) (*TrunkingV1OriginationUrl,error)

func (*ApiService)UpdateRecordingadded inv0.11.0

func (c *ApiService) UpdateRecording(TrunkSidstring, params *UpdateRecordingParams) (*TrunkingV1Recording,error)

func (*ApiService)UpdateTrunkadded inv0.11.0

func (c *ApiService) UpdateTrunk(Sidstring, params *UpdateTrunkParams) (*TrunkingV1Trunk,error)

typeCreateCredentialListParams

type CreateCredentialListParams struct {// The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list.CredentialListSid *string `json:"CredentialListSid,omitempty"`}

Optional parameters for the method 'CreateCredentialList'

func (*CreateCredentialListParams)SetCredentialListSid

func (params *CreateCredentialListParams) SetCredentialListSid(CredentialListSidstring) *CreateCredentialListParams

typeCreateIpAccessControlListParams

type CreateIpAccessControlListParams struct {// The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk.IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"`}

Optional parameters for the method 'CreateIpAccessControlList'

func (*CreateIpAccessControlListParams)SetIpAccessControlListSid

func (params *CreateIpAccessControlListParams) SetIpAccessControlListSid(IpAccessControlListSidstring) *CreateIpAccessControlListParams

typeCreateOriginationUrlParams

type CreateOriginationUrlParams struct {// The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.Weight *int `json:"Weight,omitempty"`// The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.Priority *int `json:"Priority,omitempty"`// Whether the URL is enabled. The default is `true`.Enabled *bool `json:"Enabled,omitempty"`// A descriptive string that you create to describe the resource. It can be up to 64 characters long.FriendlyName *string `json:"FriendlyName,omitempty"`// The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema.SipUrl *string `json:"SipUrl,omitempty"`}

Optional parameters for the method 'CreateOriginationUrl'

func (*CreateOriginationUrlParams)SetEnabled

func (*CreateOriginationUrlParams)SetFriendlyName

func (params *CreateOriginationUrlParams) SetFriendlyName(FriendlyNamestring) *CreateOriginationUrlParams

func (*CreateOriginationUrlParams)SetPriority

func (params *CreateOriginationUrlParams) SetPriority(Priorityint) *CreateOriginationUrlParams

func (*CreateOriginationUrlParams)SetSipUrl

func (*CreateOriginationUrlParams)SetWeight

typeCreatePhoneNumberParams

type CreatePhoneNumberParams struct {// The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk.PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"`}

Optional parameters for the method 'CreatePhoneNumber'

func (*CreatePhoneNumberParams)SetPhoneNumberSid

func (params *CreatePhoneNumberParams) SetPhoneNumberSid(PhoneNumberSidstring) *CreatePhoneNumberParams

typeCreateTrunkParams

type CreateTrunkParams struct {// A descriptive string that you create to describe the resource. It can be up to 64 characters long.FriendlyName *string `json:"FriendlyName,omitempty"`// The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.DomainName *string `json:"DomainName,omitempty"`// The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"`// The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"`//TransferMode *string `json:"TransferMode,omitempty"`// Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.Secure *bool `json:"Secure,omitempty"`// Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"`//TransferCallerId *string `json:"TransferCallerId,omitempty"`}

Optional parameters for the method 'CreateTrunk'

func (*CreateTrunkParams)SetCnamLookupEnabled

func (params *CreateTrunkParams) SetCnamLookupEnabled(CnamLookupEnabledbool) *CreateTrunkParams

func (*CreateTrunkParams)SetDisasterRecoveryMethod

func (params *CreateTrunkParams) SetDisasterRecoveryMethod(DisasterRecoveryMethodstring) *CreateTrunkParams

func (*CreateTrunkParams)SetDisasterRecoveryUrl

func (params *CreateTrunkParams) SetDisasterRecoveryUrl(DisasterRecoveryUrlstring) *CreateTrunkParams

func (*CreateTrunkParams)SetDomainName

func (params *CreateTrunkParams) SetDomainName(DomainNamestring) *CreateTrunkParams

func (*CreateTrunkParams)SetFriendlyName

func (params *CreateTrunkParams) SetFriendlyName(FriendlyNamestring) *CreateTrunkParams

func (*CreateTrunkParams)SetSecure

func (params *CreateTrunkParams) SetSecure(Securebool) *CreateTrunkParams

func (*CreateTrunkParams)SetTransferCallerIdadded inv0.16.0

func (params *CreateTrunkParams) SetTransferCallerId(TransferCallerIdstring) *CreateTrunkParams

func (*CreateTrunkParams)SetTransferMode

func (params *CreateTrunkParams) SetTransferMode(TransferModestring) *CreateTrunkParams

typeListCredentialListParams

type ListCredentialListParams struct {// How many resources to return in each list page. The default is 50, and the maximum is 1000.PageSize *int `json:"PageSize,omitempty"`// Max number of records to return.Limit *int `json:"limit,omitempty"`}

Optional parameters for the method 'ListCredentialList'

func (*ListCredentialListParams)SetLimitadded inv0.13.0

func (*ListCredentialListParams)SetPageSize

func (params *ListCredentialListParams) SetPageSize(PageSizeint) *ListCredentialListParams

typeListCredentialListResponse

type ListCredentialListResponse struct {CredentialLists []TrunkingV1CredentialList     `json:"credential_lists,omitempty"`MetaListCredentialListResponseMeta `json:"meta,omitempty"`}

ListCredentialListResponse struct for ListCredentialListResponse

typeListCredentialListResponseMetaadded inv1.0.0

type ListCredentialListResponseMeta struct {FirstPageUrlstring  `json:"first_page_url,omitempty"`Keystring  `json:"key,omitempty"`NextPageUrl     *string `json:"next_page_url,omitempty"`Pageint     `json:"page,omitempty"`PageSizeint     `json:"page_size,omitempty"`PreviousPageUrl *string `json:"previous_page_url,omitempty"`Urlstring  `json:"url,omitempty"`}

ListCredentialListResponseMeta struct for ListCredentialListResponseMeta

typeListIpAccessControlListParams

type ListIpAccessControlListParams struct {// How many resources to return in each list page. The default is 50, and the maximum is 1000.PageSize *int `json:"PageSize,omitempty"`// Max number of records to return.Limit *int `json:"limit,omitempty"`}

Optional parameters for the method 'ListIpAccessControlList'

func (*ListIpAccessControlListParams)SetLimitadded inv0.13.0

func (*ListIpAccessControlListParams)SetPageSize

typeListIpAccessControlListResponse

type ListIpAccessControlListResponse struct {IpAccessControlLists []TrunkingV1IpAccessControlList `json:"ip_access_control_lists,omitempty"`MetaListCredentialListResponseMeta  `json:"meta,omitempty"`}

ListIpAccessControlListResponse struct for ListIpAccessControlListResponse

typeListOriginationUrlParams

type ListOriginationUrlParams struct {// How many resources to return in each list page. The default is 50, and the maximum is 1000.PageSize *int `json:"PageSize,omitempty"`// Max number of records to return.Limit *int `json:"limit,omitempty"`}

Optional parameters for the method 'ListOriginationUrl'

func (*ListOriginationUrlParams)SetLimitadded inv0.13.0

func (*ListOriginationUrlParams)SetPageSize

func (params *ListOriginationUrlParams) SetPageSize(PageSizeint) *ListOriginationUrlParams

typeListOriginationUrlResponse

type ListOriginationUrlResponse struct {OriginationUrls []TrunkingV1OriginationUrl     `json:"origination_urls,omitempty"`MetaListCredentialListResponseMeta `json:"meta,omitempty"`}

ListOriginationUrlResponse struct for ListOriginationUrlResponse

typeListPhoneNumberParams

type ListPhoneNumberParams struct {// How many resources to return in each list page. The default is 50, and the maximum is 1000.PageSize *int `json:"PageSize,omitempty"`// Max number of records to return.Limit *int `json:"limit,omitempty"`}

Optional parameters for the method 'ListPhoneNumber'

func (*ListPhoneNumberParams)SetLimitadded inv0.13.0

func (params *ListPhoneNumberParams) SetLimit(Limitint) *ListPhoneNumberParams

func (*ListPhoneNumberParams)SetPageSize

func (params *ListPhoneNumberParams) SetPageSize(PageSizeint) *ListPhoneNumberParams

typeListPhoneNumberResponse

type ListPhoneNumberResponse struct {PhoneNumbers []TrunkingV1PhoneNumber        `json:"phone_numbers,omitempty"`MetaListCredentialListResponseMeta `json:"meta,omitempty"`}

ListPhoneNumberResponse struct for ListPhoneNumberResponse

typeListTrunkParams

type ListTrunkParams struct {// How many resources to return in each list page. The default is 50, and the maximum is 1000.PageSize *int `json:"PageSize,omitempty"`// Max number of records to return.Limit *int `json:"limit,omitempty"`}

Optional parameters for the method 'ListTrunk'

func (*ListTrunkParams)SetLimitadded inv0.13.0

func (params *ListTrunkParams) SetLimit(Limitint) *ListTrunkParams

func (*ListTrunkParams)SetPageSize

func (params *ListTrunkParams) SetPageSize(PageSizeint) *ListTrunkParams

typeListTrunkResponse

type ListTrunkResponse struct {Trunks []TrunkingV1Trunk              `json:"trunks,omitempty"`MetaListCredentialListResponseMeta `json:"meta,omitempty"`}

ListTrunkResponse struct for ListTrunkResponse

typeTrunkingV1CredentialListadded inv0.14.0

type TrunkingV1CredentialList struct {// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialList resource.AccountSid *string `json:"account_sid,omitempty"`// The unique string that we created to identify the CredentialList resource.Sid *string `json:"sid,omitempty"`// The SID of the Trunk the credential list in associated with.TrunkSid *string `json:"trunk_sid,omitempty"`// The string that you assigned to describe the resource.FriendlyName *string `json:"friendly_name,omitempty"`// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateCreated *time.Time `json:"date_created,omitempty"`// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateUpdated *time.Time `json:"date_updated,omitempty"`// The absolute URL of the resource.Url *string `json:"url,omitempty"`}

TrunkingV1CredentialList struct for TrunkingV1CredentialList

typeTrunkingV1IpAccessControlListadded inv0.14.0

type TrunkingV1IpAccessControlList struct {// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlList resource.AccountSid *string `json:"account_sid,omitempty"`// The unique string that we created to identify the IpAccessControlList resource.Sid *string `json:"sid,omitempty"`// The SID of the Trunk the resource is associated with.TrunkSid *string `json:"trunk_sid,omitempty"`// The string that you assigned to describe the resource.FriendlyName *string `json:"friendly_name,omitempty"`// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateCreated *time.Time `json:"date_created,omitempty"`// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateUpdated *time.Time `json:"date_updated,omitempty"`// The absolute URL of the resource.Url *string `json:"url,omitempty"`}

TrunkingV1IpAccessControlList struct for TrunkingV1IpAccessControlList

typeTrunkingV1OriginationUrladded inv0.14.0

type TrunkingV1OriginationUrl struct {// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OriginationUrl resource.AccountSid *string `json:"account_sid,omitempty"`// The unique string that we created to identify the OriginationUrl resource.Sid *string `json:"sid,omitempty"`// The SID of the Trunk that owns the Origination URL.TrunkSid *string `json:"trunk_sid,omitempty"`// The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.Weightint `json:"weight,omitempty"`// Whether the URL is enabled. The default is `true`.Enabled *bool `json:"enabled,omitempty"`// The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema.SipUrl *string `json:"sip_url,omitempty"`// The string that you assigned to describe the resource.FriendlyName *string `json:"friendly_name,omitempty"`// The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.Priorityint `json:"priority,omitempty"`// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateCreated *time.Time `json:"date_created,omitempty"`// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateUpdated *time.Time `json:"date_updated,omitempty"`// The absolute URL of the resource.Url *string `json:"url,omitempty"`}

TrunkingV1OriginationUrl struct for TrunkingV1OriginationUrl

typeTrunkingV1PhoneNumberadded inv0.14.0

type TrunkingV1PhoneNumber struct {// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the PhoneNumber resource.AccountSid          *string `json:"account_sid,omitempty"`AddressRequirements *string `json:"address_requirements,omitempty"`// The API version used to start a new TwiML session.ApiVersion *string `json:"api_version,omitempty"`// Whether the phone number is new to the Twilio platform. Can be: `true` or `false`.Beta *bool `json:"beta,omitempty"`// The set of Boolean properties that indicate whether a phone number can receive calls or messages.  Capabilities are  `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`.Capabilities *map[string]interface{} `json:"capabilities,omitempty"`// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateCreated *time.Time `json:"date_created,omitempty"`// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateUpdated *time.Time `json:"date_updated,omitempty"`// The string that you assigned to describe the resource.FriendlyName *string `json:"friendly_name,omitempty"`// The URLs of related resources.Links *map[string]interface{} `json:"links,omitempty"`// The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.PhoneNumber *string `json:"phone_number,omitempty"`// The unique string that we created to identify the PhoneNumber resource.Sid *string `json:"sid,omitempty"`// The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.SmsApplicationSid *string `json:"sms_application_sid,omitempty"`// The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.SmsFallbackMethod *string `json:"sms_fallback_method,omitempty"`// The URL that we call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML from `sms_url`.SmsFallbackUrl *string `json:"sms_fallback_url,omitempty"`// The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.SmsMethod *string `json:"sms_method,omitempty"`// The URL we call using the `sms_method` when the phone number receives an incoming SMS message.SmsUrl *string `json:"sms_url,omitempty"`// The URL we call using the `status_callback_method` to send status information to your application.StatusCallback *string `json:"status_callback,omitempty"`// The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.StatusCallbackMethod *string `json:"status_callback_method,omitempty"`// The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice URLs and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.TrunkSid *string `json:"trunk_sid,omitempty"`// The absolute URL of the resource.Url *string `json:"url,omitempty"`// The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice URLs and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.VoiceApplicationSid *string `json:"voice_application_sid,omitempty"`// Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`.VoiceCallerIdLookup *bool `json:"voice_caller_id_lookup,omitempty"`// The HTTP method that we use to call `voice_fallback_url`. Can be: `GET` or `POST`.VoiceFallbackMethod *string `json:"voice_fallback_method,omitempty"`// The URL that we call using the `voice_fallback_method` when an error occurs retrieving or executing the TwiML requested by `url`.VoiceFallbackUrl *string `json:"voice_fallback_url,omitempty"`// The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.VoiceMethod *string `json:"voice_method,omitempty"`// The URL we call using the `voice_method` when the phone number receives a call. The `voice_url` is not be used if a `voice_application_sid` or a `trunk_sid` is set.VoiceUrl *string `json:"voice_url,omitempty"`}

TrunkingV1PhoneNumber struct for TrunkingV1PhoneNumber

typeTrunkingV1Recordingadded inv0.14.0

type TrunkingV1Recording struct {Mode *string `json:"mode,omitempty"`Trim *string `json:"trim,omitempty"`}

TrunkingV1Recording struct for TrunkingV1Recording

typeTrunkingV1Trunk

type TrunkingV1Trunk struct {// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Trunk resource.AccountSid *string `json:"account_sid,omitempty"`// The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.DomainName *string `json:"domain_name,omitempty"`// The HTTP method we use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.DisasterRecoveryMethod *string `json:"disaster_recovery_method,omitempty"`// The URL we call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from this URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.DisasterRecoveryUrl *string `json:"disaster_recovery_url,omitempty"`// The string that you assigned to describe the resource.FriendlyName *string `json:"friendly_name,omitempty"`// Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.Secure *bool `json:"secure,omitempty"`// The recording settings for the trunk. Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to `record-from-ringing` or `record-from-answer`, all calls going through the trunk will be recorded. The only way to change recording parameters is on a sub-resource of a Trunk after it has been created. e.g.`/Trunks/[Trunk_SID]/Recording -XPOST -d'Mode=record-from-answer'`. See [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more information.Recording        *interface{} `json:"recording,omitempty"`TransferMode     *string      `json:"transfer_mode,omitempty"`TransferCallerId *string      `json:"transfer_caller_id,omitempty"`// Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.CnamLookupEnabled *bool `json:"cnam_lookup_enabled,omitempty"`// The types of authentication mapped to the domain. Can be: `IP_ACL` and `CREDENTIAL_LIST`. If both are mapped, the values are returned in a comma delimited list. If empty, the domain will not receive any traffic.AuthType *string `json:"auth_type,omitempty"`// Whether Symmetric RTP is enabled for the trunk. When Symmetric RTP is disabled, Twilio will send RTP to the destination negotiated in the SDP. Disabling Symmetric RTP is considered to be more secure and therefore recommended. See [Symmetric RTP](https://www.twilio.com/docs/sip-trunking#symmetric-rtp) for more information.SymmetricRtpEnabled *bool `json:"symmetric_rtp_enabled,omitempty"`// Reserved.AuthTypeSet *[]string `json:"auth_type_set,omitempty"`// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateCreated *time.Time `json:"date_created,omitempty"`// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.DateUpdated *time.Time `json:"date_updated,omitempty"`// The unique string that we created to identify the Trunk resource.Sid *string `json:"sid,omitempty"`// The absolute URL of the resource.Url *string `json:"url,omitempty"`// The URLs of related resources.Links *map[string]interface{} `json:"links,omitempty"`}

TrunkingV1Trunk struct for TrunkingV1Trunk

typeUpdateOriginationUrlParams

type UpdateOriginationUrlParams struct {// The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.Weight *int `json:"Weight,omitempty"`// The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.Priority *int `json:"Priority,omitempty"`// Whether the URL is enabled. The default is `true`.Enabled *bool `json:"Enabled,omitempty"`// A descriptive string that you create to describe the resource. It can be up to 64 characters long.FriendlyName *string `json:"FriendlyName,omitempty"`// The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported.SipUrl *string `json:"SipUrl,omitempty"`}

Optional parameters for the method 'UpdateOriginationUrl'

func (*UpdateOriginationUrlParams)SetEnabled

func (*UpdateOriginationUrlParams)SetFriendlyName

func (params *UpdateOriginationUrlParams) SetFriendlyName(FriendlyNamestring) *UpdateOriginationUrlParams

func (*UpdateOriginationUrlParams)SetPriority

func (params *UpdateOriginationUrlParams) SetPriority(Priorityint) *UpdateOriginationUrlParams

func (*UpdateOriginationUrlParams)SetSipUrl

func (*UpdateOriginationUrlParams)SetWeight

typeUpdateRecordingParams

type UpdateRecordingParams struct {//Mode *string `json:"Mode,omitempty"`//Trim *string `json:"Trim,omitempty"`}

Optional parameters for the method 'UpdateRecording'

func (*UpdateRecordingParams)SetMode

func (*UpdateRecordingParams)SetTrim

typeUpdateTrunkParams

type UpdateTrunkParams struct {// A descriptive string that you create to describe the resource. It can be up to 64 characters long.FriendlyName *string `json:"FriendlyName,omitempty"`// The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.DomainName *string `json:"DomainName,omitempty"`// The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"`// The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"`//TransferMode *string `json:"TransferMode,omitempty"`// Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.Secure *bool `json:"Secure,omitempty"`// Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"`//TransferCallerId *string `json:"TransferCallerId,omitempty"`}

Optional parameters for the method 'UpdateTrunk'

func (*UpdateTrunkParams)SetCnamLookupEnabled

func (params *UpdateTrunkParams) SetCnamLookupEnabled(CnamLookupEnabledbool) *UpdateTrunkParams

func (*UpdateTrunkParams)SetDisasterRecoveryMethod

func (params *UpdateTrunkParams) SetDisasterRecoveryMethod(DisasterRecoveryMethodstring) *UpdateTrunkParams

func (*UpdateTrunkParams)SetDisasterRecoveryUrl

func (params *UpdateTrunkParams) SetDisasterRecoveryUrl(DisasterRecoveryUrlstring) *UpdateTrunkParams

func (*UpdateTrunkParams)SetDomainName

func (params *UpdateTrunkParams) SetDomainName(DomainNamestring) *UpdateTrunkParams

func (*UpdateTrunkParams)SetFriendlyName

func (params *UpdateTrunkParams) SetFriendlyName(FriendlyNamestring) *UpdateTrunkParams

func (*UpdateTrunkParams)SetSecure

func (params *UpdateTrunkParams) SetSecure(Securebool) *UpdateTrunkParams

func (*UpdateTrunkParams)SetTransferCallerIdadded inv0.16.0

func (params *UpdateTrunkParams) SetTransferCallerId(TransferCallerIdstring) *UpdateTrunkParams

func (*UpdateTrunkParams)SetTransferMode

func (params *UpdateTrunkParams) SetTransferMode(TransferModestring) *UpdateTrunkParams

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp