twilio.rest.insights.v1.call package

Submodules

twilio.rest.insights.v1.call.annotation module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.insights.v1.call.annotation.AnnotationContext(version, call_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

fetch()[source]

Fetch the AnnotationInstance

Returns:The fetched AnnotationInstance
Return type:twilio.rest.insights.v1.call.annotation.AnnotationInstance
update(answered_by=<object object>, connectivity_issue=<object object>, quality_issues=<object object>, spam=<object object>, call_score=<object object>, comment=<object object>, incident=<object object>)[source]

Update the AnnotationInstance

Parameters:
  • answered_by (AnnotationInstance.AnsweredBy) – Indicates the answering entity as determined by Answering Machine Detection.
  • connectivity_issue (AnnotationInstance.ConnectivityIssue) – Indicates if the call had any connectivity issue
  • quality_issues (unicode) – Indicates if the call had audio quality issues.
  • spam (bool) – Call spam indicator
  • call_score (unicode) – Call Score
  • comment (unicode) – User comments
  • incident (unicode) – Call tag for incidents or support ticket
Returns:

The updated AnnotationInstance

Return type:

twilio.rest.insights.v1.call.annotation.AnnotationInstance

class twilio.rest.insights.v1.call.annotation.AnnotationInstance(version, payload, call_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

class AnsweredBy[source]

Bases: object

HUMAN = 'human'
MACHINE = 'machine'
UNKNOWN_ANSWERED_BY = 'unknown_answered_by'
class ConnectivityIssue[source]

Bases: object

CALLER_ID = 'caller_id'
DROPPED_CALL = 'dropped_call'
INVALID_NUMBER = 'invalid_number'
NO_CONNECTIVITY_ISSUE = 'no_connectivity_issue'
NUMBER_REACHABILITY = 'number_reachability'
UNKNOWN_CONNECTIVITY_ISSUE = 'unknown_connectivity_issue'
class QualityIssues[source]

Bases: object

CHOPPY_ROBOTIC = 'choppy_robotic'
DTMF = 'dtmf'
ECHO = 'echo'
LATENCY = 'latency'
LOW_VOLUME = 'low_volume'
NO_QUALITY_ISSUE = 'no_quality_issue'
OWA = 'owa'
STATIC_NOISE = 'static_noise'
UNKNOWN_QUALITY_ISSUE = 'unknown_quality_issue'
account_sid
Returns:Account SID.
Return type:unicode
answered_by
Returns:Indicates the answering entity as determined by Answering Machine Detection.
Return type:AnnotationInstance.AnsweredBy
call_score
Returns:Call Score
Return type:unicode
call_sid
Returns:Call SID.
Return type:unicode
comment
Returns:User comments
Return type:unicode
connectivity_issue
Returns:Indicates if the call had any connectivity issue
Return type:AnnotationInstance.ConnectivityIssue
fetch()[source]

Fetch the AnnotationInstance

Returns:The fetched AnnotationInstance
Return type:twilio.rest.insights.v1.call.annotation.AnnotationInstance
incident
Returns:Call tag for incidents or support ticket
Return type:unicode
quality_issues
Returns:Indicates if the call had audio quality issues.
Return type:list[unicode]
spam
Returns:Call spam indicator
Return type:bool
update(answered_by=<object object>, connectivity_issue=<object object>, quality_issues=<object object>, spam=<object object>, call_score=<object object>, comment=<object object>, incident=<object object>)[source]

Update the AnnotationInstance

Parameters:
  • answered_by (AnnotationInstance.AnsweredBy) – Indicates the answering entity as determined by Answering Machine Detection.
  • connectivity_issue (AnnotationInstance.ConnectivityIssue) – Indicates if the call had any connectivity issue
  • quality_issues (unicode) – Indicates if the call had audio quality issues.
  • spam (bool) – Call spam indicator
  • call_score (unicode) – Call Score
  • comment (unicode) – User comments
  • incident (unicode) – Call tag for incidents or support ticket
Returns:

The updated AnnotationInstance

Return type:

twilio.rest.insights.v1.call.annotation.AnnotationInstance

url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.insights.v1.call.annotation.AnnotationList(version, call_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get()[source]

Constructs a AnnotationContext

Returns:twilio.rest.insights.v1.call.annotation.AnnotationContext
Return type:twilio.rest.insights.v1.call.annotation.AnnotationContext
class twilio.rest.insights.v1.call.annotation.AnnotationPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of AnnotationInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.insights.v1.call.annotation.AnnotationInstance
Return type:twilio.rest.insights.v1.call.annotation.AnnotationInstance

twilio.rest.insights.v1.call.event module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.insights.v1.call.event.EventInstance(version, payload, call_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

class Level[source]

Bases: object

DEBUG = 'DEBUG'
ERROR = 'ERROR'
INFO = 'INFO'
UNKNOWN = 'UNKNOWN'
WARNING = 'WARNING'
class TwilioEdge[source]

Bases: object

CARRIER_EDGE = 'carrier_edge'
CLIENT_EDGE = 'client_edge'
SDK_EDGE = 'sdk_edge'
SIP_EDGE = 'sip_edge'
UNKNOWN_EDGE = 'unknown_edge'
account_sid
Returns:The account_sid
Return type:unicode
call_sid
Returns:The call_sid
Return type:unicode
carrier_edge
Returns:The carrier_edge
Return type:dict
client_edge
Returns:The client_edge
Return type:dict
edge
Returns:The edge
Return type:EventInstance.TwilioEdge
group
Returns:The group
Return type:unicode
level
Returns:The level
Return type:EventInstance.Level
name
Returns:The name
Return type:unicode
sdk_edge
Returns:The sdk_edge
Return type:dict
sip_edge
Returns:The sip_edge
Return type:dict
timestamp
Returns:The timestamp
Return type:unicode
class twilio.rest.insights.v1.call.event.EventList(version, call_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of EventInstance
Return type:twilio.rest.insights.v1.call.event.EventPage
list(edge=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • edge (EventInstance.TwilioEdge) – The edge
  • 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.insights.v1.call.event.EventInstance]

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

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

Parameters:
  • edge (EventInstance.TwilioEdge) – The edge
  • 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 EventInstance

Return type:

twilio.rest.insights.v1.call.event.EventPage

stream(edge=<object object>, limit=None, page_size=None)[source]

Streams EventInstance 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:
  • edge (EventInstance.TwilioEdge) – The edge
  • 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.insights.v1.call.event.EventInstance]

class twilio.rest.insights.v1.call.event.EventPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of EventInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.insights.v1.call.event.EventInstance
Return type:twilio.rest.insights.v1.call.event.EventInstance

twilio.rest.insights.v1.call.metric module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.insights.v1.call.metric.MetricInstance(version, payload, call_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

class StreamDirection[source]

Bases: object

BOTH = 'both'
INBOUND = 'inbound'
OUTBOUND = 'outbound'
UNKNOWN = 'unknown'
class TwilioEdge[source]

Bases: object

CARRIER_EDGE = 'carrier_edge'
CLIENT_EDGE = 'client_edge'
SDK_EDGE = 'sdk_edge'
SIP_EDGE = 'sip_edge'
UNKNOWN_EDGE = 'unknown_edge'
account_sid
Returns:The account_sid
Return type:unicode
call_sid
Returns:The call_sid
Return type:unicode
carrier_edge
Returns:The carrier_edge
Return type:dict
client_edge
Returns:The client_edge
Return type:dict
direction
Returns:The direction
Return type:MetricInstance.StreamDirection
edge
Returns:The edge
Return type:MetricInstance.TwilioEdge
sdk_edge
Returns:The sdk_edge
Return type:dict
sip_edge
Returns:The sip_edge
Return type:dict
timestamp
Returns:The timestamp
Return type:unicode
class twilio.rest.insights.v1.call.metric.MetricList(version, call_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MetricInstance
Return type:twilio.rest.insights.v1.call.metric.MetricPage
list(edge=<object object>, direction=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • edge (MetricInstance.TwilioEdge) – The edge
  • direction (MetricInstance.StreamDirection) – The direction
  • 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.insights.v1.call.metric.MetricInstance]

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

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

Parameters:
Returns:

Page of MetricInstance

Return type:

twilio.rest.insights.v1.call.metric.MetricPage

stream(edge=<object object>, direction=<object object>, limit=None, page_size=None)[source]

Streams MetricInstance 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:
  • edge (MetricInstance.TwilioEdge) – The edge
  • direction (MetricInstance.StreamDirection) – The direction
  • 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.insights.v1.call.metric.MetricInstance]

class twilio.rest.insights.v1.call.metric.MetricPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of MetricInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.insights.v1.call.metric.MetricInstance
Return type:twilio.rest.insights.v1.call.metric.MetricInstance

twilio.rest.insights.v1.call.summary module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.insights.v1.call.summary.CallSummaryContext(version, call_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch(processing_state=<object object>)[source]

Fetch the CallSummaryInstance

Parameters:processing_state (CallSummaryInstance.ProcessingState) – The processing_state
Returns:The fetched CallSummaryInstance
Return type:twilio.rest.insights.v1.call.summary.CallSummaryInstance
class twilio.rest.insights.v1.call.summary.CallSummaryInstance(version, payload, call_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

class AnsweredBy[source]

Bases: object

FAX = 'fax'
HUMAN = 'human'
MACHINE_END_BEEP = 'machine_end_beep'
MACHINE_END_OTHER = 'machine_end_other'
MACHINE_END_SILENCE = 'machine_end_silence'
MACHINE_START = 'machine_start'
UNKNOWN = 'unknown'
class CallState[source]

Bases: object

ANSWERED = 'answered'
BUSY = 'busy'
CANCELED = 'canceled'
COMPLETED = 'completed'
FAIL = 'fail'
NOANSWER = 'noanswer'
RINGING = 'ringing'
UNDIALED = 'undialed'
class CallType[source]

Bases: object

CARRIER = 'carrier'
CLIENT = 'client'
SIP = 'sip'
TRUNKING = 'trunking'
class ProcessingState[source]

Bases: object

COMPLETE = 'complete'
PARTIAL = 'partial'
account_sid
Returns:The account_sid
Return type:unicode
annotation
Returns:The annotation
Return type:dict
answered_by
Returns:The answered_by
Return type:CallSummaryInstance.AnsweredBy
attributes
Returns:The attributes
Return type:dict
call_sid
Returns:The call_sid
Return type:unicode
call_state
Returns:The call_state
Return type:CallSummaryInstance.CallState
call_type
Returns:The call_type
Return type:CallSummaryInstance.CallType
carrier_edge
Returns:The carrier_edge
Return type:dict
client_edge
Returns:The client_edge
Return type:dict
connect_duration
Returns:The connect_duration
Return type:unicode
created_time
Returns:The created_time
Return type:datetime
duration
Returns:The duration
Return type:unicode
end_time
Returns:The end_time
Return type:datetime
fetch(processing_state=<object object>)[source]

Fetch the CallSummaryInstance

Parameters:processing_state (CallSummaryInstance.ProcessingState) – The processing_state
Returns:The fetched CallSummaryInstance
Return type:twilio.rest.insights.v1.call.summary.CallSummaryInstance
from_
Returns:The from
Return type:dict
processing_state
Returns:The processing_state
Return type:CallSummaryInstance.ProcessingState
properties
Returns:The properties
Return type:dict
sdk_edge
Returns:The sdk_edge
Return type:dict
sip_edge
Returns:The sip_edge
Return type:dict
start_time
Returns:The start_time
Return type:datetime
tags
Returns:The tags
Return type:list[unicode]
to
Returns:The to
Return type:dict
trust
Returns:The trust
Return type:dict
url
Returns:The url
Return type:unicode
class twilio.rest.insights.v1.call.summary.CallSummaryList(version, call_sid)[source]

Bases: twilio.base.list_resource.ListResource

get()[source]

Constructs a CallSummaryContext

Returns:twilio.rest.insights.v1.call.summary.CallSummaryContext
Return type:twilio.rest.insights.v1.call.summary.CallSummaryContext
class twilio.rest.insights.v1.call.summary.CallSummaryPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of CallSummaryInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.insights.v1.call.summary.CallSummaryInstance
Return type:twilio.rest.insights.v1.call.summary.CallSummaryInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.insights.v1.call.CallContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

annotation

Access the annotation

Returns:twilio.rest.insights.v1.call.annotation.AnnotationList
Return type:twilio.rest.insights.v1.call.annotation.AnnotationList
events

Access the events

Returns:twilio.rest.insights.v1.call.event.EventList
Return type:twilio.rest.insights.v1.call.event.EventList
fetch()[source]

Fetch the CallInstance

Returns:The fetched CallInstance
Return type:twilio.rest.insights.v1.call.CallInstance
metrics

Access the metrics

Returns:twilio.rest.insights.v1.call.metric.MetricList
Return type:twilio.rest.insights.v1.call.metric.MetricList
summary

Access the summary

Returns:twilio.rest.insights.v1.call.summary.CallSummaryList
Return type:twilio.rest.insights.v1.call.summary.CallSummaryList
class twilio.rest.insights.v1.call.CallInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

annotation

Access the annotation

Returns:twilio.rest.insights.v1.call.annotation.AnnotationList
Return type:twilio.rest.insights.v1.call.annotation.AnnotationList
events

Access the events

Returns:twilio.rest.insights.v1.call.event.EventList
Return type:twilio.rest.insights.v1.call.event.EventList
fetch()[source]

Fetch the CallInstance

Returns:The fetched CallInstance
Return type:twilio.rest.insights.v1.call.CallInstance
Returns:The links
Return type:unicode
metrics

Access the metrics

Returns:twilio.rest.insights.v1.call.metric.MetricList
Return type:twilio.rest.insights.v1.call.metric.MetricList
sid
Returns:The sid
Return type:unicode
summary

Access the summary

Returns:twilio.rest.insights.v1.call.summary.CallSummaryList
Return type:twilio.rest.insights.v1.call.summary.CallSummaryList
url
Returns:The url
Return type:unicode
class twilio.rest.insights.v1.call.CallList(version)[source]

Bases: twilio.base.list_resource.ListResource

get(sid)[source]

Constructs a CallContext

Parameters:sid – The sid
Returns:twilio.rest.insights.v1.call.CallContext
Return type:twilio.rest.insights.v1.call.CallContext
class twilio.rest.insights.v1.call.CallPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of CallInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.insights.v1.call.CallInstance
Return type:twilio.rest.insights.v1.call.CallInstance