<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RisPort70 WSDL by Devicepoolname in Management</title>
    <link>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3893434#M3116</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to export the phone status selected by device pool name from&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;RisPort70 WSDL in python. But the documents shows:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SelectBy&lt;/TD&gt;&lt;TD&gt;Search by:&lt;UL&gt;&lt;LI&gt;Name&lt;/LI&gt;&lt;LI&gt;IPV4Address&lt;/LI&gt;&lt;LI&gt;IPV6Address&lt;/LI&gt;&lt;LI&gt;DirNumber (directory number)&lt;/LI&gt;&lt;LI&gt;Description&lt;/LI&gt;&lt;LI&gt;SIPStatus&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no device pool name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any ideal about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yang&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 08:35:33 GMT</pubDate>
    <dc:creator>lzqy</dc:creator>
    <dc:date>2019-07-19T08:35:33Z</dc:date>
    <item>
      <title>RisPort70 WSDL by Devicepoolname</title>
      <link>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3893434#M3116</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to export the phone status selected by device pool name from&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;RisPort70 WSDL in python. But the documents shows:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SelectBy&lt;/TD&gt;&lt;TD&gt;Search by:&lt;UL&gt;&lt;LI&gt;Name&lt;/LI&gt;&lt;LI&gt;IPV4Address&lt;/LI&gt;&lt;LI&gt;IPV6Address&lt;/LI&gt;&lt;LI&gt;DirNumber (directory number)&lt;/LI&gt;&lt;LI&gt;Description&lt;/LI&gt;&lt;LI&gt;SIPStatus&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no device pool name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any ideal about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yang&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 08:35:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3893434#M3116</guid>
      <dc:creator>lzqy</dc:creator>
      <dc:date>2019-07-19T08:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: RisPort70 WSDL by Devicepoolname</title>
      <link>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3893785#M3121</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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 &amp;lt;selectCmDevice&amp;gt; providing all of the individual device names (up to 1000 in each request).&lt;/P&gt;
