Skip to content

RISPort Client

The RISPortClient provides real-time device registration status and CTI manager information from the UCM cluster via the RISPort70 SXML API.

Quick Example

from axltoolkit import RISPortClient

ris = RISPortClient(
    username="admin",
    password="secret",
    server_ip="ucm-pub.example.com",
    tls_verify=True,
)

# Convenience method — flat list of registered phones
for phone in ris.get_registered_phones("SEP*"):
    print(f"{phone['name']}: {phone['ip_address']}")

# Full selectCmDevice query
result = ris.select_cm_device(device_class="Phone", status="Registered")

Class Reference

axltoolkit.risport.RISPortClient

RISPortClient(username: str, password: str, server_ip: str, *, tls_verify: Union[bool, str] = True, timeout: int = 30, max_retries: int = 3)

Bases: BaseClient

Client for the Cisco UCM RISPort70 SXML API.

The RISPort70 service provides real-time information about registered devices, CTI connections, and other runtime state.

Parameters:

Name Type Description Default
username str

AXL/CCMAdministrator user name.

required
password str

Password.

required
server_ip str

UCM publisher IP address or FQDN.

required
tls_verify Union[bool, str]

TLS verification setting (default True).

True
timeout int

Request timeout in seconds (default 30).

30
max_retries int

Retry count for transient failures (default 3).

3

service property

service

Direct access to the underlying zeep service proxy.

Useful for calling RISPort operations that do not yet have a dedicated wrapper method.

select_cm_device

select_cm_device(*, device_class: str = 'Any', select_by: str = 'Name', max_returned_devices: int = 1000, model: int = 255, status: str = 'Any', select_items: Sequence[str] = ('*',), state_info: str = '') -> Dict[str, Any]

Query registered device information from the cluster.

Parameters:

Name Type Description Default
device_class str

"Any", "Phone", "Gateway", "H323", "Cti", "VoiceMail", "MediaResources", "HuntList", "SIPTrunk", or "Unknown".

'Any'
select_by str

"Name", "IPV4Address", "IPV6Address", "DirNumber", or "Description".

'Name'
max_returned_devices int

Maximum number of devices to return (default 1000).

1000
model int

Phone model number (255 = any model).

255
status str

"Any", "Registered", "UnRegistered", "Rejected", "PartiallyRegistered", or "Unknown".

'Any'
select_items Sequence[str]

List of device name patterns (supports * wildcards). E.g. ["SEP*"] for all SEP phones.

('*',)
state_info str

State information from a previous query for change-tracking. Empty string for initial query.

''

Returns:

Type Description
Dict[str, Any]

The full selectCmDevice response as a dict. Key structure::

{ "SelectCmDeviceResult": { "TotalDevicesFound": 42, "CmNodes": { "item": [ { "Name": "cm-pub.example.com", "CmDevices": { "item": [ { "Name": "SEP001122334455", "IPAddress": {"item": [{"IP": "10.0.0.5"}]}, "Status": "Registered", ... } ] } } ] } }, "StateInfo": "..." }

Raises:

Type Description
RISPortError

If the query fails.

Example::

result = client.select_cm_device(
    device_class="Phone",
    select_items=["SEP*"],
    status="Registered",
)
for node in result['SelectCmDeviceResult']['CmNodes']['item']:
    for dev in node['CmDevices']['item']:
        print(dev['Name'], dev.get('IPAddress'))

select_cm_device_ext

select_cm_device_ext(*, max_returned_devices: int = 1000, device_class: str = 'Any', select_by: str = 'Name', status: str = 'Any', select_items: Sequence[str] = ('*',), state_info: str = '') -> Dict[str, Any]

Query registered device information using the extended selection.

selectCmDeviceExt is the extended sibling of :meth:select_cm_device. It accepts a simpler selection criteria structure (no model filter) and returns the same SelectCmDeviceResult payload. Use it when you want a leaner request and don't need to filter by model.

Parameters:

Name Type Description Default
max_returned_devices int

Maximum number of devices to return (default 1000).

1000
device_class str

"Any", "Phone", "Gateway", "H323", "Cti", "VoiceMail", "MediaResources", "HuntList", "SIPTrunk", or "Unknown".

'Any'
select_by str

"Name", "IPV4Address", "IPV6Address", "DirNumber", or "Description".

'Name'
status str

"Any", "Registered", "UnRegistered", "Rejected", "PartiallyRegistered", or "Unknown".

'Any'
select_items Sequence[str]

List of device name patterns (supports * wildcards). E.g. ["SEP*"] for all SEP phones.

('*',)
state_info str

State information from a previous query for change-tracking. Empty string for initial query.

''

Returns:

Type Description
Dict[str, Any]

The full selectCmDeviceExt response as a dict, with the

Dict[str, Any]

same shape as :meth:select_cm_device.

Raises:

Type Description
RISPortError

If the query fails.

Example::

result = client.select_cm_device_ext(
    device_class="Phone",
    select_items=["SEP*"],
    status="Registered",
)

select_cti_item

select_cti_item(*, cti_mgr_class: str = 'Device', max_returned_items: int = 2000, status: str = 'Any', node_name: str = '', select_app_by: str = 'AppId', app_items: Optional[Sequence[str]] = None, device_names: Optional[Sequence[str]] = None, dir_numbers: Optional[Sequence[str]] = None, state_info: str = '') -> Dict[str, Any]

Query CTI manager item information from the cluster.

Parameters:

Name Type Description Default
cti_mgr_class str

"Device", "Line", or "Provider".

'Device'
max_returned_items int

Maximum items to return (default 2000).

2000
status str

"Any", "Open", "Closed", or "OpenFailed".

'Any'
node_name str

Restrict to a specific UCM node (empty = all nodes).

''
select_app_by str

"AppId" or "UserId".

'AppId'
app_items Optional[Sequence[str]]

List of application name patterns.

None
device_names Optional[Sequence[str]]

List of device name patterns (supports * wildcards).

None
dir_numbers Optional[Sequence[str]]

List of directory number patterns.

None
state_info str

State info from a previous query.

''

Returns:

Type Description
Dict[str, Any]

The full selectCtiItem response as a dict.

Raises:

Type Description
RISPortError

If the query fails.

get_registered_phones

get_registered_phones(name_pattern: str = 'SEP*', max_devices: int = 1000) -> List[Dict[str, Any]]

Convenience method: get a flat list of registered phone devices.

Parameters:

Name Type Description Default
name_pattern str

Device name pattern (default "SEP*").

'SEP*'
max_devices int

Maximum number of devices to return.

1000

Returns:

Type Description
List[Dict[str, Any]]

A list of dicts, each with name, ip_address, status,

List[Dict[str, Any]]

model, and node keys.

Raises:

Type Description
RISPortError

If the query fails.

Example::

for phone in client.get_registered_phones("CSF*"):
    print(f"{phone['name']}: {phone['ip_address']}")