wxc_sdk.person_settings.forwarding module
Call forwarding API
- class wxc_sdk.person_settings.forwarding.CallForwardingCommon(*, enabled: bool, destination: str | None = None, destinationVoicemailEnabled: bool | None = None)[source]
Bases:
ApiModel
Common call forwarding settings
- enabled: bool
call forwarding is enabled or disabled.
- destination: str | None
Destination for call forwarding.
- destination_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() CallForwardingCommon [source]
- class wxc_sdk.person_settings.forwarding.CallForwardingAlways(*, enabled: bool, destination: str | None = None, destinationVoicemailEnabled: bool | None = None, ringReminderEnabled: bool)[source]
Bases:
CallForwardingCommon
Settings for forwarding all incoming calls to the destination you choose.
- ring_reminder_enabled: bool
If true, a brief tone will be played on the person’s phone when a call has been forwarded.
- static default() CallForwardingAlways [source]
- class wxc_sdk.person_settings.forwarding.CallForwardingNoAnswer(*, enabled: bool, destination: str | None = None, destinationVoicemailEnabled: bool | None = None, numberOfRings: int, systemMaxNumberOfRings: int | None = None)[source]
Bases:
CallForwardingCommon
- number_of_rings: int
Number of rings before the call will be forwarded if unanswered.
- system_max_number_of_rings: int | None
- static default() CallForwardingNoAnswer [source]
- class wxc_sdk.person_settings.forwarding.CallForwardingPerson(*, always: CallForwardingAlways, busy: CallForwardingCommon, noAnswer: CallForwardingNoAnswer)[source]
Bases:
ApiModel
Settings related to “Always”, “Busy”, and “No Answer” call forwarding.
- always: CallForwardingAlways
Settings for forwarding all incoming calls to the destination you choose.
- busy: CallForwardingCommon
Settings for forwarding all incoming calls to the destination you chose while the phone is in use or the person is busy.
- no_answer: CallForwardingNoAnswer
Settings for forwarding which only occurs when you are away or not answering your phone.
- static default() CallForwardingPerson [source]
- class wxc_sdk.person_settings.forwarding.PersonForwardingSetting(*, callForwarding: CallForwardingPerson, businessContinuity: CallForwardingCommon)[source]
Bases:
ApiModel
A person’s call forwarding setting
- call_forwarding: CallForwardingPerson
Settings related to “Always”, “Busy”, and “No Answer” call forwarding.
- business_continuity: CallForwardingCommon
Settings for sending calls to a destination of your choice if your phone is not connected to the network for any reason, such as power outage, failed Internet connection, or wiring problem.
- static default() PersonForwardingSetting [source]
- class wxc_sdk.person_settings.forwarding.PersonForwardingApi(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]
Bases:
PersonSettingsApiChild
API for person’s call forwarding settings
Also used for virtual lines, workspaces
- feature = 'callForwarding'
- read(entity_id: str, org_id: str | None = None) PersonForwardingSetting [source]
Retrieve an entity’s Call Forwarding Settings
Three types of call forwarding are supported:
Always – forwards all incoming calls to the destination you choose.
When busy – forwards all incoming calls to the destination you chose while the phone is in use or the person is busy.
When no answer – forwarding only occurs when you are away or not answering your phone.
In addition, the Business Continuity feature will send calls to a destination of your choice if your phone is not connected to the network for any reason, such as power outage, failed Internet connection, or wiring problem
This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their own settings.
- 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 forwarding settings
- Return type:
- configure(entity_id: str, forwarding: PersonForwardingSetting, org_id: str | None = None)[source]
Configure an Entity’s Call Forwarding Settings
Three types of call forwarding are supported:
Always – forwards all incoming calls to the destination you choose.
When busy – forwards all incoming calls to the destination you chose while the phone is in use or the entity is busy.
When no answer – forwarding only occurs when you are away or not answering your phone.
In addition, the Business Continuity feature will send calls to a destination of your choice if your phone is not connected to the network for any reason, such as power outage, failed Internet connection, or wiring problem
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:
entity_id (str) – Unique identifier for the entity.
forwarding (PersonForwardingSetting) – new forwarding 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.
Example
api = self.api.telephony.virtual_lines.forwarding forwarding = api.read(entity_id=self.target.id) always = CallForwardingAlways( enabled=True, destination='9999', destination_voicemail_enabled=True, ring_reminder_enabled=True) forwarding.call_forwarding.always = always api.configure(entity_id=self.target.id, forwarding=update)
- base = ''