wxc_sdk.telephony.forwarding module

Forwarding settings and API for call queues, hunt groups, and auto attendants

class wxc_sdk.telephony.forwarding.ForwardingRule(*, id: str, name: str | None = None, callsFrom: str | None = None, forwardTo: str | None = None, callsTo: str | None = None, enabled: bool, **extra_data: Any)[source]

Bases: ApiModel

id: str
name: str | None
calls_from: str | None
forward_to: str | None
calls_to: str | None
enabled: bool
class wxc_sdk.telephony.forwarding.ForwardingSetting(*, enabled: bool | None = None, destination: str | None = None, ringReminderEnabled: bool | None = None, destinationVoiceMailEnabled: bool | None = None, sendToVoicemailEnabled: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

enabled: bool | None

Always call forwarding is enabled or disabled.

destination: str | None

Destination for “Always” call forwarding.

ring_reminder_enabled: bool | None

If true, a brief tone will be played on the person’s phone when a call has been forwarded.

destination_voice_mail_enabled: bool | None

Indicates enabled or disabled state of sending incoming calls to voicemail when the destination is an internal phone number and that number has the voicemail service enabled.

send_to_voicemail_enabled: bool | None

Indicates enabled or disabled state of sending incoming calls to voicemail when the destination is an internal phone number and that number has the voicemail service enabled.

static default() ForwardingSetting[source]
class wxc_sdk.telephony.forwarding.ModeDefaultForwardToSelection(*values)[source]

Bases: str, SafeEnum

An enumeration.

forward_to_specified_number = 'FORWARD_TO_SPECIFIED_NUMBER'

When the rule matches, forward to the destination for this rule.

do_not_forward = 'DO_NOT_FORWARD'

When the rule matches, do not forward to another number.

class wxc_sdk.telephony.forwarding.ForwardToSelection(*values)[source]

Bases: str, SafeEnum

An enumeration.

default_number = 'FORWARD_TO_DEFAULT_NUMBER'
specified_number = 'FORWARD_TO_SPECIFIED_NUMBER'
dont_forward = 'DO_NOT_FORWARD'
class wxc_sdk.telephony.forwarding.ModeForwardTo(*, selection: ForwardToSelection | None = None, destination: str | None = None, destinationVoicemailEnabled: bool | None = None, defaultDestination: str | None = None, defaultDestinationVoicemailEnabled: bool | None = None, defaultForwardToSelection: ModeDefaultForwardToSelection | None = None, **extra_data: Any)[source]

Bases: ApiModel

selection: ForwardToSelection | None

The selection for forwarding.

destination: str | None

The destination for forwarding. Required when the selection is set to FORWARD_TO_SPECIFIED_NUMBER.

destination_voicemail_enabled: bool | None

Sending incoming calls to voicemail is enabled/disabled when the destination is an internal phone number and that number has the voicemail service enabled.

default_destination: str | None

The operating mode’s destination.

default_destination_voicemail_enabled: bool | None

The operating mode’s destination voicemail enabled.

default_forward_to_selection: ModeDefaultForwardToSelection | None

The operating mode’s forward to selection.

class wxc_sdk.telephony.forwarding.ModeForward(*, normalOperationEnabled: bool | None = None, id: str | None = None, name: str | None = None, type: OperatingModeSchedule | None = None, level: ScheduleLevel | None = None, forwardTo: ModeForwardTo | None = None, **extra_data: Any)[source]

Bases: ApiModel

normal_operation_enabled: bool | None

Normal operation is enabled or disabled.

id: str | None

The ID of the operating mode.

name: str | None

The name of the operating mode.

type: OperatingModeSchedule | None

The type of the operating mode.

level: ScheduleLevel | None

The level of the operating mode.

forward_to: ModeForwardTo | None

Forward to settings.

class wxc_sdk.telephony.forwarding.ForwardOperatingModes(*, enabled: bool | None = None, currentOperatingModeId: str | None = None, exceptionType: ExceptionType | None = None, modes: list[ModeForward] | None = None, **extra_data: Any)[source]

Bases: ApiModel

enabled: bool | None

Operating modes are enabled or disabled.

current_operating_mode_id: str | None

The ID of the current operating mode.

exception_type: ExceptionType | None

The exception type.

modes: list[ModeForward] | None

Operating modes.

class wxc_sdk.telephony.forwarding.CallForwarding(*, always: ForwardingSetting | None = None, selective: ForwardingSetting | None = None, rules: list[ForwardingRule] | None = None, operatingModes: ForwardOperatingModes | None = None, **extra_data: Any)[source]

Bases: ApiModel

always: ForwardingSetting | None

Settings for forwarding all incoming calls to the destination you choose.

selective: ForwardingSetting | None

Selectively forward calls to a designated number, depending on criteria rules. You’ll need to have at least one rule for forwarding applied for call forwarding to be active.

rules: list[ForwardingRule] | None

Rules for selectively forwarding calls.

operating_modes: ForwardOperatingModes | None

Settings related to operating modes.

static default() CallForwarding[source]
class wxc_sdk.telephony.forwarding.ForwardTo(*, selection: ForwardToSelection = <ForwardToSelection.default_number: 'FORWARD_TO_DEFAULT_NUMBER'>, phoneNumber: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

Definition of a call forward destination

selection: ForwardToSelection
phone_number: str | None
class wxc_sdk.telephony.forwarding.ForwardFromSelection(*values)[source]

Bases: str, SafeEnum

An enumeration.

any = 'ANY'
custom = 'CUSTOM'
class wxc_sdk.telephony.forwarding.CallForwardingNumber(*, phoneNumber: str | None = None, extension: str | None = None, type: CallForwardingNumberType, **extra_data: Any)[source]

Bases: ApiModel

single number in forwarding calls to definition

phone_number: str | None
extension: str | None
number_type: CallForwardingNumberType
model_dump(*args, **kwargs)[source]

When serializing remove the +1- again

class wxc_sdk.telephony.forwarding.ForwardCallsTo(*, numbers: list[CallForwardingNumber] = <factory>, **extra_data: Any)[source]

Bases: ApiModel

List of numbers in custom number definition

numbers: list[CallForwardingNumber]
class wxc_sdk.telephony.forwarding.CustomNumbers(*, privateNumberEnabled: bool = False, unavailableNumberEnabled: bool = False, numbers: list[str] | None = None, **extra_data: Any)[source]

Bases: ApiModel

custom numbers definition in forwarding rule

private_number_enabled: bool
unavailable_number_enabled: bool
numbers: list[str] | None
model_dump(*args, **kwargs)[source]

When serializing remove the +1- again :meta private:

class wxc_sdk.telephony.forwarding.CallsFrom(*, selection: ForwardFromSelection = <ForwardFromSelection.any: 'ANY'>, customNumbers: CustomNumbers = <factory>, **extra_data: Any)[source]

Bases: ApiModel

calls_from specification in forwarding rule

selection: ForwardFromSelection
custom_numbers: CustomNumbers
class wxc_sdk.telephony.forwarding.ForwardingRuleDetails(*, name: str, id: str | None = None, enabled: bool, holidaySchedule: str | None = None, businessSchedule: str | None = None, forwardTo: ForwardTo, callsTo: ForwardCallsTo, callsFrom: CallsFrom, **extra_data: Any)[source]

Bases: ApiModel

Details of a call forwarding rule

name: str
id: str | None

A unique identifier for the auto attendant call forward selective rule.

enabled: bool

Flag to indicate if always call forwarding selective rule criteria is active. If not set, flag will be set to false.

holiday_schedule: str | None

Name of the holiday schedule which determines when this selective call forwarding rule is in effect.

business_schedule: str | None

Name of the location’s business schedule which determines when this selective call forwarding rule is in effect.

forward_to: ForwardTo

Number to which calls will be forwarded if the rule is of type “Forward To” and the incoming call is matched.

calls_to: ForwardCallsTo

Comma-separated list of the types of numbers being matched for incoming call destination.

calls_from: CallsFrom

Comma-separated list of incoming call numbers that, when matched, will not be forwarded. A Limit of 12 numbers is allowed. Use Any private Number in the comma-separated value to indicate rules that match incoming calls from a private number. Use Any unavailable number in the comma-separated value to match incoming calls from an unavailable number.

static default(name: str) ForwardingRuleDetails[source]
class wxc_sdk.telephony.forwarding.FeatureSelector(*values)[source]

Bases: str, SafeEnum

An enumeration.

queues = 'queues'
huntgroups = 'huntGroups'
auto_attendants = 'autoAttendants'
class wxc_sdk.telephony.forwarding.ForwardingApi(session: RestSession, feature_selector: FeatureSelector)[source]

Bases: ApiChild

API for forwarding settings on call queues, hunt groups, and auto attendants

__init__(session: RestSession, feature_selector: FeatureSelector)[source]
settings(location_id: str, feature_id: str, org_id: str = None) CallForwarding[source]

Retrieve Call Forwarding settings for the designated feature including the list of call forwarding rules.

The call forwarding feature allows you to direct all incoming calls based on specific criteria that you define. Below are the available options for configuring your call forwarding: 1. Always forward calls to a designated number. 2. Forward calls to a designated number based on certain criteria. 3. Forward calls using different modes.

Retrieving call forwarding settings for an auto attendant requires a full or read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Location in which this feature exists.

  • feature_id (str) – Retrieve the call forwarding settings for this entity

  • org_id (str) – Retrieve call forwarding settings from this organization.

Returns:

call forwarding settings

Return type:

class:CallForwarding

update(location_id: str, feature_id: str, forwarding: CallForwarding, org_id: str = None)[source]

Update Call Forwarding Settings for a feature

Update Call Forwarding settings for the designated feature.

Updating call forwarding settings for a feature requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location in which this feature exists.

  • feature_id (str) – Update call forwarding settings for this feature.

  • forwarding (CallForwarding) – Forwarding settings

  • org_id (str) – Update feature forwarding settings from this organization.

create_call_forwarding_rule(location_id: str, feature_id: str, forwarding_rule: ForwardingRuleDetails, org_id: str = None) str[source]

Create a Selective Call Forwarding Rule feature

A selective call forwarding rule for feature to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available feature’s call forwarding settings. :param location_id: Location in which the call queue exists. :type location_id: str :param feature_id: Create the rule for this feature :type feature_id: str :param forwarding_rule: details of rule to be created :type forwarding_rule: ForwardingRuleDetails :param org_id: Create the feature forwarding rule for this organization. :type org_id: str :return: forwarding rule id :rtype; str

call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, org_id: str = None) ForwardingRuleDetails[source]

Retrieve a Selective Call Forwarding Rule’s settings for the designated Call Queue.

A selective call forwarding rule for feature allows calls to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available in the feature’s call forwarding settings. :param location_id: Location in which the feature exists. :type location_id: stre :param feature_id: Retrieve setting for a rule for this feature. :type feature_id: str :param rule_id: feature rule you are retrieving settings for. :type rule_id: str :param org_id: Retrieve feature forwarding settings from this organization. :type org_id: str :return: call forwarding rule details :rtype: ForwardingRuleDetails

update_call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, forwarding_rule: ForwardingRuleDetails, org_id: str = None) str[source]

