NAME
Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::Voip - The Voip resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $voip ($client->available_phone_numbers($country_code)->voip->read({}, 20)) {
...
}
DESCRIPTION
Available VoIP phone numbers
This file holds VoipList, VoipPage and VoipInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
VoipList
Returned by $client->available_phone_numbers($country_code)->voip. See also Twilio::ListResource.
read
my @records = $client->available_phone_numbers($country_code)->voip->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
The options are:
area_code-
The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
beta-
Whether to read phone numbers that are new to the Twilio platform. Can be:
trueorfalseand the default istrue. contains-
Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters:
*,%,+,$. The*and%meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use*to match any single character or%to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters, and wildcards cannot be used between non-meta-characters. To match the beginning of a pattern, start the pattern with+. To match the end of the pattern, append the pattern with$. These meta-characters can't be adjacent to each other. distance-
The search radius, in miles, for a
near_query. Can be up to500and the default is25. Applies to only phone numbers in the US and Canada. exclude_all_address_required-
Whether to exclude phone numbers that require an Address. Can be:
trueorfalseand the default isfalse. exclude_foreign_address_required-
Whether to exclude phone numbers that require a foreign Address. Can be:
trueorfalseand the default isfalse. exclude_local_address_required-
Whether to exclude phone numbers that require a local Address. Can be:
trueorfalseand the default isfalse. fax_enabled-
Whether the phone numbers can receive faxes. Can be:
trueorfalse. in_lata-
Limit results to a specific local access and transport area (LATA). Given a phone number, search within the same LATA as that number. Applies to only phone numbers in the US and Canada.
in_locality-
Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
in_postal_code-
Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
in_rate_center-
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_latato be set as well. Applies to only phone numbers in the US and Canada. in_region-
Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
mms_enabled-
Whether the phone numbers can receive MMS messages. Can be:
trueorfalse. near_lat_long-
Given a latitude/longitude pair
lat,longfind geographically close numbers withindistancemiles. Applies to only phone numbers in the US and Canada. near_number-
Given a phone number, find a geographically close number within
distancemiles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. sms_enabled-
Whether the phone numbers can receive text messages. Can be:
trueorfalse. voice_enabled-
Whether the phone numbers can receive calls. Can be:
trueorfalse.
stream
my $stream = $client->available_phone_numbers($country_code)->voip->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->available_phone_numbers($country_code)->voip->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->available_phone_numbers($country_code)->voip->get_page($url);
Fetches the page at a URL given by Twilio.
VoipPage
A Twilio::Page of VoipInstance objects.
records_key
build_instance
Used by Twilio::Page.
VoipInstance
See also Twilio::InstanceResource.
Its fields are:
- address_requirements
-
The type of Address resource the phone number requires. Can be:
none,any,local, orforeign.nonemeans no address is required.anymeans an address is required, but it can be anywhere in the world.localmeans an address in the phone number's country is required.foreignmeans an address outside of the phone number's country is required. - beta
-
Whether the phone number is new to the Twilio platform. Can be:
trueorfalse. - capabilities
-
The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice,SMS, andMMSand each capability can be:trueorfalse. A Twilio::Base::PhoneNumberCapabilities object. - friendly_name
-
A formatted version of the phone number.
- iso_country
-
The ISO country code of this phone number.
- lata
-
The LATA of this phone number. Available for only phone numbers from the US and Canada.
- latitude
-
The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- locality
-
The locality or city of this phone number's location.
- longitude
-
The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- phone_number
-
The phone number in E.164 format, which consists of a + followed by the country code and subscriber number.
- postal_code
-
The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- rate_center
-
The rate center of this phone number. Available for only phone numbers from the US and Canada.
- region
-
The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.