Showing results for 
Search instead for 
Did you mean: 

RisPort70 WSDL by Devicepoolname

Hi Guys,


I would like to export the phone status selected by device pool name from  RisPort70 WSDL in python. But the documents shows:

SelectBySearch by:
  • Name
  • IPV4Address
  • IPV6Address
  • DirNumber (directory number)
  • Description
  • SIPStatus


There is no device pool name.


Does anyone have any ideal about it?


Thanks a lot.





Cisco Employee

Re: RisPort70 WSDL by Devicepoolname

As noted the Risport API (and underlying service) does not have info on the device pool of the devices and you can't query that way directly.

What you can do is use the AXL API to query for a list of all device names belonging to a particular device pool, then use Risport <selectCmDevice> providing all of the individual device names (up to 1000 in each request).

For example, this AXL <executeSqlQuery> request will return the device names of all devices (and note, not just 'phones' but including gateways and other esoteric device) for the 'Default' device pool:

<soapenv:Envelope xmlns:soapenv="" xmlns:ns="">
      <ns:executeSQLQuery sequence="1">
         <sql>select from device, devicepool where
         	        device.fkdevicepool = devicepool.pkid and
         = "Default"

Example of a <selectCmDevice> request using multiple names:

<soapenv:Envelope xmlns:soapenv="" xmlns:soap="">

Re: RisPort70 WSDL by Devicepoolname

Hi dstaudt,
I am using python to export the phone report. The requirement is list all phones select by device pool and show phones status (registered, unregistered and None).
Now I can export the all devices (including CTI, CIPC phones, SEPXXXXXXXXXXXX phones, etc) select by device pool and write data to excel file. The code is below:
# -*- coding: utf-8 -*-

from zeep import Client
from zeep.cache import SqliteCache
from zeep.transports import Transport
from zeep.exceptions import Fault
from zeep.plugins import HistoryPlugin
from requests import Session
from requests.auth import HTTPBasicAuth
from urllib3 import disable_warnings
from urllib3.exceptions import InsecureRequestWarning
from lxml import etree

import pandas as pd
import time


username = 'username'
password = 'password'
# If you're not disabling SSL verification, host should be the FQDN of the server rather than IP
host = 'IP addresses'

wsdl = 'file://C:/Users/lzqy/code/toolkit/schema/current/AXLAPI.wsdl'
location = 'https:// IP addresses:8443/axl/'.format(host=host)
binding = "{}AXLAPIBinding"

# Create a custom session to disable Certificate verification.
# In production you shouldn't do this,
# but for testing it saves having to have the certificate in the trusted store.
session = Session()
session.verify = False
session.auth = HTTPBasicAuth(username, password)

transport = Transport(cache=SqliteCache(), session=session, timeout=20)
history = HistoryPlugin()
client = Client(wsdl=wsdl, transport=transport, plugins=[history])
service = client.create_service(binding, location)

def show_history():
for item in [history.last_sent, history.last_received]:
print(etree.tostring(item["envelope"], encoding="unicode", pretty_print=True))

resp = service.listPhone(searchCriteria={'devicePoolName': '%users%'},
returnedTags={'model': '', 'name': '', 'description': '', 'devicePoolName': '',
'protocol': ''})

phone_list = resp['return'].phone

result = pd.DataFrame()
for phone in phone_list:
raw_data = {
"model": [phone.model],
"name": [] ,
"description": [phone.description],
"devicePoolName": [phone.devicePoolName['_value_1']],
"protocol": [phone.protocol],


result = pd.concat([result, (pd.DataFrame.from_dict(raw_data))])
result.to_excel(time.strftime("Report-allphone %Y-%m-%d.xlsx"), index=False)

except Fault:

What I need is filter this list and only keep name like CIPC% and SEP% data and find them in Risport API to get phones with status are registered and unregistered.
After that, write the status to "None"for rest of phones.

Do you have any idea about this?



CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards
This widget could not be displayed.