cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2472
Views
8
Helpful
5
Replies

Phone Active Load via API

Martin Sloan
Level 1
Level 1

Hello,

I've been retrieving phone firmware data via web-scraping and while it works, it doesn't seem optimal.  I'm looking for a more structured interface.  Is there an API where I can gather the phone active load information?  I'm familiar with the RIS and PerfMon API's, but I don't see the load data listed there.  Any help is appreciated.

Thanks,

Marty

1 Accepted Solution

Accepted Solutions

dstaudt
Cisco Employee
Cisco Employee

<getPhone> includes a <loadInformation> element, where the 'special' attribute will be true if the load is a non-default load:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.0">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:getPhone sequence="1">

         <name>SEP708105855CBE</name>

      </ns:getPhone>

   </soapenv:Body>

</soapenv:Envelope>

--------------------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getPhoneResponse xmlns:ns="http://www.cisco.com/AXL/API/10.0">

         <return>

            <phone ctiid="98" uuid="{A48E4942-ACCF-9F78-C3AA-A7C2215A9DC7}">

               <name>SEP708105855CBE</name>

               <description>SEP708105855CBE</description>

               <product>Cisco 8945</product>

               <model>Cisco 8945</model>

               <class>Phone</class>

               <protocol>SCCP</protocol>

               <protocolSide>User</protocolSide>

               <callingSearchSpaceName/>

               <devicePoolName uuid="{1B1B9EB6-7803-11D3-BDF0-00108302EAD1}">Default</devicePoolName>

               <commonDeviceConfigName/>

               <commonPhoneConfigName uuid="{AC243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Common Phone Profile</commonPhoneConfigName>

               <networkLocation>Use System Default</networkLocation>

               <locationName uuid="{29C5C1C4-8871-4D1E-8394-0B9181E8C54D}">Hub_None</locationName>

               <mediaResourceListName/>

               <networkHoldMohAudioSourceId/>

               <userHoldMohAudioSourceId>3</userHoldMohAudioSourceId>

               <automatedAlternateRoutingCssName/>

               <aarNeighborhoodName/>

               <loadInformation special="true">cmterm-SCCP894x.9-4-2SR1-2</loadInformation>

               <vendorConfig>

               ...

<listPhone> includes the option to include <loadInformation> as a returned field, but it appears that even if specified, <loadInformation> does not get returned.  (This is likely a defect either in the docs or in the implementation)

As a workaround, you may be able to use <executeSqlQuery> to query the 'device' table for the 'specialloadinformation' field (you will likely want to filter by tkclass/tkmodel/tkproduct to keep things like gateways out of the return.)  This field should be null if the device is configured for the default device load (see below), or will have the string value of any special load configured.

The default loads configured for each model type (corresponding to the settings in 'Device/Device Settings/Device Defaults' are found in the 'defaults' table.  Note newer phones which support background updating/active-inactive partitions may have values in both 'loadinformation' and 'inactiveloadinformation' fields.

See the 'Data Dictionary' document for details on the CUCM tables/fields.

View solution in original post

5 Replies 5

dstaudt
Cisco Employee
Cisco Employee

<getPhone> includes a <loadInformation> element, where the 'special' attribute will be true if the load is a non-default load:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.0">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:getPhone sequence="1">

         <name>SEP708105855CBE</name>

      </ns:getPhone>

   </soapenv:Body>

</soapenv:Envelope>

--------------------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getPhoneResponse xmlns:ns="http://www.cisco.com/AXL/API/10.0">

         <return>

            <phone ctiid="98" uuid="{A48E4942-ACCF-9F78-C3AA-A7C2215A9DC7}">

               <name>SEP708105855CBE</name>

               <description>SEP708105855CBE</description>

               <product>Cisco 8945</product>

               <model>Cisco 8945</model>

               <class>Phone</class>

               <protocol>SCCP</protocol>

               <protocolSide>User</protocolSide>

               <callingSearchSpaceName/>

               <devicePoolName uuid="{1B1B9EB6-7803-11D3-BDF0-00108302EAD1}">Default</devicePoolName>

               <commonDeviceConfigName/>

               <commonPhoneConfigName uuid="{AC243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Common Phone Profile</commonPhoneConfigName>

               <networkLocation>Use System Default</networkLocation>

               <locationName uuid="{29C5C1C4-8871-4D1E-8394-0B9181E8C54D}">Hub_None</locationName>

               <mediaResourceListName/>

               <networkHoldMohAudioSourceId/>

               <userHoldMohAudioSourceId>3</userHoldMohAudioSourceId>

               <automatedAlternateRoutingCssName/>

               <aarNeighborhoodName/>

               <loadInformation special="true">cmterm-SCCP894x.9-4-2SR1-2</loadInformation>

               <vendorConfig>

               ...

<listPhone> includes the option to include <loadInformation> as a returned field, but it appears that even if specified, <loadInformation> does not get returned.  (This is likely a defect either in the docs or in the implementation)

As a workaround, you may be able to use <executeSqlQuery> to query the 'device' table for the 'specialloadinformation' field (you will likely want to filter by tkclass/tkmodel/tkproduct to keep things like gateways out of the return.)  This field should be null if the device is configured for the default device load (see below), or will have the string value of any special load configured.

The default loads configured for each model type (corresponding to the settings in 'Device/Device Settings/Device Defaults' are found in the 'defaults' table.  Note newer phones which support background updating/active-inactive partitions may have values in both 'loadinformation' and 'inactiveloadinformation' fields.

See the 'Data Dictionary' document for details on the CUCM tables/fields.

-- EDITED --


Thanks for the details on this question.  I just ran through some testing and I think there is one situation I'm still not able to capture via AXL, which is when a phone has been instructed to upgrade via default load or custom/special load, and it has not.  For example a SCCP phone on v 8.3(3) which needs to upgrade to 9.4.  It needs an interim version and so the upgrade would fail silently with the phone reverting back to 8.3(3).  In this case I believe we can see in the CUCM admin GUI (I don't currently have this 'gotcha' situation setup) that the 'Active Load ID' is the running version, regardless of the CUCM default or special load.  Is there a way to capture this information outside of checking the phone directly?

Hi

The database (which is what AXL queries) will only include specific config, not defaults, and as you say you can't assume that the config for firmware has applied.

The other options are:

1) Query the RIS API - this will show the phone load name as reported by the phone to CUCM. Last time I checked this it didn't report for all phone models.

2) Query the phone directly - each page on the phone has an XML version that makes it easy ish e.g. ip/DeviceInformationX. It does mean gathering all the phone IPs from CUCM then requesting from each phone though. Also, some old/odd stuff might not offer XML, so you'd have to scrape the HTML. FInally, the phones would need to have web access enabled on them.


Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Aaron,

Thank you for the reply.

My initial investigation was with the RIS API since I am gathering the device IP information via RIS to scrape the HTML for the load data, but I was not able to locate load information in the returned RIS object when working with some popular 79XX models.  As you mentioned it might not always be available there and so it's probably not the best option for me.  I started to look into alternatives because I currently need to create different scraping logic based on the phone model since the location of the load info in the HTML varies from model to model.  I did not, however, know about the DeviceInformationX URL!  If this is a consistent API throughout phone models then I can 'set it and forget it' and won't need to revisit every time a new model is implemented/required.  I'll start some testing, and thanks again for the information.

Marty

As I say, it's pretty consistent - there are a few models that don't support it. Very low end phones (3905s or whatever they were, old ATA firmware versions etc).

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: