wxc_sdk.telephony package

Telephony types and API (location and organisation settings)

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

Bases: str, SafeEnum

An enumeration.

primary = 'PRIMARY'
alternate = 'ALTERNATE'
fax = 'FAX'
dnis = 'DNIS'
default = 'Default'
class wxc_sdk.telephony.TelephonyType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

pstn_number = 'PSTN_NUMBER'

The number is a PSTN number.

mobile_number = 'MOBILE_NUMBER'

The number is a mobile number.

class wxc_sdk.telephony.NumberListPhoneNumber(*, phoneNumber: str | None = None, extension: str | None = None, routingPrefix: str | None = None, esn: str | None = None, state: NumberState | None = None, phoneNumberType: NumberListPhoneNumberType | None = None, mainNumber: bool, tollFreeNumber: bool, includedTelephonyTypes: TelephonyType | None = None, mobileNetwork: str | None = None, routingProfile: str | None = None, isServiceNumber: bool | None = None, location: IdAndName, owner: NumberOwner | None = None, **extra_data: Any)[source]

Bases: ApiModel

Phone Number

phone_number: str | None

A unique identifier for the PSTN phone number.

extension: str | None

Extension for a PSTN phone number.

routing_prefix: str | None

Routing prefix of location.

esn: str | None

Routing prefix + extension of a person or workspace.

state: NumberState | None

Phone number’s state.

phone_number_type: NumberListPhoneNumberType | None

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.

included_telephony_types: TelephonyType | None

Indicates Telephony type for the number.

mobile_network: str | None

Mobile Network for the number if number is MOBILE_NUMBER.

routing_profile: str | None

Routing Profile for the number if number is MOBILE_NUMBER.

is_service_number: bool | None

If true, the phone number is a service number; otherwise, it is a standard number.

location: IdAndName
owner: NumberOwner | None
class wxc_sdk.telephony.NumberType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

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

Bases: ApiModel

assigned: int | None

Count of phone numbers that are in the assigned state.

un_assigned: int | None

Count of phone numbers which are in the un-assigned state.

in_active: int | None

Count of phone numbers which are inactive.

extension_only: int | None

Count of extensions only without phone number.

toll_free_numbers: int | None

Count of the toll free numbers.

total: int | None

Total phone numbers and extensions available.

mobile_number: int | None

Count of phone numbers of type MOBILE_NUMBER only without PSTN_NUMBER and extension.

service_number: int | None
class wxc_sdk.telephony.UCMProfile(*, id: str, name: str, **extra_data: Any)[source]

Bases: ApiModel

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.TestCallRoutingResult(*, language: str | None = None, timeZone: str | None = None, callSourceInfo: CallSourceInfo | None = None, destinationType: DestinationType, routingAddress: str, outsideAccessCode: str | None = None, isRejected: bool, hostedAgent: HostedUserDestination | None = None, hostedFeature: HostedFeatureDestination | None = None, pbxUser: PbxUserDestination | None = None, pstnNumber: PstnNumberDestination | None = None, virtualExtension: VirtualExtensionDestination | None = None, virtualExtensionRange: VirtualExtensionRange | None = None, routeList: RouteListDestination | None = None, featureAccessCode: FeatureAccessCodeDestination | None = None, emergency: EmergencyDestination | None = None, repair: TrunkDestination | None = None, unknownExtension: TrunkDestination | None = None, unknownNumber: TrunkDestination | None = None, appliedServices: list[AppliedService] | None = None, **extra_data: Any)[source]

Bases: ApiModel

language: str | None

Language for call queue.

time_zone: str | None

Time zone for the call queue.

call_source_info: CallSourceInfo | None

This data object is only returned when originatorNumber is specified in the request.

destination_type: DestinationType

Matching destination type for the call.

routing_address: str

FAC code if destinationType is FAC. The routing address will be returned for all other destination types.

outside_access_code: str | None

Outside access code.

is_rejected: bool

true if the call would be rejected.

hosted_user: HostedUserDestination | None

This data object is returned when destinationType is HOSTED_USER.

hosted_feature: HostedFeatureDestination | None

This data object is returned when destinationType is HOSTED_FEATURE.

pbx_user: PbxUserDestination | None

This data object is returned when destinationType is PBX_USER.

pstn_number: PstnNumberDestination | None

This data object is returned when destinationType is PSTN_NUMBER.

virtual_extension: VirtualExtensionDestination | None

This data object is returned when destinationType is VIRTUAL_EXTENSION.

virtual_extension_range: VirtualExtensionRange | None

Returned when destinationType is VIRTUAL_EXTENSION_RANGE.

route_list: RouteListDestination | None

This data object is returned when destinationType is ROUTE_LIST.

feature_access_code: FeatureAccessCodeDestination | None

This data object is returned when destinationType is FAC.

emergency: EmergencyDestination | None

This data object is returned when destinationType is EMERGENCY.

repair: TrunkDestination | None

This data object is returned when destinationType is REPAIR.

unknown_extension: TrunkDestination | None

This data object is returned when destinationType is UNKNOWN_EXTENSION.

unknown_number: TrunkDestination | None

This data object is returned when destinationType is UNKNOWN_NUMBER.

applied_services: list[AppliedService] | None

Returned if any origin is configured with intercept details, outgoing permissions by type, digit pattern, or translation pattern.

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

Bases: str, SafeEnum

An enumeration.

user = 'USER'

User

trunk = 'TRUNK'

Connection between Webex Calling and the premises.

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

Bases: str, SafeEnum

The type of call source.

route_list = 'ROUTE_LIST'

Indicates that the call source is a route list

dial_pattern = 'DIAL_PATTERN'

Indicates that the call source is a dial pattern.

unknown_extension = 'UNKNOWN_EXTENSION'

Indicates that the call source extension is unknown.

unknown_number = 'UNKNOWN_NUMBER'

Indicates that the call source phone number is unknown.

