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:
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)[source]
Bases:
ApiModel
- enabled: bool | None
Always call forwarding is enabled or disabled.
- destination: str | None
Destination for “Always” call forwarding. example: 2225551212
- 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.CallForwarding(*, always: ForwardingSetting, selective: ForwardingSetting, rules: list[ForwardingRule] | None = None)[source]
Bases:
ApiModel
- always: ForwardingSetting
- selective: ForwardingSetting
- rules: list[ForwardingRule] | None
- 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
,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.CallForwardingNumberType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
Number 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:
ApiModel
single number in forwarding calls to definition
- phone_number: str | None
- extension: str | None
- number_type: CallForwardingNumberType
- class wxc_sdk.telephony.forwarding.ForwardCallsTo(*, numbers: list[CallForwardingNumber] = None)[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)[source]
Bases:
ApiModel
custom numbers definition in forwarding rule
- private_number_enabled: bool
- numbers: list[str] | None
- class wxc_sdk.telephony.forwarding.CallsFrom(*, selection: ~wxc_sdk.telephony.forwarding.ForwardFromSelection = <ForwardFromSelection.any: 'ANY'>, customNumbers: ~wxc_sdk.telephony.forwarding.CustomNumbers = None)[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)[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(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[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:
object
API 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.