NAME

Twilio::Rest::Routes::V2::Trunk - The Trunk resource

SYNOPSIS

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

my $trunk = $client->routes->v2->trunks($sip_trunk_domain)->fetch;
$client->routes->v2->trunks($sip_trunk_domain)->update(\%options);

DESCRIPTION

This file holds TrunkList, TrunkContext and TrunkInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

TrunkList

Returned by $client->routes->v2->trunks. See also Twilio::ListResource.

get_context

my $context = $client->routes->v2->trunks->get_context($sip_trunk_domain);

Returns a TrunkContext, and makes no request.

TrunkContext

Returned by $client->routes->v2->trunks($sip_trunk_domain). It makes no request until one of these methods is called.

fetch

my $trunk = $client->routes->v2->trunks($sip_trunk_domain)->fetch;

Fetch the Inbound Processing Region assigned to a SIP Trunk. Returns a TrunkInstance.

update

my $trunk = $client->routes->v2->trunks($sip_trunk_domain)->update(\%options);

Assign an Inbound Processing Region to a SIP Trunk. Returns a TrunkInstance.

The options are:

friendly_name

A human readable description of this resource, up to 64 characters.

voice_region

The Inbound Processing Region used for this SIP Trunk for voice

TrunkInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The unique SID identifier of the Account.

date_created

The date that this SIP Trunk was assigned an Inbound Processing Region, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that the Inbound Processing Region was updated for this SIP Trunk, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

A human readable description of the Inbound Processing Region assignments for this SIP Trunk, up to 64 characters.

sid

A 34 character string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk.

sip_trunk_domain

The absolute URL of the SIP Trunk

url

The absolute URL of the resource.

voice_region

The Inbound Processing Region used for this SIP Trunk for voice.

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.