wxc_sdk.telephony.location.numbers module
- class wxc_sdk.telephony.location.numbers.TelephoneNumberType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- tollfree = 'TOLLFREE'
A toll-free PSTN number.
- did = 'DID'
A normal Direct Inward Dial (DID) PSTN number.
- mobile = 'MOBILE'
A mobile number.
- class wxc_sdk.telephony.location.numbers.NumberUsageType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- none_ = 'NONE'
Standard/user number usage (default).
- service = 'SERVICE'
The number will be used in high-volume service, for example, Contact Center.
- class wxc_sdk.telephony.location.numbers.NumberAddError(*, number: str | None = None, errorType: str | None = None, errorCode: str | None = None, errorMessage: str | None = None, errorTitle: str | None = None, **extra_data: Any)[source]
Bases:
ApiModel- number: str | None
- error_type: str | None
- error_code: str | None
- error_message: str | None
- error_title: str | None
- class wxc_sdk.telephony.location.numbers.NumberAddResponse(*, errors: list[~wxc_sdk.telephony.location.numbers.NumberAddError] = <factory>, **extra_data: ~typing.Any)[source]
Bases:
ApiModel- errors: list[NumberAddError]
- class wxc_sdk.telephony.location.numbers.LocationNumbersApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild- add(location_id: str, phone_numbers: list[str], number_type: ~wxc_sdk.telephony.location.numbers.TelephoneNumberType | None = None, number_usage_type: ~wxc_sdk.telephony.location.numbers.NumberUsageType | None = None, state: ~wxc_sdk.common.NumberState = <NumberState.inactive: 'INACTIVE'>, subscription_id: str | None = None, org_id: str | None = None) NumberAddResponse[source]
Add Phone Numbers to a location
Adds a specified set of phone numbers to a location for an organization.
Each location has a set of phone numbers that can be assigned to people, workspaces, or features. Phone numbers must follow the E.164 format. Active phone numbers are in service.
Adding a phone number to a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
This API is only supported for adding DID and Toll-free numbers to non-integrated PSTN connection types such as Local Gateway (LGW) and Non-integrated CPP. It should never be used for locations with integrated PSTN connection types like Cisco Calling Plans or Integrated CCP because backend data issues may occur.
Mobile numbers can be added to any location that has PSTN connection setup. Only 20 mobile numbers can be added per request.
- Parameters:
location_id (str) – LocationId to which numbers should be added.
phone_numbers (list[str]) – List of phone numbers that need to be added.
number_type (TelephoneNumberType) – Type of the number. Required for MOBILE number type.
number_usage_type (NumberUsageType) – Type of usage expected for the number.
state (NumberState) – Reflects the state of the number. By default, the state of a number is set to ACTIVE for DID and toll-free numbers only. Mobile numbers will be activated upon assignment to a user.
subscription_id (str) – Reflects the subscriptionId to be used for mobile number order.
org_id (str) – Organization to manage.
- activate(location_id: str, phone_numbers: list[str], org_id: str | None = None)[source]
Activate Phone Numbers in a location
Activate the specified set of phone numbers in a location for an organization.
Each location has a set of phone numbers that can be assigned to people, workspaces, or features. Phone numbers must follow the E.164 format. Active phone numbers are in service.
A mobile number is activated when assigned to a user. This API will not activate mobile numbers.
Activating a phone number in a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
This API is only supported for non-integrated PSTN connection types of Local Gateway (LGW) and Non-integrated CPP. It should never be used for locations with integrated PSTN connection types like Cisco Calling Plans or Integrated CCP because backend data issues may occur.
- Parameters:
location_id (str) – LocationId in which numbers should be activated.
phone_numbers (list[str]) – List of phone numbers to be activated.
org_id (str) – Organization to manage
- remove(location_id: str, phone_numbers: list[str], org_id: str | None = None)[source]
Remove phone numbers from a location
Remove the specified set of phone numbers from a location for an organization.
Phone numbers must follow the E.164 format.
Removing a mobile number may require more time depending on mobile carrier capabilities.
Removing a phone number from a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
A location’s main number cannot be removed.
This API is only supported for non-integrated PSTN connection types of Local Gateway (LGW) and Non-integrated CPP. It should never be used for locations with integrated PSTN connection types like Cisco Calling Plans or Integrated CCP because backend data issues may occur.
- Parameters:
location_id (str) – LocationId from which numbers should be removed.
phone_numbers (list[str]) – List of phone numbers to be removed.
org_id (str) – Organization to manage
- base = 'telephony/config/locations'