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
,SafeEnum
An enumeration.
- tollfree = 'TOLLFREE'
Indicates a toll-free PSTN number.
- did = 'DID'
Indicates a normal Direct Inward Dial (DID) PSTN number.
- 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, state: ~wxc_sdk.common.NumberState = <NumberState.inactive: 'INACTIVE'>, org_id: str | None = None)[source]
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 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.
WARNING: 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 PSTN or Integrated CCP because backend data issues may occur.
- 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.
state (
wxc_sdk.common.NumberState
) – State of the phone numbers.org_id (str) – Organization to manage
- activate(location_id: str, phone_numbers: list[str], org_id: str | None = None)[source]
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 E.164 format for all countries, except for the United States, which can also follow the National format. Active phone numbers are in service.
Activating a phone number in a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
WARNING: 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 PSTN 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 the specified set of phone numbers from 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 E.164 format for all countries, except for the United States, which can also follow the National format. Active phone numbers are in service.
Removing a phone number from a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
WARNING: 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 PSTN 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'