NAME

Twilio::Rest::Voice::V1::SourceIpMapping - The SourceIpMapping resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $source_ip_mapping = $client->voice->v1->source_ip_mappings->create($ip_record_sid, $sip_domain_sid);
for my $source_ip_mapping ($client->voice->v1->source_ip_mappings->read({}, 20)) {
  ...
}
my $source_ip_mapping = $client->voice->v1->source_ip_mappings($sid)->fetch;
$client->voice->v1->source_ip_mappings($sid)->update($sip_domain_sid);
$client->voice->v1->source_ip_mappings($sid)->delete;

DESCRIPTION

With Source IP Mappings, Twilio can recognize your SIP requests based on where they are sent from. The Request-URI no longer has to have the FQDN (Fully Qualified Domain Name) of your SIP Domain.

This file holds SourceIpMappingList, SourceIpMappingPage, SourceIpMappingContext and SourceIpMappingInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

SourceIpMappingList

Returned by $client->voice->v1->source_ip_mappings. See also Twilio::ListResource.

create

my $source_ip_mapping = $client->voice->v1->source_ip_mappings->create($ip_record_sid, $sip_domain_sid);

Returns a SourceIpMappingInstance.

The required values are:

$ip_record_sid

The Twilio-provided string that uniquely identifies the IP Record resource to map from.

$sip_domain_sid

The SID of the SIP Domain that the IP Record should be mapped to.

read

my @records = $client->voice->v1->source_ip_mappings->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->voice->v1->source_ip_mappings->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->voice->v1->source_ip_mappings->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->voice->v1->source_ip_mappings->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->voice->v1->source_ip_mappings->get_context($sid);

Returns a SourceIpMappingContext, and makes no request.

SourceIpMappingPage

A Twilio::Page of SourceIpMappingInstance objects.

records_key

build_instance

Used by Twilio::Page.

SourceIpMappingContext

Returned by $client->voice->v1->source_ip_mappings($sid). It makes no request until one of these methods is called.

fetch

my $source_ip_mapping = $client->voice->v1->source_ip_mappings($sid)->fetch;

Returns a SourceIpMappingInstance.

update

my $source_ip_mapping = $client->voice->v1->source_ip_mappings($sid)->update($sip_domain_sid);

Returns a SourceIpMappingInstance.

The required values are:

$sip_domain_sid

The SID of the SIP Domain that the IP Record should be mapped to.

delete

$client->voice->v1->source_ip_mappings($sid)->delete;

Returns true.

SourceIpMappingInstance

See also Twilio::InstanceResource.

It has fetch, update and delete, which work as they do on the context.

Its fields are:

date_created

The date and time in GMT that the resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT that the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

ip_record_sid

The Twilio-provided string that uniquely identifies the IP Record resource to map from.

sid

The unique string that we created to identify the IP Record resource.

sip_domain_sid

The SID of the SIP Domain that the IP Record is mapped to.

url

The absolute URL of the 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.