NAME

Twilio::Jwt::Grants::VoiceGrant - Lets a client make and receive calls

SYNOPSIS

my $grant = Twilio::Jwt::Grants::VoiceGrant->new;
$grant->set_outgoing_application($application_sid, { caller => 'alice' });
$grant->set_incoming_allow(1);

$token->add_grant($grant);

DESCRIPTION

See Twilio::Jwt::AccessToken. Each set_ method returns the grant.

METHODS

get_grant_key

Returns voice.

get_payload

Returns what the grant adds to the token.

set_outgoing_application

$grant->set_outgoing_application($sid, \%params);

Sets the TwiML application for outgoing calls, and the parameters it receives.

get_outgoing_application_params

Returns those parameters.

get_incoming_allow

set_incoming_allow

get_outgoing_application_sid

set_outgoing_application_sid

get_push_credential_sid

set_push_credential_sid

get_endpoint_id

set_endpoint_id

Read and change each value.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.