twilio.rest.trunking.v1.trunk package¶
Submodules¶
twilio.rest.trunking.v1.trunk.credential_list module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.trunking.v1.trunk.credential_list.
CredentialListContext
(version, trunk_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the CredentialListInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the CredentialListInstance
Returns: The fetched CredentialListInstance Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListInstance
-
-
class
twilio.rest.trunking.v1.trunk.credential_list.
CredentialListInstance
(version, payload, trunk_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the CredentialListInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the CredentialListInstance
Returns: The fetched CredentialListInstance Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
trunk_sid
¶ Returns: The SID of the Trunk the credential list in associated with Return type: unicode
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.trunking.v1.trunk.credential_list.
CredentialListList
(version, trunk_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(credential_list_sid)[source]¶ Create the CredentialListInstance
Parameters: credential_list_sid (unicode) – The SID of the Credential List that you want to associate with the trunk Returns: The created CredentialListInstance Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListInstance
-
get
(sid)[source]¶ Constructs a CredentialListContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.trunking.v1.trunk.credential_list.CredentialListContext Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of CredentialListInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of CredentialListInstance Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListPage
-
list
(limit=None, page_size=None)[source]¶ Lists CredentialListInstance 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.trunking.v1.trunk.credential_list.CredentialListInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of CredentialListInstance records from the API. Request is executed immediately
Parameters: Returns: Page of CredentialListInstance
Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListPage
-
stream
(limit=None, page_size=None)[source]¶ Streams CredentialListInstance 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.trunking.v1.trunk.credential_list.CredentialListInstance]
-
-
class
twilio.rest.trunking.v1.trunk.credential_list.
CredentialListPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of CredentialListInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.trunking.v1.trunk.credential_list.CredentialListInstance Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListInstance
-
twilio.rest.trunking.v1.trunk.ip_access_control_list module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.trunking.v1.trunk.ip_access_control_list.
IpAccessControlListContext
(version, trunk_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the IpAccessControlListInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the IpAccessControlListInstance
Returns: The fetched IpAccessControlListInstance Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance
-
-
class
twilio.rest.trunking.v1.trunk.ip_access_control_list.
IpAccessControlListInstance
(version, payload, trunk_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the IpAccessControlListInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the IpAccessControlListInstance
Returns: The fetched IpAccessControlListInstance Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
trunk_sid
¶ Returns: The SID of the Trunk the resource is associated with Return type: unicode
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.trunking.v1.trunk.ip_access_control_list.
IpAccessControlListList
(version, trunk_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(ip_access_control_list_sid)[source]¶ Create the IpAccessControlListInstance
Parameters: ip_access_control_list_sid (unicode) – The SID of the IP Access Control List that you want to associate with the trunk Returns: The created IpAccessControlListInstance Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance
-
get
(sid)[source]¶ Constructs a IpAccessControlListContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListContext Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of IpAccessControlListInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of IpAccessControlListInstance Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListPage
-
list
(limit=None, page_size=None)[source]¶ Lists IpAccessControlListInstance 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.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of IpAccessControlListInstance records from the API. Request is executed immediately
Parameters: Returns: Page of IpAccessControlListInstance
Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListPage
-
stream
(limit=None, page_size=None)[source]¶ Streams IpAccessControlListInstance 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.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance]
-
-
class
twilio.rest.trunking.v1.trunk.ip_access_control_list.
IpAccessControlListPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of IpAccessControlListInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance
-
twilio.rest.trunking.v1.trunk.origination_url module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.trunking.v1.trunk.origination_url.
OriginationUrlContext
(version, trunk_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the OriginationUrlInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the OriginationUrlInstance
Returns: The fetched OriginationUrlInstance Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
-
update
(weight=<object object>, priority=<object object>, enabled=<object object>, friendly_name=<object object>, sip_url=<object object>)[source]¶ Update the OriginationUrlInstance
Parameters: - weight (unicode) – The value that determines the relative load the URI should receive compared to others with the same priority
- priority (unicode) – The relative importance of the URI
- enabled (bool) – Whether the URL is enabled
- friendly_name (unicode) – A string to describe the resource
- sip_url (unicode) – The SIP address you want Twilio to route your Origination calls to
Returns: The updated OriginationUrlInstance
Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
-
-
class
twilio.rest.trunking.v1.trunk.origination_url.
OriginationUrlInstance
(version, payload, trunk_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the OriginationUrlInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the OriginationUrlInstance
Returns: The fetched OriginationUrlInstance Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
priority
¶ Returns: The relative importance of the URI Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
sip_url
¶ Returns: The SIP address you want Twilio to route your Origination calls to Return type: unicode
-
trunk_sid
¶ Returns: The SID of the Trunk that owns the Origination URL Return type: unicode
-
update
(weight=<object object>, priority=<object object>, enabled=<object object>, friendly_name=<object object>, sip_url=<object object>)[source]¶ Update the OriginationUrlInstance
Parameters: - weight (unicode) – The value that determines the relative load the URI should receive compared to others with the same priority
- priority (unicode) – The relative importance of the URI
- enabled (bool) – Whether the URL is enabled
- friendly_name (unicode) – A string to describe the resource
- sip_url (unicode) – The SIP address you want Twilio to route your Origination calls to
Returns: The updated OriginationUrlInstance
Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
weight
¶ Returns: The value that determines the relative load the URI should receive compared to others with the same priority Return type: unicode
-
-
class
twilio.rest.trunking.v1.trunk.origination_url.
OriginationUrlList
(version, trunk_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(weight, priority, enabled, friendly_name, sip_url)[source]¶ Create the OriginationUrlInstance
Parameters: - weight (unicode) – The value that determines the relative load the URI should receive compared to others with the same priority
- priority (unicode) – The relative importance of the URI
- enabled (bool) – Whether the URL is enabled
- friendly_name (unicode) – A string to describe the resource
- sip_url (unicode) – The SIP address you want Twilio to route your Origination calls to
Returns: The created OriginationUrlInstance
Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
-
get
(sid)[source]¶ Constructs a OriginationUrlContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlContext Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of OriginationUrlInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of OriginationUrlInstance Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlPage
-
list
(limit=None, page_size=None)[source]¶ Lists OriginationUrlInstance 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.trunking.v1.trunk.origination_url.OriginationUrlInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of OriginationUrlInstance records from the API. Request is executed immediately
Parameters: Returns: Page of OriginationUrlInstance
Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlPage
-
stream
(limit=None, page_size=None)[source]¶ Streams OriginationUrlInstance 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.trunking.v1.trunk.origination_url.OriginationUrlInstance]
-
-
class
twilio.rest.trunking.v1.trunk.origination_url.
OriginationUrlPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of OriginationUrlInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
-
twilio.rest.trunking.v1.trunk.phone_number module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.trunking.v1.trunk.phone_number.
PhoneNumberContext
(version, trunk_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the PhoneNumberInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the PhoneNumberInstance
Returns: The fetched PhoneNumberInstance Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberInstance
-
-
class
twilio.rest.trunking.v1.trunk.phone_number.
PhoneNumberInstance
(version, payload, trunk_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
AddressRequirement
[source]¶ Bases:
object
-
ANY
= 'any'¶
-
FOREIGN
= 'foreign'¶
-
LOCAL
= 'local'¶
-
NONE
= 'none'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
address_requirements
¶ Returns: Whether the phone number requires an Address registered with Twilio Return type: PhoneNumberInstance.AddressRequirement
-
api_version
¶ Returns: The API version used to start a new TwiML session Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the PhoneNumberInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the PhoneNumberInstance
Returns: The fetched PhoneNumberInstance Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
phone_number
¶ Returns: The phone number in E.164 format Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
sms_application_sid
¶ Returns: The SID of the application that handles SMS messages sent to the phone number Return type: unicode
-
sms_fallback_method
¶ Returns: The HTTP method used with sms_fallback_url Return type: unicode
-
sms_fallback_url
¶ Returns: The URL that we call when an error occurs while retrieving or executing the TwiML Return type: unicode
-
sms_method
¶ Returns: The HTTP method to use with sms_url Return type: unicode
-
sms_url
¶ Returns: The URL we call when the phone number receives an incoming SMS message Return type: unicode
-
status_callback
¶ Returns: The URL to send status information to your application Return type: unicode
-
status_callback_method
¶ Returns: The HTTP method we use to call status_callback Return type: unicode
-
trunk_sid
¶ Returns: The SID of the Trunk that handles calls to the phone number Return type: unicode
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
voice_application_sid
¶ Returns: The SID of the application that handles calls to the phone number Return type: unicode
-
voice_fallback_method
¶ Returns: The HTTP method that we use to call voice_fallback_url Return type: unicode
-
voice_fallback_url
¶ Returns: The URL we call when an error occurs in TwiML Return type: unicode
-
voice_method
¶ Returns: The HTTP method used with the voice_url Return type: unicode
-
voice_url
¶ Returns: The URL we call when the phone number receives a call Return type: unicode
-
class
-
class
twilio.rest.trunking.v1.trunk.phone_number.
PhoneNumberList
(version, trunk_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(phone_number_sid)[source]¶ Create the PhoneNumberInstance
Parameters: phone_number_sid (unicode) – The SID of the Incoming Phone Number that you want to associate with the trunk Returns: The created PhoneNumberInstance Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberInstance
-
get
(sid)[source]¶ Constructs a PhoneNumberContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberContext Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of PhoneNumberInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of PhoneNumberInstance Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberPage
-
list
(limit=None, page_size=None)[source]¶ Lists PhoneNumberInstance 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.trunking.v1.trunk.phone_number.PhoneNumberInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of PhoneNumberInstance records from the API. Request is executed immediately
Parameters: Returns: Page of PhoneNumberInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams PhoneNumberInstance 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.trunking.v1.trunk.phone_number.PhoneNumberInstance]
-
-
class
twilio.rest.trunking.v1.trunk.phone_number.
PhoneNumberPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of PhoneNumberInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberInstance Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberInstance
-
twilio.rest.trunking.v1.trunk.recording module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.trunking.v1.trunk.recording.
RecordingContext
(version, trunk_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
()[source]¶ Fetch the RecordingInstance
Returns: The fetched RecordingInstance Return type: twilio.rest.trunking.v1.trunk.recording.RecordingInstance
-
update
(mode=<object object>, trim=<object object>)[source]¶ Update the RecordingInstance
Parameters: - mode (RecordingInstance.RecordingMode) – The recording mode for the trunk.
- trim (RecordingInstance.RecordingTrim) – The recording trim setting for the trunk.
Returns: The updated RecordingInstance
Return type:
-
-
class
twilio.rest.trunking.v1.trunk.recording.
RecordingInstance
(version, payload, trunk_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
RecordingMode
[source]¶ Bases:
object
-
DO_NOT_RECORD
= 'do-not-record'¶
-
RECORD_FROM_ANSWER
= 'record-from-answer'¶
-
RECORD_FROM_ANSWER_DUAL
= 'record-from-answer-dual'¶
-
RECORD_FROM_RINGING
= 'record-from-ringing'¶
-
RECORD_FROM_RINGING_DUAL
= 'record-from-ringing-dual'¶
-
-
class
RecordingTrim
[source]¶ Bases:
object
-
DO_NOT_TRIM
= 'do-not-trim'¶
-
TRIM_SILENCE
= 'trim-silence'¶
-
-
fetch
()[source]¶ Fetch the RecordingInstance
Returns: The fetched RecordingInstance Return type: twilio.rest.trunking.v1.trunk.recording.RecordingInstance
-
mode
¶ Returns: The recording mode for the trunk. Return type: RecordingInstance.RecordingMode
-
trim
¶ Returns: The recording trim setting for the trunk. Return type: RecordingInstance.RecordingTrim
-
update
(mode=<object object>, trim=<object object>)[source]¶ Update the RecordingInstance
Parameters: - mode (RecordingInstance.RecordingMode) – The recording mode for the trunk.
- trim (RecordingInstance.RecordingTrim) – The recording trim setting for the trunk.
Returns: The updated RecordingInstance
Return type:
-
class
-
class
twilio.rest.trunking.v1.trunk.recording.
RecordingList
(version, trunk_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a RecordingContext
Returns: twilio.rest.trunking.v1.trunk.recording.RecordingContext Return type: twilio.rest.trunking.v1.trunk.recording.RecordingContext
-
-
class
twilio.rest.trunking.v1.trunk.recording.
RecordingPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of RecordingInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.trunking.v1.trunk.recording.RecordingInstance Return type: twilio.rest.trunking.v1.trunk.recording.RecordingInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.trunking.v1.trunk.
TrunkContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
credentials_lists
¶ Access the credentials_lists
Returns: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList
-
delete
()[source]¶ Deletes the TrunkInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TrunkInstance
Returns: The fetched TrunkInstance Return type: twilio.rest.trunking.v1.trunk.TrunkInstance
-
ip_access_control_lists
¶ Access the ip_access_control_lists
Returns: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListList Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListList
-
origination_urls
¶ Access the origination_urls
Returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList
-
phone_numbers
¶ Access the phone_numbers
Returns: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberList Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberList
-
recordings
¶ Access the recordings
Returns: twilio.rest.trunking.v1.trunk.recording.RecordingList Return type: twilio.rest.trunking.v1.trunk.recording.RecordingList
-
update
(friendly_name=<object object>, domain_name=<object object>, disaster_recovery_url=<object object>, disaster_recovery_method=<object object>, transfer_mode=<object object>, secure=<object object>, cnam_lookup_enabled=<object object>, transfer_caller_id=<object object>)[source]¶ Update the TrunkInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- domain_name (unicode) – The unique address you reserve on Twilio to which you route your SIP traffic
- disaster_recovery_url (unicode) – The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
- disaster_recovery_method (unicode) – The HTTP method we should use to call the disaster_recovery_url
- transfer_mode (TrunkInstance.TransferSetting) – The call transfer settings for the trunk
- secure (bool) – Whether Secure Trunking is enabled for the trunk
- cnam_lookup_enabled (bool) – Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
- transfer_caller_id (TrunkInstance.TransferCallerId) – Caller Id for transfer target
Returns: The updated TrunkInstance
Return type:
-
-
class
twilio.rest.trunking.v1.trunk.
TrunkInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
TransferCallerId
[source]¶ Bases:
object
-
FROM_TRANSFEREE
= 'from-transferee'¶
-
FROM_TRANSFEROR
= 'from-transferor'¶
-
-
class
TransferSetting
[source]¶ Bases:
object
-
DISABLE_ALL
= 'disable-all'¶
-
ENABLE_ALL
= 'enable-all'¶
-
SIP_ONLY
= 'sip-only'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
auth_type
¶ Returns: The types of authentication mapped to the domain Return type: unicode
-
cnam_lookup_enabled
¶ Returns: Whether Caller ID Name (CNAM) lookup is enabled for the trunk Return type: bool
-
credentials_lists
¶ Access the credentials_lists
Returns: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList Return type: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the TrunkInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
disaster_recovery_method
¶ Returns: The HTTP method we use to call the disaster_recovery_url Return type: unicode
-
disaster_recovery_url
¶ Returns: The HTTP URL that we call if an error occurs while sending SIP traffic towards your configured Origination URL Return type: unicode
-
domain_name
¶ Returns: The unique address you reserve on Twilio to which you route your SIP traffic Return type: unicode
-
fetch
()[source]¶ Fetch the TrunkInstance
Returns: The fetched TrunkInstance Return type: twilio.rest.trunking.v1.trunk.TrunkInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
ip_access_control_lists
¶ Access the ip_access_control_lists
Returns: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListList Return type: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListList
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
origination_urls
¶ Access the origination_urls
Returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList Return type: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList
-
phone_numbers
¶ Access the phone_numbers
Returns: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberList Return type: twilio.rest.trunking.v1.trunk.phone_number.PhoneNumberList
-
recordings
¶ Access the recordings
Returns: twilio.rest.trunking.v1.trunk.recording.RecordingList Return type: twilio.rest.trunking.v1.trunk.recording.RecordingList
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
transfer_caller_id
¶ Returns: Caller Id for transfer target Return type: TrunkInstance.TransferCallerId
-
transfer_mode
¶ Returns: The call transfer settings for the trunk Return type: TrunkInstance.TransferSetting
-
update
(friendly_name=<object object>, domain_name=<object object>, disaster_recovery_url=<object object>, disaster_recovery_method=<object object>, transfer_mode=<object object>, secure=<object object>, cnam_lookup_enabled=<object object>, transfer_caller_id=<object object>)[source]¶ Update the TrunkInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- domain_name (unicode) – The unique address you reserve on Twilio to which you route your SIP traffic
- disaster_recovery_url (unicode) – The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
- disaster_recovery_method (unicode) – The HTTP method we should use to call the disaster_recovery_url
- transfer_mode (TrunkInstance.TransferSetting) – The call transfer settings for the trunk
- secure (bool) – Whether Secure Trunking is enabled for the trunk
- cnam_lookup_enabled (bool) – Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
- transfer_caller_id (TrunkInstance.TransferCallerId) – Caller Id for transfer target
Returns: The updated TrunkInstance
Return type:
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
class
-
class
twilio.rest.trunking.v1.trunk.
TrunkList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name=<object object>, domain_name=<object object>, disaster_recovery_url=<object object>, disaster_recovery_method=<object object>, transfer_mode=<object object>, secure=<object object>, cnam_lookup_enabled=<object object>, transfer_caller_id=<object object>)[source]¶ Create the TrunkInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- domain_name (unicode) – The unique address you reserve on Twilio to which you route your SIP traffic
- disaster_recovery_url (unicode) – The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
- disaster_recovery_method (unicode) – The HTTP method we should use to call the disaster_recovery_url
- transfer_mode (TrunkInstance.TransferSetting) – The call transfer settings for the trunk
- secure (bool) – Whether Secure Trunking is enabled for the trunk
- cnam_lookup_enabled (bool) – Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
- transfer_caller_id (TrunkInstance.TransferCallerId) – Caller Id for transfer target
Returns: The created TrunkInstance
Return type:
-
get
(sid)[source]¶ Constructs a TrunkContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.trunking.v1.trunk.TrunkContext Return type: twilio.rest.trunking.v1.trunk.TrunkContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of TrunkInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of TrunkInstance Return type: twilio.rest.trunking.v1.trunk.TrunkPage
-
list
(limit=None, page_size=None)[source]¶ Lists TrunkInstance 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:
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of TrunkInstance records from the API. Request is executed immediately
Parameters: Returns: Page of TrunkInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams TrunkInstance 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:
-
-
class
twilio.rest.trunking.v1.trunk.
TrunkPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TrunkInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.trunking.v1.trunk.TrunkInstance Return type: twilio.rest.trunking.v1.trunk.TrunkInstance
-