twilio.rest.voice.v1 package

Submodules

twilio.rest.voice.v1.byoc_trunk module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/voice/v1/byoc_trunk.py:docstring of twilio.rest.voice.v1.byoc_trunk, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.voice.v1.byoc_trunk.ByocTrunkContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the ByocTrunkInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ByocTrunkInstance

Returns:The fetched ByocTrunkInstance
Return type:twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance
update(friendly_name=<object object>, voice_url=<object object>, voice_method=<object object>, voice_fallback_url=<object object>, voice_fallback_method=<object object>, status_callback_url=<object object>, status_callback_method=<object object>, cnam_lookup_enabled=<object object>, connection_policy_sid=<object object>, from_domain_sid=<object object>)[source]

Update the ByocTrunkInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • voice_url (unicode) – The URL we should call when receiving a call
  • voice_method (unicode) – The HTTP method we should use with voice_url
  • voice_fallback_url (unicode) – The URL we should call when an error occurs in executing TwiML
  • voice_fallback_method (unicode) – The HTTP method used with voice_fallback_url
  • status_callback_url (unicode) – The URL that we should call to pass status updates
  • status_callback_method (unicode) – The HTTP method we should use to call status_callback_url
  • cnam_lookup_enabled (bool) – Whether Caller ID Name (CNAM) lookup is enabled for the trunk
  • connection_policy_sid (unicode) – Origination Connection Policy (to your Carrier)
  • from_domain_sid (unicode) – The SID of the SIP Domain that should be used in the From header of originating calls
Returns:

The updated ByocTrunkInstance

Return type:

twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance

class twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
cnam_lookup_enabled
Returns:Whether Caller ID Name (CNAM) lookup is enabled for the trunk
Return type:bool
connection_policy_sid
Returns:Origination Connection Policy (to your Carrier)
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT that the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT that the resource was last updated
Return type:datetime
delete()[source]

Deletes the ByocTrunkInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ByocTrunkInstance

Returns:The fetched ByocTrunkInstance
Return type:twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
from_domain_sid
Returns:The SID of the SIP Domain that should be used in the From header of originating calls
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
status_callback_method
Returns:The HTTP method we use to call status_callback_url
Return type:unicode
status_callback_url
Returns:The URL that we call with status updates
Return type:unicode
update(friendly_name=<object object>, voice_url=<object object>, voice_method=<object object>, voice_fallback_url=<object object>, voice_fallback_method=<object object>, status_callback_url=<object object>, status_callback_method=<object object>, cnam_lookup_enabled=<object object>, connection_policy_sid=<object object>, from_domain_sid=<object object>)[source]

Update the ByocTrunkInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • voice_url (unicode) – The URL we should call when receiving a call
  • voice_method (unicode) – The HTTP method we should use with voice_url
  • voice_fallback_url (unicode) – The URL we should call when an error occurs in executing TwiML
  • voice_fallback_method (unicode) – The HTTP method used with voice_fallback_url
  • status_callback_url (unicode) – The URL that we should call to pass status updates
  • status_callback_method (unicode) – The HTTP method we should use to call status_callback_url
  • cnam_lookup_enabled (bool) – Whether Caller ID Name (CNAM) lookup is enabled for the trunk
  • connection_policy_sid (unicode) – Origination Connection Policy (to your Carrier)
  • from_domain_sid (unicode) – The SID of the SIP Domain that should be used in the From header of originating calls
Returns:

The updated ByocTrunkInstance

Return type:

twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance

url
Returns:The absolute URL of the resource
Return type:unicode
voice_fallback_method
Returns:The HTTP method used with voice_fallback_url
Return type:unicode
voice_fallback_url
Returns:The URL we call when an error occurs while executing TwiML
Return type:unicode
voice_method
Returns:The HTTP method to use with voice_url
Return type:unicode
voice_url
Returns:The URL we call when receiving a call
Return type:unicode
class twilio.rest.voice.v1.byoc_trunk.ByocTrunkList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name=<object object>, voice_url=<object object>, voice_method=<object object>, voice_fallback_url=<object object>, voice_fallback_method=<object object>, status_callback_url=<object object>, status_callback_method=<object object>, cnam_lookup_enabled=<object object>, connection_policy_sid=<object object>, from_domain_sid=<object object>)[source]

Create the ByocTrunkInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • voice_url (unicode) – The URL we should call when receiving a call
  • voice_method (unicode) – The HTTP method to use with voice_url
  • voice_fallback_url (unicode) – The URL we should call when an error occurs in executing TwiML
  • voice_fallback_method (unicode) – The HTTP method to use with voice_fallback_url
  • status_callback_url (unicode) – The URL that we should call to pass status updates
  • status_callback_method (unicode) – The HTTP method we should use to call status_callback_url
  • cnam_lookup_enabled (bool) – Whether Caller ID Name (CNAM) lookup is enabled for the trunk
  • connection_policy_sid (unicode) – Origination Connection Policy (to your Carrier)
  • from_domain_sid (unicode) – The SID of the SIP Domain that should be used in the From header of originating calls
Returns:

The created ByocTrunkInstance

Return type:

twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance

get(sid)[source]

Constructs a ByocTrunkContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.voice.v1.byoc_trunk.ByocTrunkContext
Return type:twilio.rest.voice.v1.byoc_trunk.ByocTrunkContext
get_page(target_url)[source]

Retrieve a specific page of ByocTrunkInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ByocTrunkInstance
Return type:twilio.rest.voice.v1.byoc_trunk.ByocTrunkPage
list(limit=None, page_size=None)[source]

Lists ByocTrunkInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of ByocTrunkInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of ByocTrunkInstance

Return type:

twilio.rest.voice.v1.byoc_trunk.ByocTrunkPage

