wxc_sdk.person_settings.call_intercept module

Call intercept API

class wxc_sdk.person_settings.call_intercept.InterceptTypeIncoming(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

intercept_all = 'INTERCEPT_ALL'

incoming calls are intercepted. Incoming calls are routed as destination and voicemail specify.

allow_all = 'ALLOW_ALL'

Incoming calls are not intercepted.

class wxc_sdk.person_settings.call_intercept.InterceptNumber(*, enabled: bool | None = None, destination: str | None = None)[source]

Bases: ApiModel

Information about a number announcement.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

enabled: bool | None

If true, the caller will hear this number when the call is intercepted.

destination: str | None

number caller will hear announced.

class wxc_sdk.person_settings.call_intercept.InterceptAnnouncements(*, greeting: Greeting | None = None, fileName: str | None = None, newNumber: InterceptNumber | None = None, zeroTransfer: InterceptNumber | None = None)[source]

Bases: ApiModel

Settings related to how incoming calls are handled when the intercept feature is enabled.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

greeting: Greeting | None
file_name: str | None

Filename of custom greeting, will be an empty string if no custom greeting has been uploaded.

new_number: InterceptNumber | None

Information about the new number announcement.

zero_transfer: InterceptNumber | None

Information about how the call will be handled if zero (0) is pressed.

static default() InterceptAnnouncements[source]

Default for incoming call intercept announcement settings

class wxc_sdk.person_settings.call_intercept.InterceptSettingIncoming(*, type: InterceptTypeIncoming | None = None, voicemailEnabled: bool | None = None, announcements: InterceptAnnouncements | None = None)[source]

Bases: ApiModel

Settings related to how incoming calls are handled when the intercept feature is enabled.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

intercept_type: InterceptTypeIncoming | None
voicemail_enabled: bool | None

If true, the destination will be the person’s voicemail.

announcements: InterceptAnnouncements | None

Settings related to how incoming calls are handled when the intercept feature is enabled.

static default() InterceptSettingIncoming[source]

Default incoming call intercept settings

class wxc_sdk.person_settings.call_intercept.InterceptTypeOutgoing(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

intercept_all = 'INTERCEPT_ALL'

Outgoing calls are routed as destination and voicemail specify.

allow_local_only = 'ALLOW_LOCAL_ONLY'

Only non-local calls are intercepted.

class wxc_sdk.person_settings.call_intercept.InterceptSettingOutgoing(*, type: InterceptTypeOutgoing | None = None, transferEnabled: bool | None = None, destination: str | None = None)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

intercept_type: InterceptTypeOutgoing | None
transfer_enabled: bool | None

If true, when the person attempts to make an outbound call, a system default message is played and the call is made to the destination phone number

destination: str | None

Number to which the outbound call be transferred.

static default() InterceptSettingOutgoing[source]

Default outgoing call intercept settings

class wxc_sdk.person_settings.call_intercept.InterceptSetting(*, enabled: bool | None = None, incoming: InterceptSettingIncoming | None = None, outgoing: InterceptSettingOutgoing | None = None)[source]

Bases: ApiModel

A person’s call intercept settings

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

enabled: bool | None

true if call intercept is enabled.

incoming: InterceptSettingIncoming | None

Settings related to how incoming calls are handled when the intercept feature is enabled.

outgoing: InterceptSettingOutgoing | None

Settings related to how outgoing calls are handled when the intercept feature is enabled.

static default() InterceptSetting[source]

Default call intercept settings.

class wxc_sdk.person_settings.call_intercept.CallInterceptApi(*, session: RestSession, workspaces: bool = False, locations: bool = False)[source]

Bases: PersonSettingsApiChild

API for person’s call intercept settings

feature = 'intercept'
read(person_id: str, org_id: str | None = None) InterceptSetting[source]

Read Call Intercept Settings for a Person

Retrieves Person’s Call Intercept Settings

The intercept feature gracefully takes a person’s phone out of service, while providing callers with informative announcements and alternative routing options. Depending on the service configuration, none, some, or all incoming calls to the specified person are intercepted. Also depending on the service configuration, outgoing calls are intercepted or rerouted to another location.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters:
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns:

user’s call intercept settings

Return type:

InterceptSetting

configure(person_id: str, intercept: InterceptSetting, org_id: str | None = None)[source]

Configure Call Intercept Settings for a Person

Configures a Person’s Call Intercept Settings

The intercept feature gracefully takes a person’s phone out of service, while providing callers with informative announcements and alternative routing options. Depending on the service configuration, none, some, or all incoming calls to the specified person are intercepted. Also depending on the service configuration, outgoing calls are intercepted or rerouted to another location.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters:
  • person_id (str) – Unique identifier for the person.

  • intercept (InterceptSetting) – new intercept settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

greeting(person_id: str, content: BufferedReader | str, upload_as: str | None = None, org_id: str | None = None)[source]

Configure Call Intercept Greeting for a Person

Configure a Person’s Call Intercept Greeting by uploading a Waveform Audio File Format, .wav, encoded audio file.

Your request will need to be a multipart/form-data request rather than JSON, using the audio/wav Content-Type.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters:
  • person_id (str) – Unique identifier for the person.

  • content (Union[BufferedReader, str]) – the file to be uploaded, can be a path to a file or a buffered reader (opened file); if a reader referring to an open file is passed then make sure to open the file as binary b/c otherwise the content length might be calculated wrong

  • upload_as (str) – filename for the content. Only required if content is a reader; has to be a .wav file name.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: RestSession

REST session