wxc_sdk.telephony.pstn package

class wxc_sdk.telephony.pstn.PSTNServiceType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

geographic_numbers = 'GEOGRAPHIC_NUMBERS'

PSTN service type for geographic numbers.

tollfree_numbers = 'TOLLFREE_NUMBERS'

PSTN service type for toll-free numbers.

business_texting = 'BUSINESS_TEXTING'

PSTN service type for business texting.

contact_center = 'CONTACT_CENTER'

PSTN service type for contact center services.

service_numbers = 'SERVICE_NUMBERS'

PSTN service type for service numbers.

non_geographic_numbers = 'NON_GEOGRAPHIC_NUMBERS'

PSTN service type for non-geographic numbers.

mobile_numbers = 'MOBILE_NUMBERS'

PSTN service type for mobile numbers.

class wxc_sdk.telephony.pstn.PSTNConnectionOption(*, id: str | None = None, displayName: str | None = None, pstnServices: list[PSTNServiceType] | None = None, pstnConnectionType: PSTNType | None = None, routeType: RouteType | None = None, routeId: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

id: str | None

A unique identifier for the connection.

display_name: str | None

The display name of the PSTN connection.

pstn_services: list[PSTNServiceType] | None

The PSTN services available for this connection.

pstn_connection_type: PSTNType | None

The PSTN connection type set for the location.

route_type: RouteType | None

Premise route type. This is required if connection type is LOCAL_GATEWAY.

route_id: str | None

Premise route ID. This refers to either a Trunk ID or a Route Group ID. This field is optional but required if the connection type is LOCAL_GATEWAY.

class wxc_sdk.telephony.pstn.PSTNType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

local_gateway = 'LOCAL_GATEWAY'

PSTN connection type for a premises-based connection.

non_integrated_ccp = 'NON_INTEGRATED_CCP'

PSTN connection type for a Non-Integrated Cloud Connected PSTN connection.

integrated_ccp = 'INTEGRATED_CCP'

PSTN connection type for an Integrated Cloud Connected PSTN connection. Updating the location with this connection type is currently not supported using the API.

cisco_pstn = 'CISCO_PSTN'

PSTN connection type for a Cisco PSTN connection. Updating the location with this connection type is currently not supported using the API.

class wxc_sdk.telephony.pstn.PSTNApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

PSTN

PSTN Location Connection Settings supports PSTN selection when creating a location or changing a PSTN type for a location. This is only supported for Local Gateway and Non-integrated CCP.

Viewing these read-only organization settings requires a full or read-only administrator auth token with a scope of spark-admin:telephony_pstn_read.

Modifying these organization settings requires a full administrator auth token with a scope of spark-admin:telephony_pstn_write.

A partner administrator can retrieve or change settings in a customer’s organization using the optional orgId query parameter.

list(location_id: str, service_types: list[PSTNServiceType] | None = None, org_id: str | None = None) list[PSTNConnectionOption][source]

Retrieve PSTN Connection Options for a Location

Retrieve the list of PSTN connection options available for a location.

PSTN location connection settings enables the admin to configure or change the PSTN provider for a location.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_pstn_read.

Parameters:
  • location_id (str) – Return the list of List PSTN location connection options for this location.

  • service_types (list[PSTNServiceType]) –

    Use the serviceTypes parameter to fetch connections for the following services

    • MOBILE_NUMBERS

  • org_id (str) – List PSTN location connection options for this organization.

Return type:

list[PSTNConnectionOption]

configure(location_id: str, id: str | None = None, premise_route_type: str | None = None, premise_route_id: str | None = None, org_id: str | None = None)[source]

Setup PSTN Connection for a Location

Set up or update the PSTN connection details for a location.

PSTN location connection settings enables the admin to configure or change the PSTN provider for a location.

Setting up PSTN connection on a location requires a full administrator auth token with a scope of spark-admin:telephony_pstn_write.

Parameters:
  • location_id (str) – Setup PSTN location connection options for this location.

  • id (str) – A unique identifier for the connection. This is required for non-integrated CCP.

  • premise_route_type (str) – Premise route type. The possible types are TRUNK and ROUTE_GROUP. This is required for the local gateway.

  • premise_route_id (str) – Premise route ID. This refers to either a Trunk ID or a Route Group ID and is required for the local gateway.

  • org_id (str) – Setup PSTN location connection for this organization.

Return type:

None

read(location_id: str, org_id: str | None = None) PSTNConnectionOption[source]

Retrieve PSTN Connection for a Location

Retrieves the current configured PSTN connection details for a location.

PSTN location connection settings enables the admin to configure or change the PSTN provider for a location.

Retrieving the PSTN connection details for a location requires a full or read-only administrator auth token with a scope of spark-admin:telephony_pstn_read.

Parameters:
  • location_id (str) – Retrieve PSTN location connection details for this location.

  • org_id (str) – Retrieve PSTN location connection details for this organization.

Return type:

PSTNConnectionOption

base = 'telephony/pstn/locations'