stream(limit=None, page_size=None)[source]

Streams ByocTrunkInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance]

class twilio.rest.voice.v1.byoc_trunk.ByocTrunkPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ByocTrunkInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance
Return type:twilio.rest.voice.v1.byoc_trunk.ByocTrunkInstance

twilio.rest.voice.v1.ip_record module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/voice/v1/ip_record.py:docstring of twilio.rest.voice.v1.ip_record, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.voice.v1.ip_record.IpRecordContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the IpRecordInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the IpRecordInstance

Returns:The fetched IpRecordInstance
Return type:twilio.rest.voice.v1.ip_record.IpRecordInstance
update(friendly_name=<object object>)[source]

Update the IpRecordInstance

Parameters:friendly_name (unicode) – A string to describe the resource
Returns:The updated IpRecordInstance
Return type:twilio.rest.voice.v1.ip_record.IpRecordInstance
class twilio.rest.voice.v1.ip_record.IpRecordInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
cidr_prefix_length
Returns:An integer representing the length of the CIDR prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT that the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT that the resource was last updated
Return type:datetime
delete()[source]

Deletes the IpRecordInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the IpRecordInstance

Returns:The fetched IpRecordInstance
Return type:twilio.rest.voice.v1.ip_record.IpRecordInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
ip_address
Returns:An IP address in dotted decimal notation, IPv4 only.
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
update(friendly_name=<object object>)[source]

Update the IpRecordInstance

Parameters:friendly_name (unicode) – A string to describe the resource
Returns:The updated IpRecordInstance
Return type:twilio.rest.voice.v1.ip_record.IpRecordInstance
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.voice.v1.ip_record.IpRecordList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(ip_address, friendly_name=<object object>, cidr_prefix_length=<object object>)[source]

Create the IpRecordInstance

Parameters:
  • ip_address (unicode) – An IP address in dotted decimal notation, IPv4 only.
  • friendly_name (unicode) – A string to describe the resource
  • cidr_prefix_length (unicode) –

    An integer representing the length of the CIDR prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.

Returns:

The created IpRecordInstance

Return type:

twilio.rest.voice.v1.ip_record.IpRecordInstance

get(sid)[source]

Constructs a IpRecordContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.voice.v1.ip_record.IpRecordContext
Return type:twilio.rest.voice.v1.ip_record.IpRecordContext
get_page(target_url)[source]

Retrieve a specific page of IpRecordInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of IpRecordInstance
Return type:twilio.rest.voice.v1.ip_record.IpRecordPage
list(limit=None, page_size=None)[source]

Lists IpRecordInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.voice.v1.ip_record.IpRecordInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of IpRecordInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of IpRecordInstance

Return type:

twilio.rest.voice.v1.ip_record.IpRecordPage

stream(limit=None, page_size=None)[source]

Streams IpRecordInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.voice.v1.ip_record.IpRecordInstance]

class twilio.rest.voice.v1.ip_record.IpRecordPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of IpRecordInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.voice.v1.ip_record.IpRecordInstance
Return type:twilio.rest.voice.v1.ip_record.IpRecordInstance

twilio.rest.voice.v1.source_ip_mapping module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/voice/v1/source_ip_mapping.py:docstring of twilio.rest.voice.v1.source_ip_mapping, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the SourceIpMappingInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SourceIpMappingInstance

Returns:The fetched SourceIpMappingInstance
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance
update(sip_domain_sid)[source]

Update the SourceIpMappingInstance

Parameters:sip_domain_sid (unicode) – The unique string that identifies a SIP Domain
Returns:The updated SourceIpMappingInstance
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance
class twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

date_created
Returns:The RFC 2822 date and time in GMT that the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT that the resource was last updated
Return type:datetime
delete()[source]

Deletes the SourceIpMappingInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SourceIpMappingInstance

Returns:The fetched SourceIpMappingInstance
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance
ip_record_sid
Returns:The unique string that identifies an IP Record
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
sip_domain_sid
Returns:The unique string that identifies a SIP Domain
Return type:unicode
update(sip_domain_sid)[source]

Update the SourceIpMappingInstance

Parameters:sip_domain_sid (unicode) – The unique string that identifies a SIP Domain
Returns:The updated SourceIpMappingInstance
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(ip_record_sid, sip_domain_sid)[source]

Create the SourceIpMappingInstance

Parameters:
  • ip_record_sid (unicode) – The unique string that identifies an IP Record
  • sip_domain_sid (unicode) – The unique string that identifies a SIP Domain
Returns:

The created SourceIpMappingInstance

Return type:

twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance

get(sid)[source]

Constructs a SourceIpMappingContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingContext
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingContext
get_page(target_url)[source]

Retrieve a specific page of SourceIpMappingInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of SourceIpMappingInstance
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingPage
list(limit=None, page_size=None)[source]

Lists SourceIpMappingInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of SourceIpMappingInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of SourceIpMappingInstance

Return type:

twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingPage

stream(limit=None, page_size=None)[source]

Streams SourceIpMappingInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance]

class twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of SourceIpMappingInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/voice/v1/__init__.py:docstring of twilio.rest.voice.v1, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.voice.v1.V1(domain)[source]

Bases: twilio.base.version.Version

byoc_trunks
Return type:twilio.rest.voice.v1.byoc_trunk.ByocTrunkList
connection_policies
Return type:twilio.rest.voice.v1.connection_policy.ConnectionPolicyList
dialing_permissions
Return type:twilio.rest.voice.v1.dialing_permissions.DialingPermissionsList
ip_records
Return type:twilio.rest.voice.v1.ip_record.IpRecordList
source_ip_mappings
Return type:twilio.rest.voice.v1.source_ip_mapping.SourceIpMappingList