wxc_sdk.telephony package

Telephony types and API (location and organisation settings)

class wxc_sdk.telephony.OwnerType(value)[source]

Bases: str, Enum

An enumeration.

people = 'PEOPLE'
place = 'PLACE'
auto_attendant = 'AUTO_ATTENDANT'
call_center = 'CALL_CENTER'
group_paging = 'GROUP_PAGING'
hunt_group = 'HUNT_GROUP'
voice_messaging = 'VOICE_MESSAGING'
broadworks_anywhere = 'BROADWORKS_ANYWHERE'
route_list = 'ROUTE_LIST'
voicemail_group = 'VOICEMAIL_GROUP'
class wxc_sdk.telephony.NumberLocation(*, id: str, name: str)[source]

Bases: ApiModel

Location of a phone number

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

location_id: str

ID of location for phone number.

name: str

Name of the location for phone number

class wxc_sdk.telephony.NumberOwner(*, id: str = None, type: OwnerType = None, lastName: str = None, firstName: str = None)[source]

Bases: ApiModel

Owner of a phone number

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

owner_id: Optional[str]

ID of the owner to which PSTN Phone number is assigned.

owner_type: Optional[OwnerType]

Type of the PSTN phone number’s owner

last_name: Optional[str]

Last name of the PSTN phone number’s owner

first_name: Optional[str]

First name of the PSTN phone number’s owner

class wxc_sdk.telephony.NumberState(value)[source]

Bases: str, Enum

An enumeration.

active = 'ACTIVE'
inactive = 'INACTIVE'
class wxc_sdk.telephony.NumberListPhoneNumberType(value)[source]

Bases: str, Enum

An enumeration.

primary = 'PRIMARY'
alternate = 'ALTERNATE'
class wxc_sdk.telephony.NumberListPhoneNumber(*, phoneNumber: str = None, extension: str = None, state: NumberState = None, phoneNumberType: NumberListPhoneNumberType = None, mainNumber: bool, tollFreeNumber: bool, location: NumberLocation, owner: NumberOwner = None)[source]

Bases: ApiModel

Phone Number

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

phone_number: Optional[str]

A unique identifier for the PSTN phone number.

extension: Optional[str]

Extension for a PSTN phone number.

state: Optional[NumberState]

Phone number’s state.

phone_number_type: Optional[NumberListPhoneNumberType]

Type of phone number.

main_number: bool

Indicates if the phone number is used as location clid.

toll_free_number: bool

Indicates if a phone number is a toll free number.

location: NumberLocation
owner: Optional[NumberOwner]
class wxc_sdk.telephony.NumberType(value)[source]

Bases: str, Enum

An enumeration.

extension = 'EXTENSION'
number = 'NUMBER'
class wxc_sdk.telephony.NumberDetails(*, assigned: int, unAssigned: int, inActive: int, extensionOnly: int, tollFreeNumbers: int, total: int)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

assigned: int
un_assigned: int
in_active: int
extension_only: int
toll_free_numbers: int
total: int
class wxc_sdk.telephony.ValidateExtensionResponseStatus(value)[source]

Bases: str, Enum

An enumeration.

ok = 'OK'
errors = 'ERRORS'
class wxc_sdk.telephony.ValidateExtensionStatus(*, extension: str, state: ValidateExtensionStatusState, errorCode: int = None, message: str = None)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

extension: str

Indicates the extention Id for which the status is about .

state: ValidateExtensionStatusState

Indicate the status for the given extention id .

error_code: Optional[int]

Error Code .

message: Optional[str]
class wxc_sdk.telephony.ValidateExtensionStatusState(value)[source]

Bases: str, Enum

An enumeration.

valid = 'VALID'
duplicate = 'DUPLICATE'
DUPLICATE_IN_LIST = 'DUPLICATE_IN_LIST'
invalid = 'INVALID'
class wxc_sdk.telephony.ValidateExtensionsResponse(*, status: ValidateExtensionResponseStatus, extensionStatus: list[wxc_sdk.telephony.ValidateExtensionStatus] = None)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

status: ValidateExtensionResponseStatus
extension_status: Optional[list[wxc_sdk.telephony.ValidateExtensionStatus]]
class wxc_sdk.telephony.UCMProfile(*, id: str, name: str)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

profile_id: str

A unique identifier for the calling UC Manager Profile.

name: str

Unique name for the calling UC Manager Profile.

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

Bases: ApiChild

The telephony settings (features) API.

access_codes: AccessCodesApi

