SIP Domain Resource
A SIP Domain resource describes a custom DNS hostname that can accept SIP traffic for your account. A SIP request to that domain, such as to sip:alice@example.sip.twilio.com
, routes to Twilio. Twilio authenticates the request and requests TwiML from the voice_url
of the SIP Domain.
SIP Domain Authentication
Your SIP Domain must map at least one of these two authentication methods or requests to it will be blocked.
SipDomain properties
Names in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the SipDomain resource. |
api_version
|
The API version used to process the call. |
auth_type
|
The types of authentication you have mapped to your domain. Can be: |
date_created
|
The date and time in GMT that the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT that the resource was last updated specified in RFC 2822 format. |
domain_name
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-". |
friendly_name
|
The string that you assigned to describe the resource. |
sid
|
The unique string that that we created to identify the SipDomain resource. |
uri
|
The URI of the resource, relative to |
voice_fallback_method
|
The HTTP method we use to call |
voice_fallback_url
|
The URL that we call when an error occurs while retrieving or executing the TwiML requested from |
voice_method
|
The HTTP method we use to call |
voice_status_callback_method
|
The HTTP method we use to call |
voice_status_callback_url
|
The URL that we call to pass status parameters (such as call ended) to your application. |
voice_url
|
The URL we call using the |
subresource_uris
|
A list of mapping resources associated with the SIP Domain resource identified by their relative URIs. |
sip_registration
|
Whether to allow SIP Endpoints to register with the domain to receive calls. |
Create a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that will create the resource. |
domain_name
必須
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-". |
friendly_name
オプション
|
A descriptive string that you created to describe the resource. It can be up to 64 characters long. |
voice_url
オプション
|
The URL we should when the domain receives a call. |
voice_method
オプション
|
The HTTP method we should use to call |
voice_fallback_url
オプション
|
The URL that we should call when an error occurs while retrieving or executing the TwiML from |
voice_fallback_method
オプション
|
The HTTP method we should use to call |
voice_status_callback_url
オプション
|
The URL that we should call to pass status parameters (such as call ended) to your application. |
voice_status_callback_method
オプション
|
The HTTP method we should use to call |
sip_registration
オプション
|
Whether to allow SIP Endpoints to register with the domain to receive calls. Can be |
例 1
Fetch a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resource to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. |
例 1
Read multiple SipDomain resources
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resources to read. |
例 1
Update a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resource to update. |
sid
Path
|
The Twilio-provided string that uniquely identifies the SipDomain resource to update. |
friendly_name
オプション
|
A descriptive string that you created to describe the resource. It can be up to 64 characters long. |
voice_fallback_method
オプション
|
The HTTP method we should use to call |
voice_fallback_url
オプション
|
The URL that we should call when an error occurs while retrieving or executing the TwiML requested by |
voice_method
オプション
|
The HTTP method we should use to call |
voice_status_callback_method
オプション
|
The HTTP method we should use to call |
voice_status_callback_url
オプション
|
The URL that we should call to pass status parameters (such as call ended) to your application. |
voice_url
オプション
|
The URL we should call when the domain receives a call. |
sip_registration
オプション
|
Whether to allow SIP Endpoints to register with the domain to receive calls. Can be |
domain_name
オプション
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-". |
例 1
Delete a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resources to delete. |
sid
Path
|
The Twilio-provided string that uniquely identifies the SipDomain resource to delete. |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。