class wxc_sdk.telephony.CallSourceInfo(*, callSourceType: CallSourceType, routeListName: str | None = None, routeListId: str | None = None, dialPlanName: str | None = None, dialPattern: str | None = None, dialPlanId: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

This data object is only returned when originatorNumber is specified in the request.

call_source_type: CallSourceType

The type of call source.

route_list_name: str | None

When originatorType is “trunk”, originatorId is a valid trunk, this trunk belongs to a route group which is assigned to a route list with the name routeListA, and originatorNumber is a number assigned to routeListA. routeListA is returned here. This element is returned when callSourceType is ROUTE_LIST.

route_list_id: str | None

route list id

dial_plan_name: str | None

When originatorType is “trunk”, originatorId is a valid trunk with name trunkA, trunkA belongs to a route group which is assigned to a route list with name routeListA, trunkA is also assigned to dialPlanA as routing choice, dialPlanA has dialPattern xxxx assigned. If the originatorNumber match the dialPattern xxxx, dialPlanA is returned. This element is returned when callSourceType is DIAL_PATTERN.

dial_pattern: str | None

When originatorType is “trunk”, originatorId is a valid trunk with the name trunkA, trunkA belongs to a route group which is assigned to a route list with the name routeListA, trunkA is also assigned to dialPlanA as routing choice, dialPlanA has dialPattern xxxx assigned. If the originatorNumber match the dialPattern xxxx, dialPattern xxxx is returned. This element is returned when callSourceType is DIAL_PATTERN.

dial_plan_id: str | None

dial plan id

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

Bases: str, SafeEnum

Matching destination type for the call.

hosted_agent = 'HOSTED_AGENT'

Matching destination is a person or workspace with details in the hosted_user field.

hosted_feature = 'HOSTED_FEATURE'

Matching destination is a calling feature like auto-attendant or hunt group with details in the hostedFeature field.

pbx_user = 'PBX_USER'

Matching destination routes into a separate PBX with details in the pbxUser field.

pstn_number = 'PSTN_NUMBER'

Matching destination routes into a PSTN phone number with details in the pstnNumber field.

virtual_extension = 'VIRTUAL_EXTENSION'

Matching destination routes into a virtual extension with details in the virtualExtension field.

virtual_extension_range = 'VIRTUAL_EXTENSION_RANGE'

Matching destination routes into a virtual extension range with details in the virtualExtensionRange field.

route_list = 'ROUTE_LIST'

Matching destination routes into a route list with details in the routeList field.

fac = 'FAC'

Matching destination routes into a feature access code (FAC) with details in the featureAccessCode field.

emergency = 'EMERGENCY'

Matching destination routes into an emergency service like Red Sky, with details in the emergency field.

repair = 'REPAIR'

The route is in a repair state with routing choice details in the repair field.

unknown_extension = 'UNKNOWN_EXTENSION'

Target extension is unknown with routing choice details in the unknownExtension field.

unknown_number = 'UNKNOWN_NUMBER'

The target phone number is unknown with routing choice details in the unknownNumber field.

class wxc_sdk.telephony.LocationAndNumbers(*, locationName: str, locationId: str, phoneNumber: str | None = None, extension: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

location_name: str
location_id: str
phone_number: str | None
extension: str | None
class wxc_sdk.telephony.HostedUserDestination(*, locationName: str, locationId: str, phoneNumber: str | None = None, extension: str | None = None, id: str, type: UserType, firstName: str, lastName: str, **extra_data: Any)[source]

Bases: LocationAndNumbers

This data object is returned when destinationType is HOSTED_USER.

hu_id: str

person/workspace’s id

hu_type: UserType

Type of agent for call destination.

first_name: str

Person or workspace’s first name.

last_name: str

Person or workspace’s last name.

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

Bases: str, SafeEnum

An enumeration.

auto_attendant = 'AUTO_ATTENDANT'

Indicates that this destination is an auto attendant.

broadworks_anywhere = 'BROADWORKS_ANYWHERE'

Indicates that this destination is the Office (Broadworks) Anywhere feature.

call_queue = 'CALL_QUEUE'

Indicates that this destination is the Call Queue feature.

Indicates that this destination is the Contact Center Link feature.

group_paging = 'GROUP_PAGING'

Indicates that this destination is the Group Paging feature.

hunt_group = 'HUNT_GROUP'

Indicates that this destination is the Hunt Group feature.

voice_messaging = 'VOICE_MESSAGING'

Indicates that this destination is the Voice Messaging feature.

voice_mail_group = 'VOICE_MAIL_GROUP'

Indicates that this destination is the Voice Mail Group feature.

class wxc_sdk.telephony.HostedFeatureDestination(*, locationName: str, locationId: str, phoneNumber: str | None = None, extension: str | None = None, type: ServiceType, name: str, id: str, **extra_data: Any)[source]

Bases: LocationAndNumbers

This data object is returned when destinationType is HOSTED_FEATURE

service_type: ServiceType
name: str

service instance name

service_instance_id: str

service instance id

class wxc_sdk.telephony.TrunkDestination(*, trunkName: str | None = None, trunkId: str | None = None, routeGroupName: str | None = None, routeGroupId: str | None = None, trunkLocationName: str | None = None, trunkLocationId: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

trunk_name: str | None
trunk_id: str | None
route_group_name: str | None
route_group_id: str | None
trunk_location_name: str | None

location of the trunk, required if trunkName is returned

trunk_location_id: str | None

location id of the trunk, required if trunkName is returned

class wxc_sdk.telephony.PbxUserDestination(*, trunkName: str | None = None, trunkId: str | None = None, routeGroupName: str | None = None, routeGroupId: str | None = None, trunkLocationName: str | None = None, trunkLocationId: str | None = None, dialPlanName: str, dialPlanId: str, dialPattern: str, **extra_data: Any)[source]

Bases: TrunkDestination

This data object is returned when destinationType is PBX_USER.

dial_plan_name: str

the dial plan name that the called string matches

dial_plan_id: str
dial_pattern: str

the dial pattern that the called string matches

class wxc_sdk.telephony.PstnNumberDestination(*, trunkName: str | None = None, trunkId: str | None = None, routeGroupName: str | None = None, routeGroupId: str | None = None, trunkLocationName: str | None = None, trunkLocationId: str | None = None, **extra_data: Any)[source]

Bases: TrunkDestination

class wxc_sdk.telephony.VirtualExtensionDestination(*, trunkName: str | None = None, trunkId: str | None = None, routeGroupName: str | None = None, routeGroupId: str | None = None, trunkLocationName: str | None = None, trunkLocationId: str | None = None, locationName: str, locationId: str, phoneNumber: str | None = None, extension: str | None = None, id: str, firstName: str, lastName: str, displayName: str, **extra_data: Any)[source]

Bases: LocationAndNumbers, TrunkDestination

virtual_extension_id: str

Virtual extension ID.

first_name: str

Virtual extension display first name.

last_name: str

Virtual extension display last name.

display_name: str

Virtual extension display name.

class wxc_sdk.telephony.RouteListDestination(*, id: str, name: str, routeGroupName: str, routeGroupId: str, locationName: str, locationId: str, **extra_data: Any)[source]

Bases: ApiModel

This data object is returned when destinationType is ROUTE_LIST.

route_list_id: str
name: str
route_group_name: str
route_group_id: str
location_name: str
location_id: str
class wxc_sdk.telephony.FeatureAccessCodeDestination(*, code: str, name: str, **extra_data: Any)[source]

Bases: ApiModel

This data object is returned when destinationType is FAC.

code: str
name: str
class wxc_sdk.telephony.EmergencyDestination(*, trunkName: str | None = None, trunkId: str | None = None, routeGroupName: str | None = None, routeGroupId: str | None = None, trunkLocationName: str | None = None, trunkLocationId: str | None = None, isRedSky: bool, **extra_data: Any)[source]

Bases: TrunkDestination

This data object is returned when destinationType is EMERGENCY.

is_red_sky: bool
class wxc_sdk.telephony.TranslationPatternConfigurationLevel(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

location = 'LOCATION'

The applied services of location level.

organization = 'ORGANIZATION'

The applied services of the organization level.

class wxc_sdk.telephony.AppliedServiceTranslationPattern(*, configurationLevel: TranslationPatternConfigurationLevel | None = None, name: str | None = None, matchingPattern: str | None = None, replacementPattern: str | None = None, matchedNumber: str | None = None, translatedNumber: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

configuration_level: TranslationPatternConfigurationLevel | None

The level from which the configuration is applied.

name: str | None

Name given to a translation pattern.

matching_pattern: str | None

Matching pattern given to a translation pattern.

replacement_pattern: str | None

Replacement pattern given to a translation pattern.

matched_number: str | None

The original called number.

translated_number: str | None

The modified number after matching against matchingPattern and replacing with corresponding replacementPattern.

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

Bases: str, SafeEnum

An enumeration.

location = 'LOCATION'

The applied services at the location level.

place = 'PLACE'

The applied services at the place level.

virtual_line = 'VIRTUAL_LINE'

The applied services at the virtual line level.

people = 'PEOPLE'

The applied services at the people level.

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

Bases: str, SafeEnum

An enumeration.

disallow = 'DISALLOW'

Call intercept is disabled.

transfer = 'TRANSFER'

Call intercept is transferred to a number.

class wxc_sdk.telephony.CallInterceptDetails(*, configurationLevel: ConfigurationLevel | None = None, permission: CallInterceptDetailsPermission | None = None, transferNumber: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

configuration_level: ConfigurationLevel | None

The level from which the configuration is applied.

permission: CallInterceptDetailsPermission | None

The choices that indicate call intercept permissions.

transfer_number: str | None

The number to which the outgoing permission by type is to be transferred.

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

Bases: str, SafeEnum

An enumeration.

fraud_containment = 'FRAUD_CONTAINMENT'

Calling plan gives the Fraud Containment reason.

cisco_calling_plan = 'CISCO_CALLING_PLAN'

The Cisco calling plan reason.

transfer_number_1_not_configured = 'TRANSFER_NUMBER_1_NOT_CONFIGURED'

The reason if the transfer number 1 is not configured.

transfer_number_2_not_configured = 'TRANSFER_NUMBER_2_NOT_CONFIGURED'

The reason if the transfer number 2 is not configured.

transfer_number_3_not_configured = 'TRANSFER_NUMBER_3_NOT_CONFIGURED'

The reason if the transfer number 3 is not configured.

webex_mobile_premium_international_transfer_forward = 'WEBEX_MOBILE_PREMIUM_INTERNATIONAL_TRANSFER_FORWARD'

The reason for Webex mobile international transfer forward.

class wxc_sdk.telephony.OutgoingCallingPlanPermissionsByType(*, configurationLevel: ConfigurationLevel | None = None, callType: str | None = None, permission: Action | None = None, transferNumber: str | None = None, reason: CallingPlanReason | None = None, number: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

configuration_level: ConfigurationLevel | None

The level from which the configuration is applied.

call_type: str | None

Designates the action to be taken for each call type and if transferring the call type is allowed.

permission: Action | None

Action to be performed on the input number that matches with the OCP.

transfer_number: str | None

The number to which the outgoing permission by type is to be transferred.

reason: CallingPlanReason | None

The reason for the result reported for non-standard OCP service.

number: str | None

A transfer number is present in case it gets transferred to some other number.

class wxc_sdk.telephony.OutgoingCallingPlanPermissionsByDigitPattern(*, configurationLevel: ConfigurationLevel | None = None, name: str | None = None, permission: Action | None = None, transferNumber: str | None = None, pattern: str | None = None, reason: CallingPlanReason | None = None, number: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

configuration_level: ConfigurationLevel | None

The level from which the configuration is applied.

name: str | None

Name given to a digit pattern.

permission: Action | None

Action to be performed on the input number that matches with the digit pattern.

transfer_number: str | None
pattern: str | None

Pattern is given to a digit pattern.

reason: CallingPlanReason | None

The reason for the result reported for non-standard OCP service.

number: str | None

A transfer number is present in case it gets transferred to some other number.

class wxc_sdk.telephony.AppliedService(*, translationPattern: AppliedServiceTranslationPattern | None = None, interceptDetails: CallInterceptDetails | None = None, outgoingCallingPlanPermissionsByType: OutgoingCallingPlanPermissionsByType | None = None, outgoingCallingPlanPermissionsByDigitPattern: OutgoingCallingPlanPermissionsByDigitPattern | None = None, **extra_data: Any)[source]

Bases: ApiModel

translation_pattern: AppliedServiceTranslationPattern | None

Returns the details of the Translation Pattern if applied.

intercept_details: CallInterceptDetails | None

Returns the details of call intercept if applied.

outgoing_calling_plan_permissions_by_type: OutgoingCallingPlanPermissionsByType | None

Returns the details of permissions by type configuration if applied under OCP.

outgoing_calling_plan_permissions_by_digit_pattern: OutgoingCallingPlanPermissionsByDigitPattern | None

Returns the details of digit pattern configuration if applied under OCP.

class wxc_sdk.telephony.AnnouncementLanguage(*, name: str | None = None, code: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

name: str | None

Language name.

code: str | None

Language Code

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

Bases: ApiChild

The telephony settings (features) API.

__init__(session: RestSession)[source]
access_codes: LocationAccessCodesApi

access or authentication codes at location level

announcements_repo: AnnouncementsRepositoryApi
auto_attendant: AutoAttendantApi
call_intercept: LocationInterceptApi

location call intercept settings

call_routing: CallRoutingApi
call_recording: CallRecordingSettingsApi
calls: CallsApi
callpark: CallParkApi
callpark_extension: CallparkExtensionApi
callqueue: CallQueueApi
conference: ConferenceControlsApi
cx_essentials: CustomerExperienceEssentialsApi
dect_devices: DECTDevicesApi
devices: TelephonyDevicesApi

WxC device operations

emergency_services: OrgEmergencyServicesApi

emergency services

base = 'telephony/config'
guest_calling: GuestCallingApi
hotdesk: HotDeskApi
hotdesking_voiceportal: HotDeskingSigninViaVoicePortalApi
huntgroup: HuntGroupApi
jobs: JobsApi
location: TelephonyLocationApi

location specific settings

locations: TelephonyLocationApi
ms_teams: OrgMSTeamsSettingApi
operating_modes: OperatingModesApi
organisation_access_codes: OrganisationAccessCodesApi

organisation access codes

organisation_voicemail: OrganisationVoicemailSettingsAPI

organisation voicemail settings

paging: PagingApi
permissions_out: OutgoingPermissionsApi

location level outgoing permissions

pickup: CallPickupApi
playlist: PlayListApi
pnc: PrivateNetworkConnectApi
prem_pstn: PremisePstnApi
pstn: PSTNApi
schedules: ScheduleApi
supervisors: SupervisorApi
virtual_extensions: VirtualExtensionsApi
virtual_lines: VirtualLinesApi
voicemail_groups: VoicemailGroupsApi
voicemail_rules: VoicemailRulesApi
voice_messaging: VoiceMessagingApi
voiceportal: VoicePortalApi
phone_numbers(location_id: str | None = None, phone_number: str | None = None, available: bool | None = None, order: str | None = None, owner_name: str | None = None, owner_id: str | None = None, owner_type: OwnerType | None = None, extension: str | None = None, number_type: NumberType | None = None, phone_number_type: NumberListPhoneNumberType | None = None, state: NumberState | None = None, details: bool | None = None, toll_free_numbers: bool | None = None, restricted_non_geo_numbers: bool | None = None, included_telephony_type: TelephonyType | None = None, service_number: bool | None = None, org_id: str | None = None, **params) Generator[NumberListPhoneNumber, None, None][source]

Get Phone Numbers for an Organization with Given Criterias

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

Numbers can be standard, service, or mobile. Both standard and service numbers are PSTN numbers. Service numbers are considered as high-utilization or high-concurrency phone numbers and can be assigned to features like auto-attendants, call queues, and hunt groups. Phone numbers can be linked to a specific location, be active or inactive, and be assigned or unassigned. The owner of a number is the person, workspace, or feature to which the number is assigned. Only a person can own a mobile number.

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

  • 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.

  • details (bool) – Returns the overall count of the PSTN phone numbers along with other details for given organization.

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

  • restricted_non_geo_numbers (bool) – Returns the list of restricted non geographical numbers.

  • included_telephony_type (TelephonyType) – Returns the list of phone numbers that are of given includedTelephonyType. By default if this query parameter is not provided, it will list both PSTN and Mobile Numbers. Possible input values are PSTN_NUMBER, MOBILE_NUMBER.

  • service_number (bool) – Returns the list of service phone numbers.

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

Returns:

yields NumberListPhoneNumber instances

phone_number_details(org_id: str | None = None) NumberDetails[source]

get summary (counts) of phone numbers

Parameters:

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

Returns:

phone number details

Return type:

NumberDetails

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

Validate the List of Extensions

Validates the list of Extensions provided by the customer at the organization level. It checks the extension meets the current extension length limits and does not conflict with the extensions of organization-level entities and settings. To check for extension use across all locations, use the Get Phone Numbers API. To validate an extension and check for conflicts for a specific location, use the Validate Extensions API.

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

Parameters:

extensions (list[str]) – Array of Strings of ID of Extensions.

Returns:

validation response

Return type:

wxc_sdk.common.ValidateExtensionsResponse

validate_phone_numbers(phone_numbers: list[str], org_id: str | None = None) ValidatePhoneNumbersResponse[source]

Validate phone numbers

Validate the list of phone numbers in an organization. Each phone number’s availability is indicated in the response.

Each location has a set of phone numbers that can be assigned to people, workspaces, or features. Phone numbers must follow E.164 format for all countries, except for the United States, which can also follow the National format. Active phone numbers are in service.

Validating a phone number in an organization requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • phone_numbers (list[str]) – List of phone numbers to be validated.

  • org_id (str) – Organization of the Route Group.

Returns:

validation result

Return type:

wxc_sdk.common.ValidatePhoneNumbersResponse

ucm_profiles(org_id: str | None = None) list[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 (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

route_choices(route_group_name: str | None = None, trunk_name: str | None = None, order: str | None = None, org_id: str | None = None) Generator[RouteIdentity, None, None][source]

Read the List of Routing Choices

List all Routes for the organization.

Trunk and Route Group qualify as Route. Trunks and Route Groups provide you the ability to configure Webex Calling to manage calls between Webex Calling hosted users and premises PBX(s) users. This solution lets you configure users to use Cloud PSTN (CCP or Cisco PSTN) or Premises-based PSTN.

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

Parameters:
  • route_group_name – Return the list of route identities matching the route group name.

  • trunk_name – Return the list of route identities matching the trunk name.

  • order – Order the route identities according to the designated fields. Available sort fields: routeName, routeType.

  • org_id – List route identities for this organization.

Returns:

test_call_routing(originator_id: str, originator_type: OriginatorType, destination: str, originator_number: str | None = None, include_applied_services: bool | None = None, org_id: str | None = None) TestCallRoutingResult[source]

Test Call Routing

Validates that an incoming call can be routed.

Dial plans route calls to on-premises destinations by use of trunks or route groups. They are configured globally for an enterprise and apply to all users, regardless of location. A dial plan also specifies the routing choice (trunk or route group) for calls that match any of its dial patterns. Specific dial patterns can be defined as part of your dial plan.

Test call routing requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • originator_id (str) – This element is used to identify the originating party. It can be a person ID or a trunk ID.

  • originator_type (OriginatorType) – This element is used to identify if the originatorId is of type PEOPLE or TRUNK.

  • destination (str) – This element specifies the called party. It can be any dialable string, for example, an ESN number, E.164 number, hosted user DN, extension, extension with location code, URL, or FAC code.

  • originator_number (str) – Only used when originatorType is TRUNK. The originatorNumber can be a phone number or URI.

  • include_applied_services (bool) – This element is used to retrieve if any translation pattern, call intercept, permission by type or permission by digit pattern is present for the called party.

  • org_id (str) – Organization in which we are validating a call routing.

Return type:

TestCallRoutingResult

supported_devices(allow_configure_layout_enabled: bool | None = None, type_: str | None = None, org_id: str | None = None) SupportedDevices[source]

Read the List of Supported Devices

Gets the list of supported devices for an organization.

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

Parameters:
  • allow_configure_layout_enabled (bool) – List supported devices that allow the user to configure the layout.

  • type (str) – List supported devices of a specific type. To excluded device types from a request or query, add type=not:DEVICE_TYPE. For example, type=not:MPP.

  • org_id (str) – List supported devices for an organization.

Return type:

SupportedDevices

device_settings(org_id: str | None = None) DeviceCustomization[source]

Get device override settings for an organization.

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 supported devices for an organization location.

Returns:

device customization response

Return type:

DeviceCustomization

read_list_of_announcement_languages() list[AnnouncementLanguage][source]

Read the List of Announcement Languages

List all languages supported by Webex Calling for announcements and voice prompts.

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

read_moh(org_id: str | None = None) MoHConfig[source]

Get the organization Music on Hold configuration

Retrieve the organization’s Music on Hold settings.

Parameters:

org_id (str) – Retrieve Music on Hold settings for this organization.

Return type:

MoHConfig

update_moh(settings: MoHConfig, org_id: str | None = None)[source]

Update the organization Music on Hold configuration

Update the organization’s Music on Hold settings.

Parameters:
  • settings (MoHConfig) – Music on Hold settings

  • org_id (str) – Patch Music on Hold for this organization.

Return type:

None

create_a_call_token(called_number: str, guest_name: str | None = None) str[source]

Create a call token

Create a call token before initiating the click-to-call interaction. The call token embeds information related to click-to-call interaction into an encrypted JWE token. This token is used along with the guest token to initialise the web calling SDK

Creating a call token requires a service app access token with a scope of spark:webrtc_calling.

Parameters:
  • called_number (str) – Number to be called. This number should be enabled as guest calling destination at Webex Control Hub by the administrator.

  • guest_name (str) – Name of the guest caller.

Return type:

str

get_call_captions_settings(org_id: str | None = None) OrgCallCaptions[source]

Get the organization call captions settings

Retrieve the organization’s call captions settings.

The call caption feature allows the customer to enable and manage closed captions and transcript functionality (rolling caption panel) in Webex Calling, without requiring the user to escalate the call to a meeting.

This API requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:

org_id (str) – Unique identifier for the organization.

Return type:

OrgCallCaptions

update_call_captions_settings(settings: OrgCallCaptions, org_id: str | None = None)[source]

Update the organization call captions settings

Update the organization’s call captions settings.

The call caption feature allows the customer to enable and manage closed captions and transcript functionality (rolling caption panel) in Webex Calling, without requiring the user to escalate the call to a meeting.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • settings (OrgCallCaptions) – Organization call captions settings

  • org_id (str) – Unique identifier for the organization.

Return type:

None

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

Bases: str, SafeEnum

An enumeration.

LEGACY = 'LEGACY'

Legacy MoH Theme

OPUS = 'OPUS'

Opus MoH Theme

class wxc_sdk.telephony.MoHConfig(*, defaultOrgMoh: MoHTheme, **extra_data: Any)[source]

Bases: ApiModel

default_org_moh: MoHTheme

Choose between Opus Number 1 (Music On Hold used in other Cisco products like UCM) and existing legacy Music On Hold.

Type:

Default org level Music on Hold option, can be one of two options

wxc_sdk.telephony.NameAndCode

alias of AnnouncementLanguage

class wxc_sdk.telephony.OrgCallCaptions(*, orgClosedCaptionsEnabled: bool | None = None, orgTranscriptsEnabled: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

org_closed_captions_enabled: bool | None

Organization-level closed captions are enabled or disabled.

org_transcripts_enabled: bool | None

Organization-level transcripts are enabled or disabled.

Subpackages

Submodules