メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Trunk Resource

The Trunk resource represents a SIP Trunk in your Twilio account. A Trunk can have associated Credential Lists, IP Access Control Lists, Origination URLs, and Phone Numbers.

SIP トランクの作成および使用方法については、クイックスタートガイドをご覧ください。

Trunk properties

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Trunk resource.

domainName
文字列 Not PII

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 for more information.

disasterRecoveryMethod
http_method Not PII

The HTTP method we use to call the disaster_recovery_url. Can be: GET or POST.

disasterRecoveryUrl

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 for more information.

friendlyName
文字列 Not PII

The string that you assigned to describe the resource.

secure
boolean Not PII

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 for more information.

recording
オブジェクト Not PII

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 for more information.

cnamLookupEnabled
boolean Not PII

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 for more information.

authType
文字列 Not PII

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.

authTypeSet
string[] Not PII

Reserved.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

sid
sid<TR> Not PII

The unique string that we created to identify the Trunk resource.

url
url Not PII

The absolute URL of the resource.

links
uri_map Not PII

The URLs of related resources.

Create a Trunk resource

post
https://trunking.twilio.com/v1/Trunks
パラメーター
Names in None format
friendly_name
オプション
post 文字列 Not PII

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

domain_name
オプション
post 文字列 Not PII

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 for more information.

disaster_recovery_url
オプション
post url PII MTL: 30 DAYS

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 for more information.

disaster_recovery_method
オプション
post http_method Not PII

The HTTP method we should use to call the disaster_recovery_url. Can be: GET or POST.

recording
オプション
post enum:recording_setting Not PII

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 for more information.

secure
オプション
post boolean Not PII

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 for more information.

cnam_lookup_enabled
オプション
post boolean Not PII

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 for more information.

        
        
        
        

        Fetch a Trunk resource

        GET
        https://trunking.twilio.com/v1/Trunks/{Sid}
        パラメーター
        Names in None format
        sid
        必須
        GET sid<TR> Not PII

        The unique string that we created to identify the Trunk resource to fetch.

              
              
              
              

              Read multiple Trunk resources

              GET
              https://trunking.twilio.com/v1/Trunks
                    
                    
                    
                    

                    Update a Trunk resource

                    post
                    https://trunking.twilio.com/v1/Trunks/{Sid}
                    パラメーター
                    Names in None format
                    sid
                    必須
                    post sid<TR> Not PII

                    The unique string that we created to identify the OriginationUrl resource to update.

                    friendly_name
                    オプション
                    post 文字列 Not PII

                    A descriptive string that you create to describe the resource. It can be up to 64 characters long.

                    domain_name
                    オプション
                    post 文字列 Not PII

                    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 for more information.

                    disaster_recovery_url
                    オプション
                    post url PII MTL: 30 DAYS

                    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 for more information.

                    disaster_recovery_method
                    オプション
                    post http_method Not PII

                    The HTTP method we should use to call the disaster_recovery_url. Can be: GET or POST.

                    recording
                    オプション
                    post enum:recording_setting Not PII

                    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. See Recording for more information.

                    secure
                    オプション
                    post boolean Not PII

                    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 for more information.

                    cnam_lookup_enabled
                    オプション
                    post boolean Not PII

                    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 for more information.

                          
                          
                          
                          

                          Delete a Trunk resource

                          削除する
                          https://trunking.twilio.com/v1/Trunks/{Sid}
                          パラメーター
                          Names in None format
                          sid
                          必須
                          削除する sid<TR> Not PII

                          The unique string that we created to identify the Trunk resource to delete.

                                
                                
                                
                                
                                Rate this page:

                                ヘルプが必要ですか?

                                誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。