NAME
Twilio::Rest::Voice::V1::DialingPermissions::Country - The Country resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $country ($client->voice->v1->dialing_permissions->countries->read({}, 20)) {
...
}
my $country = $client->voice->v1->dialing_permissions->countries($iso_code)->fetch;
DESCRIPTION
This file holds CountryList, CountryPage, CountryContext and CountryInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
CountryList
Returned by $client->voice->v1->dialing_permissions->countries. See also Twilio::ListResource.
read
my @records = $client->voice->v1->dialing_permissions->countries->read(\%options, $limit, $page_size);
Retrieve all voice dialing country permissions for this account. Returns the records as a list, fetching as many pages as it needs.
The options are:
continent-
Filter to retrieve the country permissions by specifying the continent
country_code-
Filter the results by specified country codes
high_risk_special_numbers_enabled-
Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be:
trueorfalse high_risk_tollfraud_numbers_enabled-
Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled. Can be:
trueorfalse. iso_code-
Filter to retrieve the country permissions by specifying the ISO country code
low_risk_numbers_enabled-
Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be:
trueorfalse.
stream
my $stream = $client->voice->v1->dialing_permissions->countries->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->voice->v1->dialing_permissions->countries->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->voice->v1->dialing_permissions->countries->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->voice->v1->dialing_permissions->countries->get_context($iso_code);
Returns a CountryContext, and makes no request.
CountryPage
A Twilio::Page of CountryInstance objects.
records_key
build_instance
Used by Twilio::Page.
CountryContext
Returned by $client->voice->v1->dialing_permissions->countries($iso_code). It makes no request until one of these methods is called.
fetch
my $country = $client->voice->v1->dialing_permissions->countries($iso_code)->fetch;
Retrieve voice dialing country permissions identified by the given ISO country code. Returns a CountryInstance.
highrisk_special_prefixes
my $list = $object->highrisk_special_prefixes;
See Twilio::Rest::Voice::V1::DialingPermissions::Country::HighriskSpecialPrefix.
CountryInstance
See also Twilio::InstanceResource.
It has fetch and highrisk_special_prefixes, which work as they do on the context.
Its fields are:
- continent
-
The name of the continent in which the country is located.
- country_codes
-
The E.164 assigned country codes(s)
- high_risk_special_numbers_enabled
-
Whether dialing to high-risk special services numbers is enabled. These prefixes include number ranges allocated by the country and include premium numbers, special services, shared cost, and others
- high_risk_tollfraud_numbers_enabled
-
Whether dialing to high-risk toll fraud numbers is enabled. These prefixes include narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks, also known as toll fraud. These prefixes are collected from anti-fraud databases and verified by analyzing calls on our network. These prefixes are not available for download and are updated frequently
- iso_code
-
The ISO country code.
- links
-
A list of URLs related to this resource.
- low_risk_numbers_enabled
-
Whether dialing to low-risk numbers is enabled.
- name
-
The name of the country.
- url
-
The absolute URL of this resource.
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.