wxc_sdk.telephony.location package
- class wxc_sdk.telephony.location.CallingLineId(*, name: str | None = None, phoneNumber: str | None = None, **extra_data: Any)[source]
Bases:
ApiModelLocation calling line information.
- name: str | None
Group calling line ID name. By default it will be org name. when updating the name make sure to also include the phone number
- phone_number: str | None
Directory Number / Main number in E164 Forma
- class wxc_sdk.telephony.location.PSTNConnection(*, type: RouteType, id: str, **extra_data: Any)[source]
Bases:
ApiModelConnection details
- id: str
A unique identifier of route type.
- class wxc_sdk.telephony.location.TelephonyLocation(*, id: str | None = None, name: str | None = None, announcementLanguage: str | None = None, callingLineId: CallingLineId | None = None, connection: PSTNConnection | None = None, externalCallerIdName: str | None = None, userLimit: int | None = None, pAccessNetworkInfo: str | None = None, outsideDialDigit: str | None = None, routingPrefix: str | None = None, chargeNumber: str | None = None, defaultDomain: str | None = None, e911SetupRequired: bool | None = None, enforceOutsideDialDigit: bool | None = None, subscriptionId: str | None = None, carrierAccountId: str | None = None, **extra_data: Any)[source]
Bases:
ApiModel- location_id: str | None
A unique identifier for the location.
- name: str | None
The name of the location.
- announcement_language: str | None
Location’s phone announcement language.
- calling_line_id: CallingLineId | None
Location calling line information.
- connection: PSTNConnection | None
Connection details are only returned for local PSTN types of TRUNK or ROUTE_GROUP.
- external_caller_id_name: str | None
External Caller ID Name value. Unicode characters.
- user_limit: int | None
Limit on the number of people at the location, Read-Only.
- p_access_network_info: str | None
Location Identifier.
- outside_dial_digit: str | None
Must dial to reach an outside line, default is None.
- routing_prefix: str | None
Must dial a prefix when calling between locations having same extension within same location.
- charge_number: str | None
Chargeable number for the line placing the call. When this is set, all calls placed from this location will include a P-Charge-Info header with the selected number in the SIP INVITE.
- default_domain: str | None
IP Address, hostname, or domain, Read-Only
- e911_setup_required: bool | None
True if E911 setup is required.
- enforce_outside_dial_digit: bool | None
True when enforcing outside dial digit at location level to make PSTN calls.
- subscription_id: str | None
- carrier_account_id: str | None
- class wxc_sdk.telephony.location.CallBackSelected(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- location_number = 'LOCATION_NUMBER'
Location TN.
- location_member_number = 'LOCATION_MEMBER_NUMBER'
Assigned number of a user or workspace in the location.
- class wxc_sdk.telephony.location.LocationECBNLocation(*, phoneNumber: str | None = None, name: str | None = None, effectiveLevel: ECBNEffectiveLevel | None = None, effectiveValue: str | None = None, quality: ECBNQuality | None = None, **extra_data: Any)[source]
Bases:
ApiModel- phone_number: str | None
The location DN.
- name: str | None
The name of the location.
- effective_level: ECBNEffectiveLevel | None
The source from which the emergency calling line ID (CLID) is selected for an actual emergency call, applying fallback rules as necessary.
- effective_value: str | None
Location calling line ID (CLID) number. Avaliable only when number is present and quality would be invalid.
- quality: ECBNQuality | None
Used to represent whether a number is a recommended ECBN.
- class wxc_sdk.telephony.location.LocationECBNLocationMember(*, phoneNumber: str | None = None, firstName: str | None = None, lastName: str | None = None, memberId: str | None = None, memberType: UserType | None = None, effectiveLevel: ECBNEffectiveLevel | None = None, effectiveValue: str | None = None, quality: ECBNQuality | None = None, **extra_data: Any)[source]
Bases:
ApiModel- phone_number: str | None
The member DN.
- first_name: str | None
The member first name.
- last_name: str | None
The member last name. Always contains . if the member is a place.
- member_id: str | None
Member ID of user/place within the location.
- effective_level: ECBNEffectiveLevel | None
The source from which the emergency calling line ID (CLID) is selected for an actual emergency call, applying fallback rules as necessary.
- effective_value: str | None
Location CLID number. Avaliable only when number is present and quality would be invalid.
- quality: ECBNQuality | None
Used to represent whether a number is a recommended ECBN.
- class wxc_sdk.telephony.location.LocationECBN(*, locationInfo: LocationECBNLocation | None = None, locationMemberInfo: LocationECBNLocationMember | None = None, selected: CallBackSelected | None = None, **extra_data: Any)[source]
Bases:
ApiModel- location_info: LocationECBNLocation | None
Data relevant to this location.
- location_member_info: LocationECBNLocationMember | None
Data relevant to the user/place (member) selected for ECBN.
- selected: CallBackSelected | None
Selected number type to configure emergency call back.
- class wxc_sdk.telephony.location.TelephonyLocationApi(session: wxc_sdk.rest.RestSession)[source]
Bases:
ApiChild- __init__(session: RestSession)[source]
- emergency_services: LocationEmergencyServicesApi
emergency services
- intercept: LocationInterceptApi
call intercept settings
- internal_dialing: InternalDialingApi
internal dialing settings
- moh: LocationMoHApi
moh settings
- number: LocationNumbersApi
number settings
- voicemail: LocationVoicemailSettingsApi
Location VM settings (only enable/disable transcription for now)
- receptionist_contacts_directory: ReceptionistContactsDirectoryApi
Receptionist contacts directories
- generate_password(location_id: str, generate: list[str] | None = None, org_id: str | None = None)[source]
Generates an example password using the effective password settings for the location. If you don’t specify anything in the generate field or don’t provide a request body, then you will receive a SIP password by default.
It’s used while creating a trunk and shouldn’t be used anywhere else.
Generating an example password requires a full or write-only administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Location for which example password has to be generated.
generate (list[str]) – password settings array.
org_id (str) – Organization to which location belongs.
- Returns:
new password
- Return type:
str
- validate_extensions(location_id: str, extensions: list[str], org_id: str | None = None) ValidateExtensionsResponse[source]
Validate extensions for a specific location.
Validating extensions requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Validate extensions for this location.
extensions (list[str]) – Array of extensions that will be validated.
org_id (str) – Validate extensions for this organization.
- Returns:
Validation result
- Return type:
- details(location_id: str, org_id: str | None = None) TelephonyLocation[source]
Shows Webex Calling details for a location, by ID.
Specify the location ID in the locationId parameter in the URI.
Searching and viewing location in your organization requires an administrator auth token with the spark-admin:telephony_config_read scope.
- Parameters:
location_id (str) – Retrieve Webex Calling location attributes for this location.
org_id (str) – Retrieve Webex Calling location attributes for this organization.
- Returns:
Webex Calling details for location
- Return type:
- enable_for_calling(location: Location, org_id: str | None = None) str[source]
Enable a location by adding it to Webex Calling. This add Webex Calling support to a location created using the POST /v1/locations API.
Locations are used to support calling features which can be defined at the location level.
This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Returns:
A unique identifier for the location.
- Return type:
str
- list(name: str | None = None, order: str | None = None, org_id: str | None = None) Generator[TelephonyLocation, None, None][source]
Lists Webex Calling locations for an organization with Webex Calling details.
Searching and viewing locations with Webex Calling details in your organization require an administrator auth token with the spark-admin:telephony_config_read scope.
- Parameters:
name (str) – List locations whose name contains this string.
order (str) – Sort the list of locations based on name, either asc or desc.
org_id (str) – List locations for this organization.
- Returns:
generator of
TelephonyLocationinstances
- update(location_id: str, settings: TelephonyLocation, org_id: str | None = None) str | None[source]
Update Webex Calling details for a location, by ID.
Specify the location ID in the locationId parameter in the URI.
Modifying the connection via API is only supported for the local PSTN types of TRUNK and ROUTE_GROUP.
Updating a location in your organization requires an administrator auth token with the spark-admin:telephony_config_write scope.
Example :
api.telephony.location.update(location_id=location_id, settings=TelephonyLocation( calling_line_id=CallingLineId( phone_number=tn), routing_prefix=routing_prefix, outside_dial_digit='9'))
- Parameters:
location_id (str) – Updating Webex Calling location attributes for this location.
settings (
TelephonyLocation) – settings to updateorg_id (str) – Updating Webex Calling location attributes for this organization.
- Returns:
batch job id of update job if one is created
- Return type:
str
- change_announcement_language(location_id: str, language_code: str, agent_enabled: bool | None = None, service_enabled: bool | None = None, org_id: str | None = None)[source]
Change Announcement Language
Change announcement language for the given location.
Change announcement language for current people/workspaces and/or existing feature configurations. This does not change the default announcement language which is applied to new users/workspaces and new feature configurations.
Changing announcement language for the given location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Change announcement language for this location.
language_code (str) – Language code.
agent_enabled (bool) – Set to true to change announcement language for existing people and workspaces.
service_enabled (bool) – Set to true to change announcement language for existing feature configurations.
org_id (str) – Change announcement language for this organization.
- read_ecbn(location_id: str, org_id: str | None = None) LocationECBN[source]
Get a Location Emergency callback number
Get location emergency callback number.
To retrieve location callback number requires a full, user or read-only administrator or location
administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Update location attributes for this location.
org_id (str) – Update location attributes for this organization.
- Return type:
- base = 'telephony/config/locations'
- update_ecbn(location_id: str, selected: CallBackSelected, location_member_id: str | None = None, org_id: str | None = None)[source]
Update a Location Emergency callback number
Update details for a location emergency callback number.
Updating a location callback number requires a full administrator or location administrator auth token with a
scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Update location attributes for this location.
selected (CallBackSelected) – Selected number type to configure emergency call back.
location_member_id (str) – Member ID of user/place within the location. Required if LOCATION_MEMBER_NUMBER is selected.
org_id (str) – Update location attributes for this organization.
- Return type:
None
- device_settings(location_id: str, org_id: str | None = None) DeviceCustomization[source]
Get device override settings for a location.
This requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Unique identifier for the location
org_id (str) – Settings on the device in this organization
- Returns:
device customization response
- Return type:
- phone_numbers_available_for_external_caller_id(location_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 the List of Phone Numbers Available for External Caller ID
Get the list of phone numbers available for external caller ID usage by a Webex Calling entity (such as a user, virtual line, or workspace) within the specified location. Numbers from the specified location are returned and cross location numbers are returned as well where the number’s location has the same country, PSTN provider, and zone (only applicable for India locations) as the specified location.
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 or read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Retrieve available external caller ID numbers for this location.
phone_number (list[str]) – Filter phone numbers based on the provided list 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
- phone_numbers(location_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 Available Phone Numbers for a Location with Given Criteria
List service and standard numbers that are available to be assigned as the location’s main number. These numbers are associated with the location specified in the request URL and can be active/inactive and assigned to an owning entity or 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 or read-only administrator 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.
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
- webex_go_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Webex Go Available Phone Numbers
List standard numbers that are available to be assigned as the webex go phone number. These numbers are associated with the location 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:
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
- ecbn_available_phone_numbers(location_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 Location ECBN Available Phone Numbers
List standard numbers that are available to be assigned as the location’s emergency callback 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:
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.
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
- call_intercept_available_phone_numbers(location_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 Location Call Intercept Available Phone Numbers
List service and standard numbers that are available to be assigned as the location’s call intercept number. These numbers are associated with the location specified in the request URL and can be active/inactive and assigned to an owning entity or 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 or read-only administrator 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.
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
LocationAvailableNumberObjectinstances
Subpackages
Submodules
- wxc_sdk.telephony.location.intercept module
- wxc_sdk.telephony.location.internal_dialing module
- wxc_sdk.telephony.location.moh module
- wxc_sdk.telephony.location.numbers module
- wxc_sdk.telephony.location.receptionist_contacts module
- wxc_sdk.telephony.location.vm module