wxc_sdk.telephony.voiceportal module

Voice portal API

class wxc_sdk.telephony.voiceportal.VoicePortalSettings(*, id: str | None = None, name: str | None = None, language: str | None = None, languageCode: str | None = None, extension: str | None = None, phoneNumber: str | None = None, firstName: str | None = None, lastName: str | None = None, directLineCallerIdName: DirectLineCallerIdName | None = None, dialByName: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

portal_id: str | None

Voice Portal ID

name: str | None

Voice Portal Name.

language: str | None

Language for audio announcements.

language_code: str | None

Language code for voicemail group audio announcement.

extension: str | None

Extension of incoming call.

phone_number: str | None

Phone Number of incoming call.

first_name: str | None

Caller ID First Name. This field has been deprecated. Please use directLineCallerIdName and dialByName instead.

last_name: str | None

Caller ID Last Name. This field has been deprecated. Please use directLineCallerIdName and dialByName instead.

direct_line_caller_id_name: DirectLineCallerIdName | None

Settings for the direct line caller ID name to be shown for this voice portal.

dial_by_name: str | None

The name to be used for dial by name functions.

class wxc_sdk.telephony.voiceportal.FailedAttempts(*, enabled: bool, attempts: int, **extra_data: Any)[source]

Bases: ApiModel

Number of failed attempts allowed.

enabled: bool

If enabled, allows specified number of attempts before locking voice portal access.

attempts: int

Number of failed attempts allowed.

class wxc_sdk.telephony.voiceportal.ExpirePasscode(*, enabled: bool, days: int, **extra_data: Any)[source]

Bases: ApiModel

enabled: bool
days: int
class wxc_sdk.telephony.voiceportal.PasscodeRules(*, expirePasscode: ExpirePasscode | None = None, failedAttempts: FailedAttempts, blockPreviousPasscodes: BlockPreviousPasscodes, blockRepeatedDigits: BlockRepeatedDigits, blockContiguousSequences: BlockContiguousSequences, length: PinLength, blockReversedUserNumberEnabled: bool, blockUserNumberEnabled: bool, blockRepeatedPatternsEnabled: bool, blockReversedOldPasscodeEnabled: bool, **extra_data: Any)[source]

Bases: ApiModel

expire_passcode: ExpirePasscode | None

Settings for passcode expiry.

failed_attempts: FailedAttempts

Number of failed attempts allowed.

block_previous_passcodes: BlockPreviousPasscodes

Settings for previous passcode usage.

block_repeated_digits: BlockRepeatedDigits

Settings for not allowing single or groups of repeated digits in passcode (for example, 22888, 121212, or 408408).

block_contiguous_sequences: BlockContiguousSequences

Settings for not allowing numerical sequence in passcode (for example, 012345 or 987654).

length: PinLength

Allowed length of the passcode.

block_reversed_user_number_enabled: bool

If enabled, the passcode do not allow revered phone number or extension.

block_user_number_enabled: bool

If enabled, the passcode do not allow user phone number or extension.

block_repeated_patterns_enabled: bool

If enabled, the passcode do not contain repeated pattern.

block_reversed_old_passcode_enabled: bool

If enabled, the passcode do not allow setting reversed old passcode.

class wxc_sdk.telephony.voiceportal.VoicePortalApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

location voice portal API

read(location_id: str, org_id: str = None) VoicePortalSettings[source]

Get VoicePortal

Retrieve Voice portal information for the location.

Voice portals provide an interactive voice response (IVR) system so administrators can manage auto attendant announcements.

Retrieving voice portal information for an organization requires a full read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Location to which the voice portal belongs.

  • org_id (str) – Organization to which the voice portal belongs.

Returns:

location voice portal settings

Return type:

VoicePortalSettings

update(location_id: str, settings: VoicePortalSettings, passcode: str = None, org_id: str = None)[source]

Update VoicePortal

Update Voice portal information for the location.

Voice portals provide an interactive voice response (IVR) system so administrators can manage auto attendant announcements.

Updating voice portal information for organization and/or rules requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location to which the voice portal belongs.

  • settings (VoicePortalSettings) – new settings

  • passcode (str) – new passcode

  • org_id (str) – Organization to which the voice portal belongs.

available_phone_numbers(location_id: str, phone_number: list[str] = None, org_id: str = None, **params) Generator[AvailableNumber, None, None][source]

Get VoicePortal Available Phone Numbers

List service and standard numbers that are available to be assigned as the location voice portal’s 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

passcode_rules(location_id: str, org_id: str = None) PasscodeRules[source]

Get VoicePortal Passcode Rule

Retrieve the voice portal passcode rule for a location.

Voice portals provide an interactive voice response (IVR) system so administrators can manage auto attendant announcements

Retrieving the voice portal passcode rule requires a full read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Retrieve voice portal passcode rules for this location.

  • org_id (str) – Retrieve voice portal passcode rules for this organization.

Returns:

passcode rules

Return type:

PasscodeRules

base = 'telephony/config/locations'