cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2122
Views
0
Helpful
2
Replies

CUCM axl - get phone MAC from CUCM according to description directly

jialinli
Level 1
Level 1

Hi,

We want to get the Mac address of phones from CUCM according to description directly.

Like give a key word "alpha", and return all the phone Mac address of which description contains the key word "alpha" as long as it has been configured on CUCM, without regarding to its status or other conditions.

We already studied the samples on:https://developer.cisco.com/site/sxml/downloads/sample-app/ and https://developer.cisco.com/site/axl/learn/how-to/axl-java-sample-application.gsp.

Any other methods are welcomed, we only need to get a list of Mac addresses of which description contains a key word like "alpha".

Thank you so much~

Thanks,

Jialing

1 Accepted Solution

Accepted Solutions

dstaudt
Cisco Employee
Cisco Employee

Note, the actual hardware MAC address of a phone device (and some devices will have multiple MACs for wired and wireless interfaces) is not visible to CUCM, and so can't be retrieved in any way.

If you are referring to a phone's device name, which often includes the wired ethernet MAC in the device name - e.g. 'SEP123456789012' - then you can retrieve that info from AXL via the <listPhone> or <getPhone> requests.  However, note that the device name for many device types (such as Jabber softphones) typically do not include the MAC as part of the name - e.g. 'CSFDSTAUDT'.

In order to get a list of phones based on part of the phone description, you can use <listPhone> as below, where the '%' character is a SQL wildcard indicating 'any number of characters':

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

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listPhone>

         <searchCriteria>

            <description>%STAUDT%</description>

         </searchCriteria>

         <returnedTags>

            <name/>

            <description/>

         </returnedTags>

      </ns:listPhone>

   </soapenv:Body>

</soapenv:Envelope>

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

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

   <soapenv:Body>

      <ns:listPhoneResponse>

         <return>

            <phone uuid="{2A87883B-37CB-6C7B-624A-CF8CAF270E92}">

               <name>CSFDSTAUDT</name>

               <description>CSFDSTAUDT</description>

            </phone>

            <phone uuid="{83086B3A-B721-C965-1132-836CB51BE4FD}">

               <name>CSFDSTAUDT2</name>

               <description>CSFDSTAUDT2</description>

            </phone>

         </return>

      </ns:listPhoneResponse>

   </soapenv:Body>

</soapenv:Envelope>

More info on wildcards and the SQL 'like' operation: SQL Wildcards

View solution in original post

2 Replies 2

dstaudt
Cisco Employee
Cisco Employee

Note, the actual hardware MAC address of a phone device (and some devices will have multiple MACs for wired and wireless interfaces) is not visible to CUCM, and so can't be retrieved in any way.

If you are referring to a phone's device name, which often includes the wired ethernet MAC in the device name - e.g. 'SEP123456789012' - then you can retrieve that info from AXL via the <listPhone> or <getPhone> requests.  However, note that the device name for many device types (such as Jabber softphones) typically do not include the MAC as part of the name - e.g. 'CSFDSTAUDT'.

In order to get a list of phones based on part of the phone description, you can use <listPhone> as below, where the '%' character is a SQL wildcard indicating 'any number of characters':

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

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listPhone>

         <searchCriteria>

            <description>%STAUDT%</description>

         </searchCriteria>

         <returnedTags>

            <name/>

            <description/>

         </returnedTags>

      </ns:listPhone>

   </soapenv:Body>

</soapenv:Envelope>

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

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

   <soapenv:Body>

      <ns:listPhoneResponse>

         <return>

            <phone uuid="{2A87883B-37CB-6C7B-624A-CF8CAF270E92}">

               <name>CSFDSTAUDT</name>

               <description>CSFDSTAUDT</description>

            </phone>

            <phone uuid="{83086B3A-B721-C965-1132-836CB51BE4FD}">

               <name>CSFDSTAUDT2</name>

               <description>CSFDSTAUDT2</description>

            </phone>

         </return>

      </ns:listPhoneResponse>

   </soapenv:Body>

</soapenv:Envelope>

More info on wildcards and the SQL 'like' operation: SQL Wildcards

Hi, David

Thank you so much. I used CURL command and I can get the response now. I've kind of figured out how soap works. I'll keep studying.


Thanks,

Jialing

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: