wxc_sdk.person_settings.available_numbers module
- class wxc_sdk.person_settings.available_numbers.AvailableNumber(*, phoneNumber: str | None = None, extension: str | None = None, state: NumberState | None = None, isMainNumber: bool | None = None, tollFreeNumber: bool | None = None, telephonyType: str | None = None, mobileNetwork: str | None = None, routingProfile: str | None = None, isServiceNumber: bool | None = None, location: IdAndName | None = None, owner: NumberOwner | None = None, **extra_data: Any)[source]
Bases:
ApiModel- phone_number: str | None
A unique identifier for the phone number.
- extension: str | None
Extension for a PSTN phone number.
- state: NumberState | None
Phone number’s state.
- is_main_number: bool | None
Indicates if the phone number is used as a location CLID.
- toll_free_number: bool | None
Indicates if the phone number is a toll-free number.
- telephony_type: str | None
Indicates the telephony type for the number.
- mobile_network: str | None
Mobile Network for the number if the number’s telephonyType is MOBILE_NUMBER.
- routing_profile: str | None
Routing Profile for the number if the number’s telephonyType is MOBILE_NUMBER.
- is_service_number: bool | None
If true, the phone number is a service number; otherwise, it is a standard number. Service numbers are high-utilization or high-concurrency PSTN phone numbers that are neither mobile nor toll-free.
- owner: NumberOwner | None
- class wxc_sdk.person_settings.available_numbers.AvailablePhoneNumberLicenseType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- var_standard = 'VAR_STANDARD'
- var_basic = 'VAR_BASIC'
- webex_calling_professional = 'Webex Calling Professional'
- webex_calling_standard = 'Webex Calling Standard'
- class wxc_sdk.person_settings.available_numbers.AvailableNumbersApi(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]
Bases:
ApiChildAPI for person’s available numbers
Also used for virtual lines, workspaces
Available methods
Method
Virtual Lines
Workspaces
User
GET Call Forward Available Phone Numbers
X
X
X
GET ECBN Available Phone Numbers
X
X
X
GET Fax Message Available Phone Numbers
X
X
GET Available Phone Numbers
X
X
Get Call Intercept Available Phone Numbers
X
X
GET Primary Available Phone Numbers
X
GET Secondary Available Phone Numbers
X
X
- existing = {'': {'virtualLines', 'workspaces'}, 'callForwarding': {'people', 'virtualLines', 'workspaces'}, 'callIntercept': {'people', 'workspaces'}, 'emergencyCallbackNumber': {'people', 'virtualLines', 'workspaces'}, 'faxMessage': {'people', 'virtualLines', 'workspaces'}, 'primary': {'people'}, 'secondary': {'people', 'workspaces'}}
- __init__(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]
- primary(location_id: str | None = None, phone_number: list[str] | None = None, license_type: AvailablePhoneNumberLicenseType | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Person Primary Available Phone Numbers
Available for: user
List numbers that are available to be assigned as a person’s primary phone number. By default, this API returns standard and mobile numbers from all locations that are unassigned. The parameters licenseType and locationId must align with the person’s settings to determine the appropriate number for assignment. Failure to provide these parameters may result in the unsuccessful assignment of the returned number.
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.
license_type (AvailablePhoneNumberLicenseType) – This is used to search numbers according to the person’s licenseType to which the number will be assigned. Possible input values
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances
- secondary(entity_id: str, phone_number: list[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Person Secondary Available Phone Numbers
Available for: user, workspace
List standard numbers that are available to be assigned as a person’s secondary phone number. These numbers are associated with the location of the person 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:
entity_id (str) – Unique identifier for the entity.
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
AvailableNumberinstances
- fax_message(entity_id: str, phone_number: list[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Fax Message Available Phone Numbers
Available for: user, virtual line, workspace
List standard numbers that are available to be assigned as a FAX message number. These numbers are associated with the location of the person 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:
entity_id (str) – Unique identifier for the entity.
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
PersonSecondaryAvailableNumberObjectinstances
- call_forward(entity_id: str, phone_number: list[str] | None = None, owner_name: str | None = None, extension: str | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Call Forward Available Phone Numbers
Available for: user, virtual line, workspace
List service and standard numbers that are available to be assigned as call forward number. These numbers are associated with the location of the person specified in the request URL, can be active or inactive, and are assigned to an owning entity.
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:
entity_id (str) – Unique identifier for the entity.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
owner_name (str) – Return the list of phone numbers that are owned by the given ownerName. Maximum length is 255.
extension (str) – Returns the list of PSTN phone numbers with the given extension.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances
- ecbn(entity_id: str, phone_number: list[str] | None = None, owner_name: str | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get ECBN Available Phone Numbers
Available for: user, virtual line, workspace
List standard numbers that are available to be assigned as emergency callback number. These numbers are associated with the location of the person specified in the request URL, can be active or inactive, and are assigned to an owning entity.
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:
entity_id (str) – Unique identifier for the person.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
owner_name (str) – Return the list of phone numbers that are owned by the given ownerName. Maximum length is 255.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances
- available(location_id: str | None = None, phone_number: list[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Available Phone Numbers
Available for: virtual line, workspace
List standard numbers that are available to be assigned as phone number. By default, this API returns numbers from all locations that are unassigned. To select the suitable number for assignment, ensure the entities location ID is provided as the locationId request parameter.
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
AvailableNumberinstances
- base = 'telephony/config'
- call_intercept(entity_id: str, phone_number: list[str] | None = None, owner_name: str | None = None, extension: str | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Call Intercept Available Phone Numbers
Available for: user, workspace
List service and standard numbers that are available to be assigned as call intercept number.
These numbers are associated with the location specified in the request URL, can be active or inactive, and are assigned to an owning entity.
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:
entity_id (str) – Unique identifier for the person.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
owner_name (str) – Return the list of phone numbers that are owned by the given ownerName. Maximum length is 255.
extension (str) – Returns the list of PSTN phone numbers with the given extension.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances