Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: Rusheel Jain on 05-11-2012 07:06:04 AM Hi I am trying to change the MOH Audio Source using axl api. The api returned the uuid (i.e. no error was returned) but when I logged onto my CUCM via browser, the changes were not reflected. Below is the code that I used: string soap = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" "; soap += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">"; soap += "<SOAP-ENV:Body>"; soap += "<axl:updatePhone xmlns:axl=\"http://www.cisco.com/AXL/API/7.0\">"; soap += "<name>"; soap += "SEP3212"; soap += "</name>"; soap += "<userHoldMOHAudioSourceId>"; soap += "1"; soap += "</userHoldMOHAudioSourceId>"; soap += "</axl:updatePhone>"; soap += "</SOAP-ENV:Body>"; soap += "</SOAP-ENV:Envelope>"; Console.Write("getting version"); string version = SoapVersion(soap); Console.Write(version); try { byte[] soapBytes = Encoding.UTF8.GetBytes(soap); ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.Host = host; req.Accept = "text/*"; req.ContentType = "text/xml"; req.Headers.Add("SOAPAction: 'CUCMB ver=" + version + "'"); req.ContentLength = soapBytes.Length; req.Headers.Add("Authorization: " + authorization); req.Method = "POST"; Stream stm = req.GetRequestStream(); stm.Write(soapBytes, 0, soapBytes.Length); Console.Write("getting response"); using (WebResponse response = req.GetResponse()) { Stream responseStream = response.GetResponseStream(); StreamReader reader = new StreamReader(responseStream); string responseFromServer = reader.ReadToEnd(); return responseFromServer; }
THanks Rusheel
Subject: RE: Changes not Reflected Replied by: Rusheel Jain on 07-11-2012 05:36:14 AM Hi all Changes are reflecting on cucm it was just some problem i guess with net or cucm. next day it satrted working thanks
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: