09-22-2016 11:31 PM
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
Solved! Go to Solution.
09-23-2016 10:05 AM
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
09-23-2016 10:05 AM
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
09-27-2016 01:33 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide