wxc_sdk.me.forwarding package

class wxc_sdk.me.forwarding.MeForwardingApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

settings() PersonForwardingSetting[source]

Read My Call Forwarding Settings

Read call forwarding settings associated with the authenticated user.

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 a power outage, failed Internet connection, or wiring problem.

This API requires a user auth token with a scope of spark:telephony_config_read.

Return type:

PersonForwardingSetting

configure(forwarding: PersonForwardingSetting)[source]

Configure My Call Forwarding Settings

Update call forwarding settings associated with the authenticated user.

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 a power outage, failed Internet connection, or wiring problem.

This API requires a user auth token with a scope of spark:telephony_config_write.

Parameters:

forwarding (PersonForwardingSetting) – new forwarding settings

Example

api = self.api.me.forwarding

forwarding = api.read()
always = CallForwardingAlways(
    enabled=True,
    destination='9999',
    destination_voicemail_enabled=True,
    ring_reminder_enabled=True)
forwarding.call_forwarding.always = always
api.configure(forwarding=forwarding)
base = 'telephony/config/people/me'