wxc_sdk.telephony.virtual_line package

class wxc_sdk.telephony.virtual_line.VirtualLine(*, id: str | None = None, lastName: str | None = None, firstName: str | None = None, displayName: str | None = None, callerIdLastName: str | None = None, callerIdFirstName: str | None = None, callerIdNumber: str | None = None, externalCallerIdNamePolicy: ExternalCallerIdNamePolicy | None = None, customExternalCallerIdName: str | None = None, number: VirtualLineNumber | None = None, location: VirtualLineLocation | None = None, numberOfDevicesAssigned: int | None = None, billingPlan: str | None = None, directorySearchEnabled: bool | None = None, announcementLanguage: str | None = None, timeZone: str | None = None, devices: list[TelephonyDevice] | None = None)[source]

Bases: ApiModel

id: str | None

A unique identifier for the virtual line. example: Y2lzY29zcGFyazovL3VzL1ZJUlRVQUxfTElORS9iMTJhNTBiMi01N2NiLTQ0MzktYjc1MS1jZDQ4M2I4MjhmNmU=

last_name: str | None

Last name for virtual line. example: Shen

first_name: str | None

First name for virtual line. example: Tom

display_name: str | None

Display name defined for a virtual line. example: Bob Smith

caller_id_last_name: str | None

callerIdLastName for virtual line. example: Shen

caller_id_first_name: str | None

callerIdFirstName for virtual line. example: Tom

caller_id_number: str | None

callerIdNumber for virtual line. example: +15558675313

external_caller_id_name_policy: ExternalCallerIdNamePolicy | None

externalCallerIdNamePolicy for the virtual line. example: DIRECT_LINE

custom_external_caller_id_name: str | None

customExternalCallerIdName for virtual line. example: Tom

number: VirtualLineNumber | None

Calling details of virtual line.

location: VirtualLineLocation | None

Location details of virtual line.

number_of_devices_assigned: int | None

Number of devices assigned to a virtual line. example: 1

billing_plan: str | None

Type of billing plan. example: BCOCP1

directory_search_enabled: bool | None

Flag to indicate a directory search. example: True

announcement_language: str | None

Virtual Line’s announcement language. example: ‘French’

time_zone: str | None

Time zone defined for the virtual line. example: Africa/Algiers

devices: list[TelephonyDevice] | None

Calling details of virtual line. List of devices assigned to a virtual line.

class wxc_sdk.telephony.virtual_line.VirtualLinesApi(session)[source]

Bases: ApiChild

call_bridge: CallBridgeApi

Call bridge settings

call_intercept: CallInterceptApi

call intercept settings

call_recording: CallRecordingApi

call recording settings

call_waiting: CallWaitingApi

call waiting settings

caller_id: CallerIdApi

caller id settings

forwarding: PersonForwardingApi

forwarding settings

permissions_in: IncomingPermissionsApi

incoming permissions

permissions_out: OutgoingPermissionsApi

outgoing permissions

create(first_name: str, last_name: str, location_id: str, display_name: str | None = None, phone_number: str | None = None, extension: str | None = None, caller_id_last_name: str | None = None, caller_id_first_name: str | None = None, caller_id_number: str | None = None, org_id: str | None = None) str[source]

Create a Virtual Line

Create new Virtual Line for the given location.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Creating a virtual line requires a full or user administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • first_name (str) – First name defined for a virtual line. Minimum length is 1. Maximum length is 30.

  • last_name (str) – Last name defined for a virtual line. Minimum length is 1. Maximum length is 30.

  • location_id (str) – ID of location for virtual line.

  • display_name (str) – Display name defined for a virtual line.

  • phone_number (str) – Phone number of a virtual line. Minimum length is 1. Maximum length is 23. Either phoneNumber or extension is mandatory.

  • extension (str) – Extension of a virtual line. Minimum length is 2. Maximum length is 10. Either phoneNumber or extension is mandatory.

  • caller_id_last_name (str) – Last name used in the Calling Line ID and for dial-by-name functions. Minimum length is 1. Maximum length is 30.

  • caller_id_first_name (str) – First name used in the Calling Line ID and for dial-by-name functions. Minimum length is 1. Maximum length is 30.

  • caller_id_number (str) – Phone number to appear as the CLID for all calls. Minimum length is 1. Maximum length is 23.

  • org_id (str) – Create the virtual line for this organization.

