wxc_sdk.telephony.prem_pstn.trunk module
- class wxc_sdk.telephony.prem_pstn.trunk.TrunkType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- registering = 'REGISTERING'
for Cisco CUBE Local Gateway
- certificate_base = 'CERTIFICATE_BASED'
for Cisco Unified Border Element, Oracle ACME Session Border Controller, AudioCodes Session Border Controller, Ribbon Session Border Controller
- class wxc_sdk.telephony.prem_pstn.trunk.Trunk(*, id: str, name: str, location: IdAndName, inUse: bool, trunkType: TrunkType, isRestrictedToDedicatedInstance: bool)[source]
Bases:
ApiModel
- trunk_id: str
- name: str
- in_use: bool
- is_restricted_to_dedicated_instance: bool
- class wxc_sdk.telephony.prem_pstn.trunk.TrunkDeviceType(*, deviceType: str, minConcurrentCalls: int, maxConcurrentCalls: int)[source]
Bases:
ApiModel
- device_type: str
Device type associated with trunk configuration
- min_concurrent_calls: int
Min Concurrent call. Required for static certificate based trunk.
- max_concurrent_calls: int
Max Concurrent call. Required for static certificate based trunk.
- class wxc_sdk.telephony.prem_pstn.trunk.TrunkTypeWithDeviceType(*, trunkType: TrunkType, deviceTypes: list[TrunkDeviceType])[source]
Bases:
ApiModel
- device_types: list[TrunkDeviceType]
Device types for trunk configuration
- class wxc_sdk.telephony.prem_pstn.trunk.DeviceStatus(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- online = 'online'
- offline = 'offline'
- unknown = 'unknown'
- class wxc_sdk.telephony.prem_pstn.trunk.ResponseStatusType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- error = 'ERROR'
- warning = 'WARNING'
- class wxc_sdk.telephony.prem_pstn.trunk.ResponseStatus(*, code: int, type: ResponseStatusType, summaryEnglish: str, detail: list[str], trackingId: str)[source]
Bases:
ApiModel
- code: int
Error Code. 25013 for error retrieving the outbound proxy. 25014 for error retrieving the status
- response_status_type: ResponseStatusType
- summary_english: str
- detail: list[str]
- tracking_id: str
- class wxc_sdk.telephony.prem_pstn.trunk.CnameRecord(*, host: str, ttl: int, port: int)[source]
Bases:
ApiModel
- host: str
- ttl: int
- port: int
- class wxc_sdk.telephony.prem_pstn.trunk.OutboundProxy(*, sipAccessServiceType: str, dnsType: str, outboundProxy: str, srvPrefix: str, cnameRecords: list[CnameRecord] | None = None, attachmentUpdated: bool)[source]
Bases:
ApiModel
- sip_access_service_type: str
- dns_type: str
- outbound_proxy: str
- srv_prefix: str
- cname_records: list[CnameRecord] | None
- attachment_updated: bool
- class wxc_sdk.telephony.prem_pstn.trunk.TrunkDetail(*, id: str, name: str, organization: Customer, location: IdAndName, otgDtgId: str, linePort: str, locationsUsingTrunk: list[IdAndName], pilotUserId: str, outboundProxy: Any, sipAuthenticationUserName: str, status: DeviceStatus, errorCodes: list[str] = None, responseStatus: list[ResponseStatus], dualIdentitySupportEnabled: bool, trunkType: TrunkType, deviceType: str, address: str | None = None, domain: str | None = None, port: int | None = None, maxConcurrentCalls: int, isRestrictedToDedicatedInstance: bool | None = False)[source]
Bases:
ApiModel
- trunk_id: str
- name: str
- otg_dtg_id: str
Unique Outgoing and Destination trunk group associated with the dial plan.
- line_port: str
The Line/Port identifies a device endpoint in standalone mode or a SIPURI public identity in IMS mode.
- pilot_user_id: str
- outbound_proxy: Any
- sip_authentication_user_name: str
User’s authentication service information.
- status: DeviceStatus
- error_codes: list[str]
- response_status: list[ResponseStatus]
Present partial error/warning status information included when the http response is 206.
- dual_identity_support_enabled: bool
Determines the behavior of the From and PAI headers on outbound calls.
- device_type: str
Device type associated with trunk.
- address: str | None
FQDN or SRV address. Required to create a static certificate-based trunk.
- domain: str | None
Domain name. Required to create a static certificate based trunk
- port: int | None
FQDN port. Required to create a static certificate-based trunk.
- max_concurrent_calls: int
Max Concurrent call. Required to create a static certificate based trunk.
- is_restricted_to_dedicated_instance: bool | None
- class wxc_sdk.telephony.prem_pstn.trunk.TrunkUsage(*, pstnConnectionCount: int, callToExtensionCount: int, dialPlanCount: int, routeGroupCount: int)[source]
Bases:
ApiModel
- pstn_connection_count: int
The count where the local gateway is used as a PSTN Connection setting.
- call_to_extension_count: int
The count where the given local gateway is used as call to extension setting.
- dial_plan_count: int
- route_group_count: int
- class wxc_sdk.telephony.prem_pstn.trunk.TrunkApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
API for everything trunks
- list(name: str | None = None, location_name: str | None = None, trunk_type: str | None = None, order: str | None = None, org_id: str | None = None, **params) Generator[Trunk, None, None] [source]
List all Trunks for the organization.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow ebex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
name (str) – Return the list of trunks matching the local gateway names.
location_name (str) – Return the list of trunks matching the location names.
trunk_type (str) – Return the list of trunks matching the trunk type.
order (str) – Order the trunks according to the designated fields. Available sort fields: name, locationName. Sort order is ascending by default
org_id (str)
- Returns:
generator of Trunk instances
- Return type:
- create(name: str, location_id: str, password: str, trunk_type: ~wxc_sdk.telephony.prem_pstn.trunk.TrunkType = <TrunkType.registering: 'REGISTERING'>, dual_identity_support_enabled: bool | None = None, device_type: ~wxc_sdk.telephony.prem_pstn.trunk.TrunkDeviceType | None = None, address: str | None = None, domain: str | None = None, port: int | None = None, max_concurrent_calls: int | None = None, org_id: str | None = None) str [source]
Create a Trunk for the organization.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Creating a trunk requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
name (str) – A unique name for the trunk.
location_id (str) – ID of location associated with the trunk.
password (str) – A password to use on the trunk.
trunk_type (
TrunkType
) – Trunk Type associated with the trunk.dual_identity_support_enabled (bool) – Dual Identity Support setting impacts the handling of the From header and P-Asserted-Identity header when sending an initial SIP INVITE to the trunk for an outbound call.
device_type (
TrunkDeviceType
) – Device type associated with trunk.address (str) – FQDN or SRV address. Required to create a static certificate-based trunk.
domain (str) – Domain name. Required to create a static certificate based trunk.
port (int) – FQDN port. Required to create a static certificate-based trunk.
max_concurrent_calls (int) – Max Concurrent call. Required to create a static certificate based trunk.
org_id (str) – Organization to which trunk belongs.
- Returns:
id of new trunk
- Return type:
str
- details(trunk_id: str, org_id: str | None = None) TrunkDetail [source]
Get a Trunk for the organization.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving a trunk requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
trunk_id (str) – ID of the trunk.
org_id (str) – Organization to which trunk belongs.
- Returns:
trunk details
- Return type:
- update(trunk_id: str, name: str, location_id: str, password: str, trunk_type: TrunkType, dual_identity_support_enabled: bool | None = None, max_concurrent_calls: int | None = None, org_id: str | None = None)[source]
Modify a Trunk for the organization.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Modifying a trunk requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
trunk_id
location_id (str) – ID of location associated with the trunk.
password (str) – A password to use on the trunk.
trunk_type (
TrunkType
) – Trunk Type associated with the trunk.dual_identity_support_enabled (bool) – Dual Identity Support setting impacts the handling of the From header and P-Asserted-Identity header when sending an initial SIP INVITE to the trunk for an outbound call.
max_concurrent_calls (int) – Max Concurrent call. Required to create a static certificate based trunk.
org_id (str:return:) – Organization to which trunk belongs.
- delete_trunk(trunk_id: str, org_id: str | None = None)[source]
Delete a Trunk for the organization.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Deleting a trunk requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
trunk_id (str) – ID of the trunk.
org_id (str) – Organization to which trunk belongs.
- trunk_types(org_id: str | None = None) List[TrunkTypeWithDeviceType] [source]
List all TrunkTypes with DeviceTypes for the organization.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy. Trunk Types are Registering or Certificate Based and are configured in CallManager.
Retrieving trunk types requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
org_id
- Returns:
trunk types
- Return type:
list[
TrunkTypeWithDeviceType
]
- usage(trunk_id: str, org_id: str | None = None) TrunkUsage [source]
Get Local Gateway Usage Count
A trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving this information requires a full administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
trunk_id (str) – ID of the trunk.
org_id (str) – Organization to which trunk belongs.
- Returns:
usage counts
- Return type:
- usage_dial_plan(trunk_id: str, org_id: str | None = None) Generator[IdAndName, None, None] [source]
Get Local Gateway Dial Plan Usage for a Trunk.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving this information requires a full administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
trunk_id (str) – ID of the trunk.
org_id (str) – Organization to which trunk belongs.
- Returns:
id and name objects
- usage_location_pstn(trunk_id: str, org_id: str | None = None) Generator[IdAndName, None, None] [source]
Get Local Gateway Dial Plan Usage for a Trunk.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving this information requires a full administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
trunk_id (str) – ID of the trunk.
org_id (str) – Organization to which trunk belongs.
- Returns:
id and name objects
- usage_route_group(trunk_id: str, org_id: str | None = None) Generator[IdAndName, None, None] [source]
Get Local Gateway Dial Plan Usage for a Trunk.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving this information requires a full administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
trunk_id (str) – ID of the trunk.
org_id (str) – Organization to which trunk belongs.
- Returns:
id and name objects
- usage_call_to_extension(trunk_id: str, org_id: str | None = None, order: str | None = None, name: List[str] | None = None, **params) Generator[IdAndName, None, None] [source]
Get local gateway call to on-premises extension usage for a trunk.
A trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group which is a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Retrieving this information requires a full administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
trunk_id – ID of the trunk.
org_id – Organization to which the trunk belongs.
order – Order the trunks according to the designated fields. Available sort fields are name, and locationName. Sort order is ascending by default
name – Return the list of trunks matching the local gateway names
- Returns:
generator of
wxc_sdk.common.IdAndName
instances
- validate_fqdn_and_domain(address: str, domain: str, port: int | None = None, org_id: str | None = None)[source]
Validate Local Gateway FQDN and Domain for the organization trunks.
A Trunk is a connection between Webex Calling and the premises, which terminates on the premises with a local gateway or other supported device. The trunk can be assigned to a Route Group - a group of trunks that allow Webex Calling to distribute calls over multiple trunks or to provide redundancy.
Validating Local Gateway FQDN and Domain requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
address (str) – FQDN or SRV address of the trunk.
domain (str) – Domain name of the trunk.
port (int) – FQDN port of the trunk
org_id (str) – Organization to which trunk types belongs.
- base = 'telephony/config/premisePstn/trunks'