wxc_sdk.telephony.devices package
Telephony devices
- class wxc_sdk.telephony.devices.DectDevice(*, model: str, displayName: str, numberOfBaseStations: int, numberOfLinePorts: int, numberOfRegistrationsSupported: int)[source]
Bases:
ApiModelCreate 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.
- model: str
Model name of the device.
- display_name: str
Display name of the device.
- number_of_base_stations: int
Indicates number of base stations.
- number_of_line_ports: int
Indicates number of port lines,
- number_of_registrations_supported: int
Indicates number of supported registrations.
- class wxc_sdk.telephony.devices.MemberCommon(*, id: str, memberType: UserType = UserType.people, firstName: str | None = None, lastName: str | None = None, phoneNumber: str | None = None, extension: str | None = None, t38FaxCompressionEnabled: bool | None = None, lineType: PrimaryOrShared = PrimaryOrShared.primary, allowCallDeclineEnabled: bool | None = True, location: IdAndName | None = None)[source]
Bases:
ApiModelCreate 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.
- member_id: str
Unique identifier for the member.
- first_name: str | None
First name of a person or workspace.
- last_name: str | None
Last name of a person or workspace.
- phone_number: str | None
Phone Number of a person or workspace. In some regions phone numbers are not returned in E.164 format. This will be supported in a future update.
- extension: str | None
Extension of a person or workspace.
- t38_fax_compression_enabled: bool | None
T.38 Fax Compression setting and is available only for ATA Devices. Choose T.38 fax compression if the device requires this option. This will override user level compression options.
- line_type: PrimaryOrShared
Line type is used to differentiate Primary and SCA, at which endpoint it is assigned.
- allow_call_decline_enabled: bool | None
Set how a person’s device behaves when a call is declined. When set to true, a call decline request is extended to all the endpoints on the device. When set to false, a call decline request only declines the current endpoint.
- class wxc_sdk.telephony.devices.DeviceMember(*, id: str, memberType: UserType = UserType.people, firstName: str | None = None, lastName: str | None = None, phoneNumber: str | None = None, extension: str | None = None, t38FaxCompressionEnabled: bool | None = None, lineType: PrimaryOrShared = PrimaryOrShared.primary, allowCallDeclineEnabled: bool | None = True, location: IdAndName | None = None, primaryOwner: bool = False, port: int = 1, lineWeight: int = 1, lineLabel: str | None = None, hostIP: str | None = None, remoteIP: str | None = None, hotlineEnabled: bool = False, hotlineDestination: str | None = None)[source]
Bases:
MemberCommonCreate 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.
- primary_owner: bool
This field indicates whether the person or the workspace is the owner of the device, and points to a primary Line/Port of the device.
- port: int
Port number assigned to person or workspace.
- line_weight: int
Number of lines that have been configured for the person on the device. Can only be larger than one for primary owner
- line_label: str | None
- host_ip: str | None
Registration Host IP address for the line port.
- remote_ip: str | None
Registration Remote IP address for the line port.
- hotline_enabled: bool
Enable Hotline. Configure this line to automatically call a predefined number whenever taken off-hook. Once enabled, the line can only make calls to the predefined number set in hotlineDestination.
- hotline_destination: str | None
The preconfigured number for Hotline. Required only if hotlineEnabled is set to true.
- static from_available(available: AvailableMember) DeviceMember[source]
- class wxc_sdk.telephony.devices.DeviceMembersResponse(*, model: str, members: list[wxc_sdk.telephony.devices.DeviceMember], maxLineCount: int)[source]
Bases:
ApiModelGet Device Members response
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.
- model: str
- members: list[wxc_sdk.telephony.devices.DeviceMember]
- max_line_count: int
- class wxc_sdk.telephony.devices.AvailableMember(*, id: str, memberType: UserType = UserType.people, firstName: str | None = None, lastName: str | None = None, phoneNumber: str | None = None, extension: str | None = None, t38FaxCompressionEnabled: bool | None = None, lineType: PrimaryOrShared = PrimaryOrShared.primary, allowCallDeclineEnabled: bool | None = True, location: IdAndName | None = None)[source]
Bases:
MemberCommonCreate 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.
- member_id: str
Unique identifier for the member.
- first_name: str | None
First name of a person or workspace.
- last_name: str | None
Last name of a person or workspace.
- phone_number: str | None
Phone Number of a person or workspace. In some regions phone numbers are not returned in E.164 format. This will be supported in a future update.
- extension: str | None
Extension of a person or workspace.
- t38_fax_compression_enabled: bool | None
T.38 Fax Compression setting and is available only for ATA Devices. Choose T.38 fax compression if the device requires this option. This will override user level compression options.
- line_type: PrimaryOrShared
Line type is used to differentiate Primary and SCA, at which endpoint it is assigned.
- allow_call_decline_enabled: bool | None
Set how a person’s device behaves when a call is declined. When set to true, a call decline request is extended to all the endpoints on the device. When set to false, a call decline request only declines the current endpoint.
- class wxc_sdk.telephony.devices.MACState(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumState of the MAC address.
- available = 'AVAILABLE'
The requested MAC address is available.
The requested MAC address is unavailable.
- duplicate_in_list = 'DUPLICATE_IN_LIST'
The requested MAC address is duplicated.
- invalid = 'INVALID'
The requested MAC address is invalid.
- class wxc_sdk.telephony.devices.MACStatus(*, mac: str, state: MACState, errorCode: int | None = None, message: str | None = None)[source]
Bases:
ApiModelCreate 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.
- mac: str
MAC address.
- error_code: int | None
MAC address validation error code.
- message: str | None
Provides a status message about the MAC address.
- class wxc_sdk.telephony.devices.MACValidationResponse(*, status: ValidationStatus, macStatus: list[wxc_sdk.telephony.devices.MACStatus] | None = None)[source]
Bases:
ApiModelCreate 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: ValidationStatus
Status of MAC address.
- mac_status: list[wxc_sdk.telephony.devices.MACStatus] | None
Contains an array of all the MAC address provided and their statuses.
- class wxc_sdk.telephony.devices.TelephonyDevicesApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChildTelephony devices API
- members(device_id: str, org_id: str | None = None) DeviceMembersResponse[source]
Get Device Members
Get the list of all the members of the device including primary and secondary users.
A device member can be either a person or a workspace. An admin can access the list of member details, modify member details and search for available members on a device.
Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
device_id (str) – Unique identifier for the device.
org_id (str) – Retrieves the list of all members of the device in this Organization.
- Returns:
Device model, line count, and members
- Return type:
- update_members(device_id: str, members: list[Union[wxc_sdk.telephony.devices.DeviceMember, wxc_sdk.telephony.devices.AvailableMember]] | None, org_id: str | None = None)[source]
Modify member details on the device.
A device member can be either a person or a workspace. An admin can access the list of member details, modify member details and search for available members on a device.
Modifying members on the device requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
device_id (str) – Unique identifier for the device.
members (list[Union[DeviceMember, AvailableMember]) – New member details for the device. If the member’s list is missing then all the users are removed except the primary user.
org_id (str) – Modify members on the device in this organization.
- available_members(device_id: str, location_id: str, member_name: str | None = None, phone_number: str | None = None, extension: str | None = None, org_id: str | None = None, **params) Generator[AvailableMember, None, None][source]
Search members that can be assigned to the device.
A device member can be either a person or a workspace. A admin can access the list of member details, modify member details and search for available members on a device.
This requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
device_id (str) – Unique identifier for the device.
location_id (str) – Search (Contains) based on number.
member_name (str) – Search (Contains) numbers based on member name.
phone_number (str) – Search (Contains) based on number.
extension (str) – Search (Contains) based on extension.
org_id (str) – Retrieves the list of available members on the device in this Organization.
- Returns:
list of available members
- apply_changes(device_id: str, org_id: str | None = None)[source]
Apply Changes for a specific device
Issues request to the device to download and apply changes to the configuration.
Applying changes for a specific device requires a full administrator auth token with a scope of spark-admin:telephony_config_write. :param device_id: Unique identifier for the device. :type device_id: str :param org_id: Apply changes for a device in this Organization. :type org_id: str
- device_settings(device_id: str, device_model: str, org_id: str | None = None) DeviceCustomization[source]
Get override settings for a device.
Device settings lists all the applicable settings for an MPP and an ATA devices at the device level. An admin can also modify the settings. DECT devices do not support settings at the device level.
This requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
device_id (str) – Unique identifier for the device.
device_model (str) – Model type of the device.
org_id (str) – Settings on the device in this organization.
- Returns:
Device settings
- Return type:
- update_device_settings(device_id: str, device_model: str, customization: DeviceCustomization, org_id: str | None = None)[source]
Modify override settings for a device.
Device settings list all the applicable settings for an MPP and an ATA devices at the device level. Admins can also modify the settings. NOTE: DECT devices do not support settings at the device level.
Updating settings on the device requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
device_id (str) – Unique identifier for the device.
device_model (str) – Device model name.
customization (DeviceCustomization) – Indicates the customization object of the device settings.
org_id (str) – Organization in which the device resides..
Example :
# target_device is a TelephonyDevice object target_device: TelephonyDevice # get device level settings settings = api.telephony.devices.device_settings(device_id=target_device.device_id, device_model=target_device.model) # update settings (display name format) and enable device level customization settings.customizations.mpp.display_name_format = DisplayNameSelection.person_last_then_first_name settings.custom_enabled = True # update the device level settings api.telephony.devices.update_device_settings(device_id=target_device.device_id, device_model=target_device.model, customization=settings) # apply changes to device api.telephony.devices.apply_changes(device_id=target_device.device_id)
- dect_devices(org_id: str | None = None) list[wxc_sdk.telephony.devices.DectDevice][source]
Read the DECT device type list
Get DECT device type list with base stations and line ports supported count. This is a static list.
Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
org_id –
- Returns:
- validate_macs(macs: list[str], org_id: str | None = None) MACValidationResponse[source]
Validate a list of MAC addresses.
Validating this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
macs (list[str]) – MAC addresses to be validated.
org_id (str) – Validate the mac address(es) for this organization.
- Returns:
validation response
- Return type:
- base = 'telephony/config/devices'
- session: RestSession
REST session