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
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the Trunk resource. |
domain_name
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and |
disaster_recovery_method
|
The HTTP method we use to call the |
disaster_recovery_url
|
The URL we call using the |
friendly_name
|
The string that you assigned to describe the resource. |
secure
|
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
|
The recording settings for the trunk. Can be: |
transfer_mode
|
The call transfer settings for the trunk. Can be: |
transfer_caller_id
|
Caller Id for transfer target. Can be: |
cnam_lookup_enabled
|
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. |
auth_type
|
The types of authentication mapped to the domain. Can be: |
auth_type_set
|
Reserved. |
date_created
|
The date and time in GMT when the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in RFC 2822 format. |
sid
|
The unique string that we created to identify the Trunk resource. |
url
|
The absolute URL of the resource. |
links
|
The URLs of related resources. |
Create a Trunk resource
https://trunking.twilio.com/v1/Trunks
パラメーター
Parameters in REST API format | |
---|---|
friendly_name
オプション
|
A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
domain_name
オプション
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and |
disaster_recovery_url
オプション
|
The URL we should call using the |
disaster_recovery_method
オプション
|
The HTTP method we should use to call the |
transfer_mode
オプション
|
The call transfer settings for the trunk. Can be: |
secure
オプション
|
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
オプション
|
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. |
transfer_caller_id
オプション
|
Caller Id for transfer target. Can be: |
例 1
Fetch a Trunk resource
https://trunking.twilio.com/v1/Trunks/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The unique string that we created to identify the Trunk resource to fetch. |
例 1
Read multiple Trunk resources
https://trunking.twilio.com/v1/Trunks
例 1
Update a Trunk resource
https://trunking.twilio.com/v1/Trunks/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The unique string that we created to identify the OriginationUrl resource to update. |
friendly_name
オプション
|
A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
domain_name
オプション
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and |
disaster_recovery_url
オプション
|
The URL we should call using the |
disaster_recovery_method
オプション
|
The HTTP method we should use to call the |
transfer_mode
オプション
|
The call transfer settings for the trunk. Can be: |
secure
オプション
|
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
オプション
|
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. |
transfer_caller_id
オプション
|
Caller Id for transfer target. Can be: |
例 1
Delete a Trunk resource
https://trunking.twilio.com/v1/Trunks/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The unique string that we created to identify the Trunk resource to delete. |
例 1
ヘルプが必要ですか?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.