wxc_sdk.telephony.autoattendant module

Auto attendant data types and API

class wxc_sdk.telephony.autoattendant.Dialing(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

Dialing setting.

enterprise = 'ENTERPRISE'
group = 'GROUP'
class wxc_sdk.telephony.autoattendant.MenuKey(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

zero = '0'
one = '1'
two = '2'
three = '3'
four = '4'
five = '5'
six = '6'
seven = '7'
eight = '8'
nine = '9'
star = '*'
pound = '#'
class wxc_sdk.telephony.autoattendant.AutoAttendantAction(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

Auto Attendant Action

transfer_without_prompt = 'TRANSFER_WITHOUT_PROMPT'
transfer_with_prompt = 'TRANSFER_WITH_PROMPT'
transfer_to_operator = 'TRANSFER_TO_OPERATOR'
name_dialing = 'NAME_DIALING'
extension_dialing = 'EXTENSION_DIALING'
repeat_menu = 'REPEAT_MENU'
exit = 'EXIT'
transfer_to_mailbox = 'TRANSFER_TO_MAILBOX'
return_to_previous_menu = 'RETURN_TO_PREVIOUS_MENU'
play_announcement = 'PLAY_ANNOUNCEMENT'
class wxc_sdk.telephony.autoattendant.AutoAttendantKeyConfiguration(*, key: MenuKey, action: AutoAttendantAction, description: str | None = None, value: str | None = None)[source]

Bases: ApiModel

Key configuration defined for the auto attendant.

key: MenuKey

Key assigned to specific menu configuration.

action: AutoAttendantAction

Action assigned to specific menu key configuration.

description: str | None

The description of each menu key.

value: str | None

Value based on actions.

static zero_exit() AutoAttendantKeyConfiguration[source]

0 -> EXIT

Returns:

AutoAttendantKeyConfiguration

class wxc_sdk.telephony.autoattendant.AutoAttendantMenu(*, greeting: Greeting, extensionEnabled: bool, keyConfigurations: list[AutoAttendantKeyConfiguration], audioFile: AutoAttendantAudioFile | None = None, audioAnnouncementFile: AnnAudioFile | None = None)[source]

Bases: ApiModel

Menu defined for Auto Attendant

greeting: Greeting

Greeting type defined for the auto attendant.

extension_enabled: bool

Flag to indicate if auto attendant extension is enabled or not.

key_configurations: list[AutoAttendantKeyConfiguration]

Key configurations defined for the auto attendant.

audio_file: AutoAttendantAudioFile | None

Announcement Audio File details. this is deprecated with the availability of the announcement repo start using audio_announcement_file

audio_announcement_file: AnnAudioFile | None

Announcement Audio File details.

static default() AutoAttendantMenu[source]

A default AA menu with a single key: 0 -> EXIT

Returns:

AutoAttendantMenu

class wxc_sdk.telephony.autoattendant.AutoAttendant(*, id: str | None = None, name: str | None = None, locationName: str | None = None, locationId: str | None = None, enabled: bool | None = None, phoneNumber: str | None = None, extension: str | None = None, routingPrefix: str | None = None, esn: str | None = None, tollFreeNumber: bool | None = None, firstName: str | None = None, lastName: str | None = None, alternateNumbers: list[AlternateNumber] | None = None, language: str | None = None, languageCode: str | None = None, businessSchedule: str | None = None, holidaySchedule: str | None = None, extensionDialing: Dialing | None = None, nameDialing: Dialing | None = None, timeZone: str | None = None, businessHoursMenu: AutoAttendantMenu | None = None, afterHoursMenu: AutoAttendantMenu | None = None)[source]

Bases: ApiModel

Auto attendant details

auto_attendant_id: str | None

A unique identifier for the auto attendant.

name: str | None

Unique name for the auto attendant.

location_name: str | None

Name of location for auto attendant. (only returned by list())

location_id: str | None

ID of location for auto attendant. (only returned by list())

enabled: bool | None

Flag to indicate if auto attendant number is enabled or not (only returned by details())

phone_number: str | None

Auto attendant phone number. Either phone number or extension should be present as mandatory.

extension: str | None

Auto attendant extension. Either phone number or extension should be present as mandatory.

routingPrefix: str | None

Routing prefix of location.

esn: str | None

Routing prefix + extension of a person or workspace.

toll_free_number: bool | None

Flag to indicate if auto attendant number is toll-free number.

first_name: str | None

First name defined for an auto attendant. (only returned by details())

last_name: str | None

Last name defined for an auto attendant. (only returned by details())

alternate_numbers: list[AlternateNumber] | None

Alternate numbers defined for the auto attendant. (only returned by details())

language: str | None

Language for the auto attendant.

language_code: str | None

Language code for the auto attendant.

business_schedule: str | None

Business hours defined for the auto attendant.

holiday_schedule: str | None

Holiday defined for the auto attendant.

extension_dialing: Dialing | None

Extension dialing setting. If the values are not set default will be set as ENTERPRISE.

name_dialing: Dialing | None

Name dialing setting. If the values are not set default will be set as ENTERPRISE.

time_zone: str | None

Time zone defined for the auto attendant.

business_hours_menu: AutoAttendantMenu | None

Business hours menu defined for the auto attendant.

after_hours_menu: AutoAttendantMenu | None

After hours menu defined for the auto attendant.

create_or_update() str[source]

Get JSON for create or update call

Returns:

JSON

Return type:

str

static create(*, name: str, business_schedule: str, phone_number: str | None = None, extension: str | None = None) AutoAttendant[source]

Get minimal auto attendant settings that can be used to create a new auto attendant by calling AutoAttendantAPI.create() with these settings:

ata = api.telephony.auto_attendant
aa_settings = AutoAttendant.create(name=new_name,
                                   business_schedule=target_schedule.name,
                                   extension=extension)
aa_id = ata.create(location_id=target_location.location_id,
                   settings=aa_settings)
Parameters:
  • name (str) – Unique name for the auto attendant.

  • business_schedule (str) – Business hours defined for the auto attendant.

  • phone_number (str) – Auto attendant phone number. Either phone number or extension should be present as mandatory.

  • extension (str) – Auto attendant extension. Either phone number or extension should be present as mandatory.

Returns:

AutoAttendant instance

class wxc_sdk.telephony.autoattendant.AutoAttendantApi(session: RestSession)[source]

Bases: ApiChild

Auto attendant API

forwarding: ForwardingApi
list(org_id: str | None = None, location_id: str | None = None, name: str | None = None, phone_number: str | None = None, **params) Generator[AutoAttendant, None, None][source]

Read the List of Auto Attendants List all Auto Attendants for the organization.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • org_id (str) – List auto attendants for this organization.

  • location_id (str) – Return the list of auto attendants for this location.

  • name (str) – Only return auto attendants with the matching name.

  • phone_number (str) – Only return auto attendants with the matching phone number.

Returns:

yields AutoAttendant objects

by_name(name: str, location_id: str | None = None, org_id: str | None = None) AutoAttendant | None[source]

Get auto attendant info by name

Parameters:
  • location_id

  • name

  • org_id

Returns:

details(location_id: str, auto_attendant_id: str, org_id: str | None = None) AutoAttendant[source]

Get Details for an Auto Attendant Retrieve an Auto Attendant details.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Retrieving an auto attendant details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Retrieve an auto attendant details in this location.

  • auto_attendant_id (str) – Retrieve the auto attendant with the matching ID.

  • org_id (str) – Retrieve auto attendant details from this organization.

Returns:

auto attendant details

Return type:

AutoAttendant

create(location_id: str, settings: AutoAttendant, org_id: str | None = None) str[source]

Create an Auto Attendant Create new Auto Attendant for the given location.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Creating an auto attendant requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Create the auto attendant for this location.

  • settings (AutoAttendant) – auto attendant settings for new auto attendant

  • org_id (str) – Create the auto attendant for this organization.

Returns:

ID of the newly created auto attendant.

Return type:

str

update(location_id: str, auto_attendant_id: str, settings: AutoAttendant, org_id: str | None = None)[source]

Update an Auto Attendant Update the designated Auto Attendant.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Updating an auto attendant requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

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

  • auto_attendant_id (str) – Update an auto attendant with the matching ID.

  • settings (AutoAttendant) – auto attendant settings for the update

  • org_id (str) – Create the auto attendant for this organization.

delete_auto_attendant(location_id: str, auto_attendant_id: str, org_id: str | None = None)[source]

elete the designated Auto Attendant.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Deleting an auto attendant requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location from which to delete an auto attendant.

  • auto_attendant_id (str) – Delete the auto attendant with the matching ID.

  • org_id (str) – Delete the auto attendant from this organization.

primary_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]

Get Auto Attendant Primary Available Phone Numbers

List service and standard numbers that are available to be assigned as the auto attendant’s primary phone number. These numbers are associated with the location specified in the request URL, can be active or inactive, and are unassigned.

The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.

Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.

  • phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.

  • org_id (str) – List numbers for this organization.

Returns:

Generator yielding AvailableNumber instances

alternate_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]

Get Auto Attendant Alternate Available Phone Numbers

List service and standard numbers that are available to be assigned as the auto attendant’s alternate number. These numbers are associated with the location specified in the request URL, can be active or inactive, and are unassigned.

The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.

Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.

  • phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.

  • org_id (str) – List numbers for this organization.

Returns:

Generator yielding AvailableNumber instances

base = 'telephony/config/autoAttendants'
call_forward_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, owner_name: str | None = None, extension: str | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]

Get Auto Attendant Call Forward Available Phone Numbers

List service and standard numbers that are available to be assigned as the auto attendant’s call forward number. These numbers are associated with the location specified in the request URL, can be active or inactive, and are assigned to an owning entity.

The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.

Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.

  • phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.

  • owner_name (str) – Return the list of phone numbers that are owned by the given ownerName. Maximum length is 255.

  • extension (str) – Returns the list of PSTN phone numbers with the given extension.

  • org_id (str) – List numbers for this organization.

Returns:

Generator yielding AvailableNumber instances