Combination View Flat View Tree View
Threads [ Previous | Next ]
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: 'CUCMemoticonB 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

Hi all
 
Changes are reflecting on cucm
it was just some problem i guess with net or cucm.
next day it satrted working
 
thanks