メニュー

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?

PhoneNumber Resource

The Phone Numbers subresource contains the list of Phone Number instances associated with a SIP Trunk.

To purchase a new phone number for your trunk or manage your numbers more generally, you'll need to use the IncomingPhoneNumbers Resource. The SIP Trunking PhoneNumbers Resource is only for adding, removing, and viewing phone numbers associated with a SIP Trunk.

PhoneNumber properties

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the PhoneNumber resource.

addressRequirements
enum:address_requirement Not PII

Whether the phone number requires an Address registered with Twilio and, if so, what type. Can be: none, any, local, or foreign.

apiVersion
文字列 Not PII

The API version used to start a new TwiML session.

beta
boolean Not PII

Whether the phone number is new to the Twilio platform. Can be: true or false.

capabilities
string_map Not PII

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.

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.

friendlyName
文字列 PII MTL: 30 DAYS

The string that you assigned to describe the resource.

links
uri_map Not PII

The URLs of related resources.

phoneNumber
phone_number Not PII

The phone number in E.164 format, which consists of a + followed by the country code and subscriber number.

sid
sid<PN> Not PII

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

smsApplicationSid
sid<AP> Not PII

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.

smsFallbackMethod
http_method Not PII

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

smsFallbackUrl
url Not PII

The URL that we call using the sms_fallback_method when an error occurs while retrieving or executing the TwiML from sms_url.

smsMethod
http_method Not PII

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

smsUrl
url Not PII

The URL we call using the sms_method when the phone number receives an incoming SMS message.

statusCallback
url Not PII

The URL we call using the status_callback_method to send status information to your application.

statusCallbackMethod
http_method Not PII

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

trunkSid
sid<TR> Not PII

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.

url
url Not PII

The absolute URL of the resource.

voiceApplicationSid
sid<AP> Not PII

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.

voiceCallerIdLookup
boolean Not PII

Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: true or false.

voiceFallbackMethod
http_method Not PII

The HTTP method that we use to call voice_fallback_url. Can be: GET or POST.

voiceFallbackUrl
url Not PII

The URL that we call using the voice_fallback_method when an error occurs retrieving or executing the TwiML requested by url.

voiceMethod
http_method Not PII

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

voiceUrl
url Not PII

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.

Create a PhoneNumber resource

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

The SID of the Trunk to associate the phone number with.

phone_number_sid
必須
post sid<PN> Not PII

The SID of the Incoming Phone Number that you want to associate with the trunk.

        
        
        
        

        Read multiple PhoneNumber resources

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

        The SID of the Trunk from which to read the PhoneNumber resources.

              
              
              
              

              Delete a PhoneNumber resource

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

              The SID of the Trunk from which to delete the PhoneNumber resource.

              sid
              必須
              削除する sid<PN> Not PII

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

                    
                    
                    
                    
                    Rate this page:

                    ヘルプが必要ですか?

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