04-07-2015 07:35 PM
Hello
I am running Cisco call manager 10.0.1.
Just need to know as what will be the exact format for my command to update phone with known mac address the following field:
Device===>Phone
under CAPF ===> certificate operation to install/upgrade
I know that it should be simple. But with a MAC address of phone I will be so easily able to reset the certificate operation to install/upgrade.
I am using curl to send using "request.xml" file but need the exact format.
Any help will be appreciated.
04-08-2015 08:49 PM
Hi,
Please try this for updatePhone
<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:updatePhone sequence="1">
<name>YourDeviceName</name>
<callingSearchSpaceName>CSS_TEST_CHECK_IN</callingSearchSpaceName>
<lines>
<line>
<uuid>{E19A3CED-65AC-D8E0-CEE6-6AE4E83BCB48}</uuid>
<index>1</index>
<label>John Smith</label>
<display>John Smith</display>
<displayAscii>John smith</displayAscii>
<dirn uuid="{F0C3375B-073D-4FBB-6A40-EFDBEF34DD89}">
<pattern>2319</pattern>
</dirn>
</line>
</lines>
</ns:updatePhone>
</soapenv:Body>
</soapenv:Envelope>
=======================================
You need to set Authentication and Soap action (CUCM:DB ver=10.0) for this.
After you do updatePhone and need to do DoDeviceReset to update what you change from updatePhone
YourDeviceName = Name of device you want to update (ex:= SEP001A6CE17C95)
uuid = You need to get lines->line->uuid from your device (ex: {E19A3CED-65AC-D8E0-CEE6-6AE4E83BCB48} )
uuid = You need to get line -> dirn -> uuid from your device (ex: {F0C3375B-073D-4FBB-6A40-EFDBEF34DD89} )
pattern = Extension
To find uuid you can use getPhone to get details of your device.
I hope this will help you.
Regards
Thuy Doan
04-22-2015 06:10 PM
Thuy
I don't see "certificate operation" to install/upgrade option in the format you posted?
Can I just give Mac address and set certificate operation to install/upgrade? (that is how we do it in cucm).
thanks for your help.
04-22-2015 06:40 PM
Hi Irfan,
I added the certificationOperation in updatePhone. I set value is No Pending Operation for default, you can replace No Pending Operation
to Install/Upgrade
<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:updatePhone sequence="1">
<name>YourDeviceName</name>
<callingSearchSpaceName>CSS_TEST_CHECK_IN</callingSearchSpaceName>
<certificateOperation>No Pending Operation</certificateOperation>
<lines>
<line>
<uuid>{E19A3CED-65AC-D8E0-CEE6-6AE4E83BCB48}</uuid>
<index>1</index>
<label>John Smith</label>
<display>John Smith</display>
<displayAscii>John smith</displayAscii>
<dirn uuid="{F0C3375B-073D-4FBB-6A40-EFDBEF34DD89}">
<pattern>2319</pattern>
</dirn>
</line>
</lines>
</ns:updatePhone>
</soapenv:Body>
</soapenv:Envelope>
Regards
Thuy Doan
04-23-2015 01:02 PM
Thanks, you are a great help.
I think I am close.
So can I use what you sent me as is, in my request.xml file with curl?
Also can I just send the device name and certificate operation and leave
other blank (including uuid's)?
In CUCM GUI/page we just enter device name and change cert operation to
install upgrade.
Best Regards,
Irfan Durrani
Sr. Principal Leader, Principal Architect
Workplace GDN
CSC
Phone: 571-379-0082
idurrani@csc.com | www.csc.com
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
04-23-2015 05:53 PM
If you do not want to change CSS and lines -> line, you can ignore that. I changed as follows
<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:updatePhone sequence="1">
<name>YourDeviceName</name>
<certificateOperation>Install/Upgrade</certificateOperation>
</ns:updatePhone>
</soapenv:Body>
</soapenv:Envelope>
//=========================================
Regards
Thuy Doan
04-24-2015 04:48 AM
Thuy
Thanks much again.
So I used exactly following in my request.xml file:
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.cisco.com/AXL/API/10.0">
a
a:hover a:visted body {
background-attachment: fixed; background-color: #ffffff;
background-repeat: no-repeat; color: #316984;
font-family: arial,helvetica,sans-serif; } #content
#content-header { background-color: #eeeeee; border-bottom:
1px solid #666666; color: #666666; font-size: 124.5%;
padding: 5px 15px 5px 15px; } #copyright {
font-size: 75%; margin: 0px 10% 0px 10%; padding: 3px 0px
0px 0px; text-align: right; } img
#logo p pre
What am I doing worng?
Best Regards,
Irfan Durrani
Sr. Principal Leader, Principal Architect
Workplace GDN
CSC
Phone: 571-379-0082
idurrani@csc.com | www.csc.com
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
04-27-2015 07:03 PM
Hi Irfan,
I do not know what language you are using.
I give you the sample in C#. It worked for me.
//================================
.....
.....
string sXML =
string sNs = "http://www.cisco.com/AXL/API/10.0";
string sResult = "";
string sError = "";
sXML = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns='" + sNs + "'>";
sXML = sXML + "<soapenv:Header/>";
sXML = sXML + "<soapenv:Body>";
sXML = sXML + "<ns:updatePhone sequence='1'>";
sXML = sXML + "<name>YourDeviceName</name>";
sXML = sXML + "<certificateOperation>Install/Upgrade</certificateOperation>";
sXML = sXML + "</ns:updatePhone>";
sXML = sXML + "</soapenv:Body>";
sXML = sXML + "</soapenv:Envelope>";
//Call function
if (SendXml(sXML, ref sResult, ref sError))
{
//Your message
}
else
{
//Your message
}
//===========================================================================
private bool SendXml(string sXML, ref string sResult, ref string sError)
{
try
{
sResult = "";
sError = "";
//Security
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CertificateValidationCallBack);
//
WebRequest myWebRequest;
WebResponse myWebResponse;
Stream myRequestStream;
Stream myResponseStream;
StreamReader myStreamReader;
StreamWriter myStreamWriter;
//
string sURL = textBox1.Text;
string sUsername = textBox2.Text;
string sPassword = textBox3.Text;
string sContentType = "text/xml";
string sHTTPHeaderName = "SOAPAction";
string sHTTPHeaderValue = "CUCM:DB ver=9.1";
string sBase64Str = "";
//
myWebRequest = WebRequest.Create(sURL);
//Checking user name and password
if (!string.IsNullOrEmpty(sUsername) && !string.IsNullOrEmpty(sPassword))
{
sBase64Str = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(sUsername + ":" + sPassword));
myWebRequest.Headers.Add("Authorization", "Basic " + sBase64Str);
}
//
myWebRequest.Method = "POST";
myWebRequest.ContentType = sContentType;
myWebRequest.Headers.Add(sHTTPHeaderName, sHTTPHeaderValue);
//
myRequestStream = myWebRequest.GetRequestStream();
myStreamWriter = new StreamWriter(myRequestStream);
myStreamWriter.Write(sXML);
myStreamWriter.Flush();
myStreamWriter.Close();
myStreamWriter.Dispose();
myRequestStream.Close();
myRequestStream.Dispose();
//
myWebResponse = myWebRequest.GetResponse();
myResponseStream = myWebResponse.GetResponseStream();
myStreamReader = new StreamReader(myResponseStream);
sResult = myStreamReader.ReadToEnd();
myStreamReader.Close();
myStreamReader.Dispose();
myResponseStream.Close();
myResponseStream.Dispose();
myWebResponse.Close();
return true;
}
catch (Exception e)
{
sError = e.ToString();
return false;
}
}
//=========================================================
//Security
public bool CertificateValidationCallBack(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
//if (sslPolicyErrors == SslPolicyErrors.None)
// return true;
//else
// return false;
return true;
}
//=========================================================
I hope this will help you.
Regards
Thuy Doan
06-22-2016 01:34 AM
Wanna to set the operationCompletion for updatePhone. But not seeing such action "operationCompletion" under updatePhone. Do you know if there is one?
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