IncomingPhoneNumbers
Create, update, delete, and query phone numbers purchased from Twilio.
Table-Specific Information
SELECT
The provider uses the Twilio API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the provider.
| Column | Supported Operators |
| Sid | = |
| Name | = |
| PhoneNumber | = |
| Beta | = |
| Origin | = |
For example:
SELECT * FROM IncomingPhoneNumbers WHERE Sid = 'X123456789'
INSERT
To add an IncomingPhoneNumber, specify only one of the following columns: PhoneNumber or AreaCode. If you include both columns, Twilio uses the AreaCode column and ignores the PhoneNumber provided.
INSERT INTO IncomingPhoneNumbers (PhoneNumber, AreaCode) VALUES ('+15105555555', '123')
UPDATE
The following is an example of how to update the IncomingPhoneNumbers table:UPDATE IncomingPhoneNumbers SET Name = 'appp8' WHERE Sid = 'X123456789'
DELETE
The following is an example of how to delete from the IncomingPhoneNumbers table:DELETE FROM IncomingPhoneNumbers WHERE Sid = 'X123456789'
Columns
| Name | Type | ReadOnly | References | Description |
| Sid [KEY] | String | True |
The Id of the phone number. | |
| AccountSid | String | False |
The account Id of the phone number. | |
| Name | String | False |
The friendly name of the phone number. By default, this is a formatted phone number. | |
| PhoneNumber | String | False |
The phone number. | |
| VoiceUrl | String | False |
The URL Twilio will request when the phone number receives a call. | |
| VoiceMethod | String | False |
The HTTP method Twilio will use to make the request to the voice URL. | |
| VoiceFallbackUrl | String | False |
The URL Twilio will request when an error occurs requesting the voice URL. | |
| VoiceFallbackMethod | String | False |
The HTTP method to use to request the fallback voice URL. | |
| VoiceCallerIdLookup | Boolean | False |
Whether to look up the caller Id from the CNAM database. | |
| DateCreated | Datetime | True |
The creation date of the phone number. | |
| DateUpdated | Datetime | True |
The modification date of the phone number. | |
| SmsUrl | String | False |
The URL Twilio will request when the phone number receives an SMS message. | |
| SmsMethod | String | False |
The HTTP method Twilio will use to make requests to the SMS URL. | |
| SmsFallbackUrl | String | False |
The URL Twilio will request when an error occurs requesting the SMS URL. | |
| SmsFallbackMethod | String | False |
The HTTP method Twilio will use to request the fallback SMS URL of the phone number. | |
| AddressRequirements | String | True |
The address requirements for the phone number. Eligible values are: none, any, local, or foreign. | |
| Beta | String | True |
Whether the phone number is a beta phone number new to Twilio. | |
| CapabilitiesVoice | Boolean | True |
Whether the phone number supports voice. | |
| CapabilitiesSms | Boolean | True |
Whether the phone number supports SMS. | |
| CapabilitiesMms | Boolean | True |
Whether the phone number supports MMS. | |
| StatusCallback | String | False |
The URL where Twilio will pass status parameters about calls received by the phone number. | |
| StatusCallbackMethod | String | False |
The HTTP method that Twilio will use to make requests to the status callback URL. | |
| ApiVersion | String | False |
The API version of the phone number. | |
| VoiceApplicationSid | String | False |
The voice application Id of the phone number. This can be used in place of the voice URLs. | |
| SmsApplicationSid | String | False |
The SMS application Id of the phone number. This can be used in place of the SMS URLs. | |
| TrunkSid | String | False |
The trunk Id of the phone number. This overrides VoiceApplicationId and the voice URLs. | |
| Uri | String | True |
The URI of the phone number. | |
| AddressSid | String | False |
The SID of the Address resource associated with the phone number. | |
| IdentitySid | String | False |
The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. | |
| Origin | String | True |
The phone number's origin. twilio identifies Twilio-owned phone numbers and hosted identifies hosted phone numbers. | |
| VoiceReceiveMode | String | False |
Mode of Received voice. The allowed values are voice, fax. | |
| CapabilitiesFax | Boolean | True |
Whether the phone number supports fax. | |
| EmergencyStatus | String | False |
The emergency calling status of this phone number. The allowed values are Active, Inactive. | |
| EmergencyAddressSid | String | False |
The SID of the emergency address configuration that we use for emergency calling from this phone number. | |
| EmergencyAddressStatus | String | True |
The status of address registration with emergency services. The allowed values are registered, unregistered, pending-registration, registration-failure, pending-unregistration, unregistration-failure. | |
| BundleSid | String | False |
The SID of the Bundle resource that you associate with the phone number. | |
| Status | String | True |
The status of the phone number. |
Pseudocolumns
Pseudocolumn fields can be used in SELECT, INSERT, and UPDATE statements to provide additional control over data retrieval and modification in the data source.
| Name | Type | Description |
| AreaCode | String |
The desired area code for your new incoming phone number. Any three digit, US or Canada area code is valid. This column will work only with INSERT. |
| Category | String |
The category of the phone number. Possible values are Local, Mobile and TollFree. The allowed values are Local, Mobile, TollFree. |