&lt;P&gt;For example, this AXL &amp;lt;executeSqlQuery&amp;gt; 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:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5"&amp;gt;
   &amp;lt;soapenv:Header/&amp;gt;
   &amp;lt;soapenv:Body&amp;gt;
      &amp;lt;ns:executeSQLQuery sequence="1"&amp;gt;
         &amp;lt;sql&amp;gt;select device.name from device, devicepool where
         	        device.fkdevicepool = devicepool.pkid and
         	        devicepool.name = "Default"
         	        &amp;lt;/sql&amp;gt;
      &amp;lt;/ns:executeSQLQuery&amp;gt;
   &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Example of a &amp;lt;selectCmDevice&amp;gt; request using multiple names:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap"&amp;gt;
   &amp;lt;soapenv:Header/&amp;gt;
   &amp;lt;soapenv:Body&amp;gt;
      &amp;lt;soap:selectCmDevice&amp;gt;
         &amp;lt;soap:StateInfo/&amp;gt;
         &amp;lt;soap:CmSelectionCriteria&amp;gt;
            &amp;lt;soap:MaxReturnedDevices&amp;gt;80&amp;lt;/soap:MaxReturnedDevices&amp;gt;
            &amp;lt;soap:DeviceClass&amp;gt;Phone&amp;lt;/soap:DeviceClass&amp;gt;
            &amp;lt;soap:Model&amp;gt;255&amp;lt;/soap:Model&amp;gt;
            &amp;lt;soap:Status&amp;gt;Any&amp;lt;/soap:Status&amp;gt;
            &amp;lt;soap:NodeName&amp;gt;&amp;lt;/soap:NodeName&amp;gt;
            &amp;lt;soap:SelectBy&amp;gt;Name&amp;lt;/soap:SelectBy&amp;gt;
            &amp;lt;soap:SelectItems&amp;gt;
            	&amp;lt;soap:item&amp;gt;&amp;lt;soap:Item&amp;gt;SEP000000000001&amp;lt;/soap:Item&amp;gt;&amp;lt;/soap:item&amp;gt;
            	&amp;lt;soap:item&amp;gt;&amp;lt;soap:Item&amp;gt;SEP000000000002&amp;lt;/soap:Item&amp;gt;&amp;lt;/soap:item&amp;gt;
            &amp;lt;/soap:SelectItems&amp;gt;
            &amp;lt;soap:Protocol&amp;gt;Any&amp;lt;/soap:Protocol&amp;gt;
            &amp;lt;soap:DownloadStatus&amp;gt;Any&amp;lt;/soap:DownloadStatus&amp;gt;
         &amp;lt;/soap:CmSelectionCriteria&amp;gt;
      &amp;lt;/soap:selectCmDevice&amp;gt;
   &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jul 2019 18:11:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3893785#M3121</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2019-07-19T18:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: RisPort70 WSDL by Devicepoolname</title>
      <link>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3894523#M3122</link>
      <description>Hi dstaudt,&lt;BR /&gt;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).&lt;BR /&gt;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:&lt;BR /&gt;# -*- coding: utf-8 -*-&lt;BR /&gt;&lt;BR /&gt;from zeep import Client&lt;BR /&gt;from zeep.cache import SqliteCache&lt;BR /&gt;from zeep.transports import Transport&lt;BR /&gt;from zeep.exceptions import Fault&lt;BR /&gt;from zeep.plugins import HistoryPlugin&lt;BR /&gt;from requests import Session&lt;BR /&gt;from requests.auth import HTTPBasicAuth&lt;BR /&gt;from urllib3 import disable_warnings&lt;BR /&gt;from urllib3.exceptions import InsecureRequestWarning&lt;BR /&gt;from lxml import etree&lt;BR /&gt;&lt;BR /&gt;import pandas as pd&lt;BR /&gt;import time&lt;BR /&gt;&lt;BR /&gt;disable_warnings(InsecureRequestWarning)&lt;BR /&gt;&lt;BR /&gt;username = 'username'&lt;BR /&gt;password = 'password'&lt;BR /&gt;# If you're not disabling SSL verification, host should be the FQDN of the server rather than IP&lt;BR /&gt;host = 'IP addresses'&lt;BR /&gt;&lt;BR /&gt;wsdl = 'file://C:/Users/lzqy/code/toolkit/schema/current/AXLAPI.wsdl'&lt;BR /&gt;location = 'https:// IP addresses:8443/axl/'.format(host=host)&lt;BR /&gt;binding = "{&lt;A href="http://www.cisco.com/AXLAPIService/}AXLAPIBinding" target="_blank"&gt;http://www.cisco.com/AXLAPIService/}AXLAPIBinding&lt;/A&gt;"&lt;BR /&gt;&lt;BR /&gt;# Create a custom session to disable Certificate verification.&lt;BR /&gt;# In production you shouldn't do this,&lt;BR /&gt;# but for testing it saves having to have the certificate in the trusted store.&lt;BR /&gt;session = Session()&lt;BR /&gt;session.verify = False&lt;BR /&gt;session.auth = HTTPBasicAuth(username, password)&lt;BR /&gt;&lt;BR /&gt;transport = Transport(cache=SqliteCache(), session=session, timeout=20)&lt;BR /&gt;history = HistoryPlugin()&lt;BR /&gt;client = Client(wsdl=wsdl, transport=transport, plugins=[history])&lt;BR /&gt;service = client.create_service(binding, location)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;def show_history():&lt;BR /&gt;for item in [history.last_sent, history.last_received]:&lt;BR /&gt;print(etree.tostring(item["envelope"], encoding="unicode", pretty_print=True))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;try:&lt;BR /&gt;resp = service.listPhone(searchCriteria={'devicePoolName': '%users%'},&lt;BR /&gt;returnedTags={'model': '', 'name': '', 'description': '', 'devicePoolName': '',&lt;BR /&gt;'protocol': ''})&lt;BR /&gt;&lt;BR /&gt;phone_list = resp['return'].phone&lt;BR /&gt;&lt;BR /&gt;result = pd.DataFrame()&lt;BR /&gt;for phone in phone_list:&lt;BR /&gt;raw_data = {&lt;BR /&gt;"model": [phone.model],&lt;BR /&gt;"name": [phone.name] ,&lt;BR /&gt;"description": [phone.description],&lt;BR /&gt;"devicePoolName": [phone.devicePoolName['_value_1']],&lt;BR /&gt;"protocol": [phone.protocol],&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;result = pd.concat([result, (pd.DataFrame.from_dict(raw_data))])&lt;BR /&gt;result.to_excel(time.strftime("Report-allphone %Y-%m-%d.xlsx"), index=False)&lt;BR /&gt;&lt;BR /&gt;except Fault:&lt;BR /&gt;show_history()&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;After that, write the status to "None"for rest of phones.&lt;BR /&gt;&lt;BR /&gt;Do you have any idea about this?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Yang&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 03:54:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3894523#M3122</guid>
      <dc:creator>lzqy</dc:creator>
      <dc:date>2019-07-22T03:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: RisPort70 WSDL by Devicepoolname</title>
      <link>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3945064#M3209</link>
      <description>You will have to use the RIS DB and AXL&lt;BR /&gt;Your RIS DB Request will give you the Status of every phone&lt;BR /&gt;With AXL you can use listPhone or you make an executeSQLQuery where you can get all information you need about the phone like name and devicepool&lt;BR /&gt;&lt;BR /&gt;Then you will have to process all the AXL Infomration and compare to RIS output and map them together so you will have phone | DevicePool | Status</description>
      <pubDate>Tue, 22 Oct 2019 07:33:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/risport70-wsdl-by-devicepoolname/m-p/3945064#M3209</guid>
      <dc:creator>thedd</dc:creator>
      <dc:date>2019-10-22T07:33:48Z</dc:date>
    </item>
  </channel>
</rss>

