wxc_sdk.telephony.prem_pstn.route_group module
- class wxc_sdk.telephony.prem_pstn.route_group.RGTrunk(*, id: str, name: str | None = None, locationId: str | None = None, priority: int)[source]
Bases:
ApiModel
- trunk_id: str
- name: str | None
- location_id: str | None
- priority: int
- class wxc_sdk.telephony.prem_pstn.route_group.RouteGroup(*, id: str | None = None, name: str, inUse: bool | None = None, organization: Customer | None = None, localGateways: list[RGTrunk] | None = None)[source]
Bases:
ApiModel
- rg_id: str | None
- name: str
- in_use: bool | None
only returned by list() not as part of detail()
- class wxc_sdk.telephony.prem_pstn.route_group.RouteGroupUsage(*, pstnConnectionCount: int, callToExtensionCount: int, dialPlanCount: int, routeListCount: int)[source]
Bases:
ApiModel
- pstn_connection_count: int
Number of PSTN connection locations associated to this route group.
- call_to_extension_count: int
Number of call to extension locations associated to this route group.
- dial_plan_count: int
Number of dial plan locations associated to this route group.
- route_list_count: int
Number of route list locations associated to this route group.
- class wxc_sdk.telephony.prem_pstn.route_group.UsageRouteLists(*, id: str, name: str, locationId: str, locationName: str)[source]
Bases:
ApiModel
- rl_id: str
- rl_name: str
- location_id: str
- location_name: str
- class wxc_sdk.telephony.prem_pstn.route_group.RouteGroupApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
API for everything route groups
- list(name: str | None = None, order: str | None = None, org_id: str | None = None, **params) Generator[RouteGroup, None, None] [source]
List all Route Groups for an organization. A Route Group is a group of trunks that allows further scale and redundancy with the connection to the premises.
Retrieving this route group list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
name (st) – Return the list of route groups matching the route group name.
order (str) – Order the route groups according to designated fields. Available sort orders: asc, desc.
org_id (str) – List route groups for this organization.
- Returns:
generator of
RouteGroup
instances
- create(route_group: RouteGroup, org_id: str | None = None) str [source]
Creates a Route Group for the organization.
A Route Group is a collection of trunks that allows further scale and redundancy with the connection to the premises. Route groups can include up to 10 trunks from different locations.
Creating a Route Group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
route_group (
RouteGroup
) –settings for new route group. name and local_gateways need to be set. For each LGW id and priority need to be set. Example:
rg = RouteGroup(name=rg_name, local_gateways=[RGTrunk(trunk_id=trunk.trunk_id, priority=1)]) rg_id = api.telephony.prem_pstn.route_group.create(route_group=rg)
org_id (str)
- Returns:
id of new route group
- Return type:
str
- details(rg_id: str, org_id: str | None = None) RouteGroup [source]
Reads a Route Group for the organization based on id.
A Route Group is a collection of trunks that allows further scale and redundancy with the connection to the premises. Route groups can include up to 10 trunks from different locations.
Reading a Route Group requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
rg_id (str) – Route Group for which details are being requested.
org_id (str) – Organization of the Route Group.
- Returns:
route group details
- Return type:
- update(rg_id: str, update: RouteGroup, org_id: str | None = None)[source]
Modifies an existing Route Group for an organization based on id.
A Route Group is a collection of trunks that allows further scale and redundancy with the connection to the premises. Route groups can include up to 10 trunks from different locations.
Modifying a Route Group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
rg_id (str) – route group to be modified
update (
RouteGroup
) – new settingsorg_id (str) – Organization of the Route Group.
- delete_route_group(rg_id: str, org_id: str | None = None)[source]
Remove a Route Group from an Organization based on id.
A Route Group is a collection of trunks that allows further scale and redundancy with the connection to the premises. Route groups can include up to 10 trunks from different locations.
Removing a Route Group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
rg_id (str) – Route Group to be deleted
org_id (str) – Organization of the Route Group.
- usage(rg_id: str, org_id: str | None = None) RouteGroupUsage [source]
List the number of “Call to” on-premises Extensions, Dial Plans, PSTN Connections, and Route Lists used by a specific Route Group. Users within Call to Extension locations are registered to a PBX which allows you to route unknown extensions (calling number length of 2-6 digits) to the PBX using an existing Trunk or Route Group. PSTN Connections may be cisco PSTN, cloud-connected PSTN, or premises-based PSTN (local gateway). Dial Plans allow you to route calls to on-premises extensions via your trunk or route group. Route Lists are a list of numbers that can be reached via a route group. It can be used to provide cloud PSTN connectivity to Webex Calling Dedicated Instance.
Retrieving usage information requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
rg_id (str) – Route group requested for information.
org_id (str) – Organization associated with specific route group
- Returns:
usage information
- Return type:
- usage_call_to_extension(rg_id: str, org_id: str | None = None, **params) Generator[IdAndName, None, None] [source]
List “Call to” on-premises Extension Locations for a specific route group. Users within these locations are registered to a PBX which allows you to route unknown extensions (calling number length of 2-6 digits) to the PBX using an existing trunk or route group.
Retrieving this location list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
rg_id – Route group requested for information.
org_id – Organization associated with specific route group.
- Returns:
generator of instances
- Return type:
- usage_dial_plan(rg_id: str, org_id: str | None = None, **params) Generator[IdAndName, None, None] [source]
List Dial Plan Locations for a specific route group.
Dial Plans allow you to route calls to on-premises destinations by use of trunks or route groups. They are configured globally for an enterprise and apply to all users, regardless of location. A Dial Plan also specifies the routing choice (trunk or route group) for calls that match any of its dial patterns. Specific dial patterns can be defined as part of your dial plan.
Retrieving this location list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
rg_id – Route group requested for information.
org_id – Organization associated with specific route group.
- Returns:
generator of instances
- Return type:
- usage_location_pstn(rg_id: str, org_id: str | None = None, **params) Generator[IdAndName, None, None] [source]
List PSTN Connection Locations for a specific route group. This solution lets you configure users to use Cloud PSTN (CCP or Cisco PSTN) or Premises-based PSTN.
Retrieving this Location list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
rg_id – Route group requested for information.
org_id – Organization associated with specific route group.
- Returns:
generator of instances
- Return type:
- usage_route_lists(rg_id: str, org_id: str | None = None, **params) Generator[UsageRouteLists, None, None] [source]
List Route Lists for a specific route group. Route Lists are a list of numbers that can be reached via a Route Group. It can be used to provide cloud PSTN connectivity to Webex Calling Dedicated Instance.
Retrieving this list of Route Lists requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
rg_id – Route group requested for information.
org_id – Organization associated with specific route group.
- Returns:
generator of instances
- Return type:
- base = 'telephony/config/premisePstn/routeGroups'