Return type:

str

base = 'telephony/config/virtualLines'
delete(virtual_line_id: str, org_id: str | None = None)[source]

Delete a Virtual Line

Delete the designated Virtual Line.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Deleting a virtual line requires a full or user administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • virtual_line_id (str) – Delete the virtual line with the matching ID.

  • org_id (str) – Delete the virtual line from this organization.

Return type:

None

details(virtual_line_id: str, org_id: str | None = None) VirtualLine[source]

Get Details for a Virtual Line

Retrieve Virtual Line details.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Retrieving virtual line details requires a full or user or read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • virtual_line_id (str) – Retrieve settings for a virtual line with the matching ID.

  • org_id (str) – Retrieve virtual line settings from this organization.

Return type:

GetVirtualLineObject

update(virtual_line_id: str, first_name: str | None = None, last_name: str | None = None, display_name: str | None = None, phone_number: str | None = None, extension: str | None = None, announcement_language: str | None = None, caller_id_last_name: str | None = None, caller_id_first_name: str | None = None, caller_id_number: str | None = None, time_zone: str | None = None, org_id: str | None = None)[source]

Update a Virtual Line

Update the designated Virtual Line.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Updating a virtual line requires a full or user or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • virtual_line_id (str) – Update settings for a virtual line with the matching ID.

  • first_name (str) – First name defined for a virtual line. Minimum length is 1. Maximum length is 30.

  • last_name (str) – Last name defined for a virtual line. Minimum length is 1. Maximum length is 30.

  • display_name (str) – Display name defined for a virtual line.

  • phone_number (str) – Phone number of a virtual line. Minimum length is 1. Maximum length is 23. Either phoneNumber or extension is mandatory.

  • extension (str) – Extension of a virtual line. Minimum length is 2. Maximum length is 10. Either phoneNumber or extension is mandatory.

  • announcement_language (str) – Virtual Line’s announcement language.

  • caller_id_last_name (str) – Last name used in the Calling Line ID and for dial-by-name functions. Minimum length is 1. Maximum length is 30.

  • caller_id_first_name (str) – First name used in the Calling Line ID and for dial-by-name functions. Minimum length is 1. Maximum length is 30.

  • caller_id_number (str) – Phone number to appear as the CLID for all calls. Minimum length is 1. Maximum length is 23.

  • time_zone (str) – Time zone defined for the virtual line.

  • org_id (str) – Update virtual line settings from this organization.

Return type:

None

get_phone_number(virtual_line_id: str, org_id: str | None = None) VirtualLineNumberPhoneNumber[source]

Get Phone Number assigned for a Virtual Line

Get details on the assigned phone number and extension for the virtual line.

Retrieving virtual line phone number details requires a full or user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • virtual_line_id (str) – Retrieve settings for a virtual line with the matching ID.

  • org_id (str) – Retrieve virtual line settings from this organization.

Return type:

GetVirtualLineNumberObjectPhoneNumber

Update Directory search for a Virtual Line

Update the directory search for a designated Virtual Line.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Updating Directory search for a virtual line requires a full or user administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • virtual_line_id (str) – Update settings for a virtual line with the matching ID.

  • enabled (bool) – Whether or not the directory search for a virtual line is enabled.

  • org_id (str) – Update virtual line settings from this organization.

Return type:

None

assigned_devices(virtual_line_id: str, org_id: str | None = None) VirtualLineDevices[source]

Get List of Devices assigned for a Virtual Line

Retrieve Device details assigned for a virtual line.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Retrieving the assigned device detials for a virtual line requires a full or user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • virtual_line_id (str) – Retrieve settings for a virtual line with the matching ID.

  • org_id (str) – Retrieve virtual line settings from this organization.

Return type:

VirtualLineDevices

