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.
- 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.
- 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.
- 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
- 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
- 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, selector: ApiSelector = ApiSelector.person)[source]
Bases:
PersonSettingsApiChild
API for call intercept settings
Also used for virtual lines and workspaces
- feature = 'intercept'
- read(entity_id: str, org_id: str | None = None) InterceptSetting [source]
Read Call Intercept Settings
Retrieves Call Intercept Settings
The intercept feature gracefully takes an entity’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 entity 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:
entity_id (str) – Unique identifier for the entity.
org_id (str) – entity 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:
- configure(entity_id: str, intercept: InterceptSetting, org_id: str | None = None)[source]
Configure Call Intercept Settings
Configures Call Intercept Settings
The intercept feature gracefully takes an entity’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 entity 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:
entity_id (str) – Unique identifier for the entity.
intercept (InterceptSetting) – new intercept settings
org_id (str) – entity 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(entity_id: str, content: BufferedReader | str, upload_as: str | None = None, org_id: str | None = None)[source]
Configure Call Intercept Greeting
ConfigureCall 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 an entity to update their settings.
- Parameters:
entity_id (str) – Unique identifier for the entity.
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) – entity 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 = ''