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,SafeEnumDialing 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,SafeEnumAn 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,SafeEnumAuto 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'
- exit = 'EXIT'
- transfer_to_mailbox = 'TRANSFER_TO_MAILBOX'
- play_announcement = 'PLAY_ANNOUNCEMENT'
- class wxc_sdk.telephony.autoattendant.AutoAttendantKeyConfiguration(*, key: MenuKey, action: AutoAttendantAction, description: str | None = None, value: str | None = None, **extra_data: Any)[source]
Bases:
ApiModelKey configuration defined for the auto attendant.
- 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:
- class wxc_sdk.telephony.autoattendant.AutoAttendantMenu(*, greeting: Greeting, extensionEnabled: bool, audioAnnouncementFile: AnnAudioFile | None = None, keyConfigurations: list[AutoAttendantKeyConfiguration], callTreatment: CallTreatment | None = None, **extra_data: Any)[source]
Bases:
ApiModelMenu defined for Auto Attendant
- extension_enabled: bool
Flag to indicate if auto attendant extension is enabled or not.
- audio_announcement_file: AnnAudioFile | None
Announcement Audio File details.
- key_configurations: list[AutoAttendantKeyConfiguration]
Key configurations defined for the auto attendant.
- call_treatment: CallTreatment | None
Call treatment details.
- static default() AutoAttendantMenu[source]
A default AA menu with a single key: 0 -> EXIT
- Returns:
- 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, **extra_data: Any)[source]
Bases:
ApiModelAuto 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 defined for the auto attendant.
After hours menu defined for the auto attendant.
- 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:
AutoAttendantinstance
- class wxc_sdk.telephony.autoattendant.AutoAttendantApi(session: RestSession)[source]
Bases:
ApiChildFeatures: Auto Attendant
Features: Auto Attendant support reading and writing of Webex Calling Auto Attendant settings for a specific organization.
Viewing these read-only organization settings requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
Modifying these organization settings requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
A partner administrator can retrieve or change settings in a customer’s organization using the optional orgId query parameter.
- __init__(session: RestSession)[source]
- 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
AutoAttendantobjects
- 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:
- 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 attendantorg_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 updateorg_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
AvailableNumberinstances
- 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
AvailableNumberinstances
- 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
AvailableNumberinstances
- list_announcement_files(location_id: str, auto_attendant_id: str, org_id: str | None = None) List[AnnAudioFile][source]
Read the List of Auto Attendant Announcement Files
List file info for all auto attendant announcement files associated with this auto attendant.
Auto attendant announcement files contain messages and music that callers hear while waiting in the queue. A auto attendant can be configured to play whatever subset of these announcement files is desired.
Retrieving this list of files requires a full or read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.
Note that uploading of announcement files via API is not currently supported, but is available via Webex Control Hub.
- Parameters:
location_id (str) – Location in which this auto attendant exists.
auto_attendant_id (str) – Retrieve announcement files for the auto attendant with this identifier.
org_id (str) – Retrieve announcement files for an auto attendant from this organization.
- Return type:
list[AnnAudioFile]
- base = 'telephony/config/autoAttendants'
- delete_announcement_file(location_id: str, auto_attendant_id: str, file_name: str, org_id: str | None = None)[source]
Delete an Auto Attendant Announcement File
Delete an announcement file for the designated auto attendant.
Auto Attendant announcement files contain messages and music that callers hear while waiting in the queue. A auto attendant can be configured to play whatever subset of these announcement files is desired.
Deleting an announcement file for a auto attendant requires a full administrator or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Delete an announcement for a auto attendant in this location.
auto_attendant_id (str) – Delete an announcement for the auto attendant with this identifier.
org_id (str) – Delete auto attendant announcement from this organization.
- Return type:
None
- class wxc_sdk.telephony.autoattendant.CallTreatmentRetry(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- no_repeat = 'NO_REPEAT'
Announcement will not be repeated.
- one_time = 'ONE_TIME'
Repeat the announcement once.
- two_times = 'TWO_TIMES'
Repeat the announcement twice.
- three_times = 'THREE_TIMES'
Repeat the announcement thrice.
- class wxc_sdk.telephony.autoattendant.ActionToBePerformed(*, action: ActionToBePerformedAction | None = None, greeting: Greeting | None = None, audioAnnouncementFile: AnnAudioFile | None = None, transferCallTo: str | None = None, **extra_data: Any)[source]
Bases:
ApiModel- action: ActionToBePerformedAction | None
Action to perform after the retry attempt is reached.
- greeting: Greeting | None
Greeting type is defined when action is set to PLAY_MESSAGE_AND_DISCONNECT.
- audio_announcement_file: AnnAudioFile | None
Pre-configured announcement audio files when action is set to PLAY_MESSAGE_AND_DISCONNECT and greeting is set to CUSTOM.
- transfer_call_to: str | None
Transfer call to the specified number when action is set to TRANSFER_WITH_PROMPT, TRANSFER_WITHOUT_PROMPT and TRANSFER_TO_OPERATOR and TRANSFER_TO_MAILBOX.
- class wxc_sdk.telephony.autoattendant.ActionToBePerformedAction(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- play_message_and_disconnect = 'PLAY_MESSAGE_AND_DISCONNECT'
Plays a recorded message and then disconnects the call.
- transfer_without_prompt = 'TRANSFER_WITHOUT_PROMPT'
Transfers the call to the specified number, without playing a transfer prompt.
- transfer_with_prompt = 'TRANSFER_WITH_PROMPT'
Plays the message and then transfers the call to the specified number.
- transfer_to_operator = 'TRANSFER_TO_OPERATOR'
Plays the message and then transfers the call to the specified operator number.
- transfer_to_mailbox = 'TRANSFER_TO_MAILBOX'
Transfers the call to the configured mailbox, without playing a transfer prompt.
- disconnect = 'DISCONNECT'
Disconnect the call.
- class wxc_sdk.telephony.autoattendant.CallTreatment(*, retryAttemptForNoInput: CallTreatmentRetry | None = None, noInputTimer: int | None = None, actionToBePerformed: ActionToBePerformed | None = None, **extra_data: Any)[source]
Bases:
ApiModel- retry_attempt_for_no_input: CallTreatmentRetry | None
Number of times to repeat the Welcome greeting when the user does not provide an input. By default, NO_REPEAT is set.
- no_input_timer: int | None
Interval the Auto Attendant service waits before timing out. By default, 10 seconds. Min value is 1 and max value is 60.
- action_to_be_performed: ActionToBePerformed | None
Action to perform after the retry attempt is reached.