dect_networks(virtual_line_id: str, org_id: str | None = None) list[AssignedDectNetwork][source]

Get List of Dect Networks Handsets for a Virtual Line

Retrieve DECT Network details assigned for a virtual line.

Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users.

Retrieving the assigned device detials for a virtual line requires a full or user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • virtual_line_id (str) – Retrieve settings for a virtual line with the matching ID.

  • org_id (str) – Retrieve virtual line settings from this organization.

Return type:

list[AssignedDectNetwork]

list(org_id: str | None = None, location_id: list[str] | None = None, id: list[str] | None = None, owner_name: list[str] | None = None, phone_number: list[str] | None = None, location_name: list[str] | None = None, order: list[str] | None = None, has_device_assigned: bool | None = None, has_extension_assigned: bool | None = None, has_dn_assigned: bool | None = None, **params) Generator[VirtualLine, None, None][source]

List all Virtual Lines for the organization. Virtual line is a capability in Webex Calling that allows administrators to configure multiple lines to Webex Calling users. 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 virtual lines for this organization.

  • location_id (List[str]) – Return the list of virtual lines matching these location ids. Example for multiple values - ?locationId=locId1&locationId=locId2.

  • id (List[str]) – Return the list of virtual lines matching these virtualLineIds.

  • owner_name (List[str]) – Return the list of virtual lines matching these owner names.

  • phone_number (List[str]) – Return the list of virtual lines matching these phone numbers.

  • location_name (List[str]) – Return the list of virtual lines matching the location names.

  • order (List[str]) – Return the list of virtual lines based on the order. Default sort will be in an Ascending order. Maximum 3 orders allowed at a time.

  • has_device_assigned (bool) – If true, includes only virtual lines with devices assigned. When not explicitly specified, the default includes both virtual lines with devices assigned and not assigned.

  • has_extension_assigned (bool) – If true, includes only virtual lines with an extension assigned. When not explicitly specified, the default includes both virtual lines with extension assigned and not assigned.

  • has_dn_assigned (bool) – If true, includes only virtual lines with an assigned directory number, also known as a Dn. When not explicitly specified, the default includes both virtual lines with a Dn assigned and not assigned.

class wxc_sdk.telephony.virtual_line.VirtualLineNumber(*, external: str | None = None, extension: str | None = None, routingPrefix: str | None = None, esn: str | None = None, primary: bool | None = None)[source]

Bases: ApiModel

external: str | None

Virtual Line external. Either external or extension is mandatory. example: +15558675313

extension: str | None

Virtual Line extension. Either external or extension is mandatory. example: 6101

routing_prefix: str | None

Routing prefix of location. example: 1234

esn: str | None

Routing prefix + extension of a person or workspace. example: 12346101

primary: bool | None

Number is Primary or Alternative Number. example: True

class wxc_sdk.telephony.virtual_line.VirtualLineLocation(*, id: str | None = None, name: str | None = None, address: LocationAddress | None = None)[source]

Bases: ApiModel

id: str | None

ID of location associated with virtual line. example: Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzMxMTYx

name: str | None

Name of location associated with virtual line. example: Main Location Test

address: LocationAddress | None

The address of the virtual line.

class wxc_sdk.telephony.virtual_line.VirtualLineNumberPhoneNumber(*, directNumber: str | None = None, extension: str | None = None, primary: bool | None = None)[source]

Bases: ApiModel

direct_number: str | None

Phone number that is assigned to a virtual line. example: +15558675309

extension: str | None

Extension that is assigned to a virtual line. example: 5309

primary: bool | None

If true marks the phone number as primary. example: True

class wxc_sdk.telephony.virtual_line.VirtualLineDevices(*, devices: list[TelephonyDevice] | None = None, availableEndpointType: PrimaryOrShared | None = None, maxDeviceCount: int | None = None)[source]

Bases: ApiModel

devices: list[TelephonyDevice] | None

List of devices assigned to a virtual line.

available_endpoint_type: PrimaryOrShared | None

Indicates to which line a device can be assigned.

max_device_count: int | None

Maximum number of devices a virtual line can be assigned to. example: 35