access or authentication codes

auto_attendant: AutoAttendantApi
calls: CallsApi
callpark: CallParkApi
callpark_extension: CallparkExtensionApi
base = 'telephony'
callqueue: CallQueueApi
huntgroup: HuntGroupApi
location_intercept: LocationInterceptApi
location_moh: LocationMoHApi
location_voicemail: LocationVoicemailSettingsApi

Location VM settings (only enable/disable transcription for now)

organisation_voicemail: OrganisationVoicemailSettingsAPI

organisation voicemail settings

paging: PagingApi
permissions_out: OutgoingPermissionsApi
pickup: CallPickupApi
pnc: PrivateNetworkConnectApi
schedules: ScheduleApi
voicemail_groups: VoicemailGroupsApi
voicemail_rules: VoicemailRulesApi
voiceportal: VoicePortalApi
phone_numbers(*, location_id: Optional[str] = None, phone_number: Optional[str] = None, available: Optional[bool] = None, order: Optional[str] = None, owner_name: Optional[str] = None, owner_id: Optional[str] = None, owner_type: Optional[OwnerType] = None, extension: Optional[str] = None, number_type: Optional[NumberType] = None, phone_number_type: Optional[NumberListPhoneNumberType] = None, state: Optional[NumberState] = None, toll_free_numbers: Optional[bool] = None, org_id: Optional[str] = None, **params) Generator[NumberListPhoneNumber, None, None][source]

Get Phone Numbers for an Organization with given criteria.

List all the phone numbers for the given organization along with the status and owner (if any).

PSTN phone numbers are associated with a specific location and can be active/inactive and assigned/unassigned. The owner is the person, workspace, or feature to which the number is assigned.

Retrieving this list requires a full or read-only 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.

  • phone_number (str) – Search for this phone number.

  • available (bool) – Search among the available phone numbers. This parameter cannot be used along with owner_type parameter when set to true.

  • order (str) – Sort the list of phone numbers based on the following:lastName,dn,extension. Default sort will be based on number and extension in an Ascending order

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

  • owner_id (str) – Returns only the matched number/extension entries assigned to the feature with specified uuid/broadsoftId.

  • owner_type (OwnerType) – Returns the list of phone numbers that are of given owner_type.

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

  • number_type (NumberType) – Returns the filtered list of PSTN phone numbers that contains given type of numbers. This parameter cannot be used along with available or state.

  • phone_number_type (NumberListPhoneNumberType) – Returns the filtered list of PSTN phone numbers that are of given phoneNumberType.

  • state (NumberState) – Returns the list of PSTN phone numbers with matching state.

  • toll_free_numbers (bool) – Returns the list of toll free phone numbers.

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

Returns

yields NumberListPhoneNumber instances

phone_number_details(*, org_id: Optional[str] = None) NumberDetails[source]

get summary (counts) of phone numbers

Parameters

org_id (str) – detaild for numbers in this organization.

Returns

phone number details

Return type

NumberDetails

validate_extensions(*, extensions: list[str]) ValidateExtensionsResponse[source]

Validate the List of Extensions

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

Parameters

extensions – Array of Strings of ID of Extensions.

Returns

ucm_profiles(*, org_id: Optional[str] = None) list[wxc_sdk.telephony.UCMProfile][source]

Read the List of UC Manager Profiles

List all calling UC Manager Profiles for the organization.

UC Manager Profiles are applicable if your organization uses Jabber in Team Messaging mode or Calling in Webex Teams (Unified CM).

The UC Manager Profile has an organization-wide default and may be overridden for individual persons, although currently only setting at a user level is supported by Webex APIs.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:people_read as this API is designed to be used in conjunction with calling behavior at the user level.

Parameters

org_id (str) – List manager profiles in this organization.

Returns

list of UCMProfile

change_announcement_language(*, location_id: str, language_code: str, agent_enabled: Optional[bool] = None, service_enabled: Optional[bool] = None, org_id: Optional[str] = None)[source]

Change Announcement Language

Change announcement language for the given location.

Change announcement language for current people/workspaces and/or existing feature configurations. This does not change the default announcement language which is applied to new users/workspaces and new feature configurations.

Changing announcement language for the given location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Change announcement language for this location.

  • language_code (str) – Language code.

  • agent_enabled (bool) – Set to true to change announcement language for existing people and workspaces.

  • service_enabled (bool) – Set to true to change announcement language for existing feature configurations.

  • org_id (str) – Change announcement language for this organization.

Subpackages

Submodules