Update a Selective Call Forwarding Rule’s settings for the designated feature.

A selective call forwarding rule for feature allows calls to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available in the feature’s call forwarding settings.

Updating a selective call forwarding rule’s settings requires a full administrator or location administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Forwarding Rule ID will change upon modification of the Call Forwarding Rule name.

Parameters:
  • location_id (str) – Location in which the feature exists.

  • feature_id (str) – Update settings for a rule for this feature.

  • rule_id (str) – feature you are updating settings for.

  • forwarding_rule (ForwardingRuleDetails) – forwarding rule details for update

  • org_id (str) – Update feature rule settings for this organization.

Returns:

new call forwarding rule id

Return type:

str

base = ''
delete_call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, org_id: str = None)[source]

Delete a Selective Call Forwarding Rule for the designated feature.

A selective call forwarding rule for a feature allows calls to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available in the feature’s call forwarding settings.

switch_mode_for_call_forwarding(location_id: str, feature_id: str, org_id: str = None)[source]

Switch Mode for Call Forwarding Settings for an entity

Switches the current operating mode to the mode as per normal operations.

Switching operating mode a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location in which this call queue exists.

  • feature_id (str) – Switch operating mode to normal operations for this entity.

  • org_id (str) – Switch operating mode as per normal operations for this entity from this organization.

Return type:

None