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)[source]
Bases:
ApiModelCreate 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.
- 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, ringReminderEnabled: bool, sendToVoicemailEnabled: bool, destination: str | None = None)[source]
Bases:
ApiModelCreate 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
- ring_reminder_enabled: bool
- send_to_voicemail_enabled: bool
- destination: str | None
- static default() ForwardingSetting[source]
- class wxc_sdk.telephony.forwarding.CallForwarding(*, always: ForwardingSetting, selective: ForwardingSetting, rules: list[wxc_sdk.telephony.forwarding.ForwardingRule])[source]
Bases:
ApiModelCreate 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.
- always: ForwardingSetting
- selective: ForwardingSetting
- rules: list[wxc_sdk.telephony.forwarding.ForwardingRule]
- static default() CallForwarding[source]
- class wxc_sdk.telephony.forwarding.ForwardToSelection(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- default_number = 'FORWARD_TO_DEFAULT_NUMBER'
- specified_number = 'FORWARD_TO_SPECIFIED_NUMBER'
- dont_forward = 'DO_NOT_FORWARD'
- class wxc_sdk.telephony.forwarding.CallForwardingNumberType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumNumber type for call forwarding number
- primary = 'PRIMARY'
- alternate = 'ALTERNATE'
- class wxc_sdk.telephony.forwarding.CallForwardingNumber(*, phoneNumber: str | None = None, extension: str | None = None, type: CallForwardingNumberType)[source]
Bases:
ApiModelsingle number in forwarding calls to definition
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.
- phone_number: str | None
- extension: str | None
- number_type: CallForwardingNumberType
- class wxc_sdk.telephony.forwarding.ForwardCallsTo(*, numbers: list[wxc_sdk.telephony.forwarding.CallForwardingNumber] = None)[source]
Bases:
ApiModelList of numbers in custom number definition
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.
- numbers: list[wxc_sdk.telephony.forwarding.CallForwardingNumber]
- class wxc_sdk.telephony.forwarding.CustomNumbers(*, privateNumberEnabled: bool = False, unavailableNumberEnabled: bool = False, numbers: list[str] | None = None)[source]
Bases:
ApiModelcustom numbers definition in forwarding rule
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.
- private_number_enabled: bool
- numbers: list[str] | None
- class wxc_sdk.telephony.forwarding.CallsFrom(*, selection: ForwardFromSelection = ForwardFromSelection.any, customNumbers: CustomNumbers = None)[source]
Bases:
ApiModelcalls_from specification in forwarding rule
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.
- 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)[source]
Bases:
ApiModelDetails of a call forwarding rule
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.
- name: str
- id: str | None
- enabled: bool
- holiday_schedule: str | None
- business_schedule: str | None
- forward_to: ForwardTo
- calls_to: ForwardCallsTo
- static default(name: str) ForwardingRuleDetails[source]
- class wxc_sdk.telephony.forwarding.FeatureSelector(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- queues = 'queues'
- huntgroups = 'huntGroups'
- auto_attendants = 'autoAttendants'
- class wxc_sdk.telephony.forwarding.ForwardingApi(session: RestSession, feature_selector: FeatureSelector)[source]
Bases:
objectAPI for forwarding settings on call queues, hunt groups, and auto attendants
- settings(location_id: str, feature_id: str, org_id: str | None = None) CallForwarding[source]
Retrieve Call Forwarding settings for the designated feature including the list of call forwarding rules.
- 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 = 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 settingsorg_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 = 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 = 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 = 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.
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 updateorg_id (str) – Update feature rule settings for this organization.
- Returns:
new call forwarding rule id
- Return type:
str
- delete_call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, org_id: str | None = 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.