Monthly Archives: March 2014

{cucm axl devops: scripted updateLine via python}

When we completed the last post we had the following XML Document (formatted to talk to CUCM’s SOAP Interface)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soapenv:Envelop xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
     <soapenv:Header/>
     <soapenv:Body>
          <ns:executeSQLQuery>
               <sql>select description from device where name = 'SEP00123456789'</sql>
          </ns:executeSQLQuery>
     </soapenv:Body>
</soapenv:Envelop>

For this post, I’m going to change the document to use the updateLine method in the AXL Toolkit; it will be simple, short, and whatever you want to think of it. This is a scripted rendition of using AXL. We will explore in future posts how to extend AXL using Object-Oriented Programming techniques that are built right into the Web Services Definition Language (WSDL) using Libraries that are built solely for services such as AXL. Today there will be no Java equivalent because in the case of AXL..python is like Apple..”It just works!” Below is a sneak peek at the SOAP Document we’re going to work on today:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelop xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
     <soapenv:Header/>
     <soapenv:Body>
          <ns:updateLine>
               <pattern>7004</pattern>
               <callForwardAll>
                    <destination>7002</destination>
               </callForwardAll>
          </ns:updateLine>
     </soapenv:Body>
</soapenv:Envelop>

Continue reading

{cucm axl devops: construct a soap request}

It’s called a FORK! No one asked for it (no one probably ever does). No one may even want it. But I had to do it, and now I have to write about it and demonstrate why. Today’s lesson is NOT centrally themed toward UCCX Script development. However, the principles in this post can be applied to CCX Scripts because today we are going to properly construct an XML Document, a very special Document, called a SOAP Request Document. A Simple Object Access Protocol Request is essentially a method/function/subroutine call to a Web Service that returns data your program/script/application is interested in…FYI: SOAP is used everywhere in the enterprise especially where you still find MainFrame DBs and a lot of enterprises are starting to migrate away from SOAP these days and move to REST services..hence I’m starting to get pinged about REST more and more…UCCX 9/10+ uses REST and more and more Cisco stuff is starting to move to it…

What is this FORK! Well a Fork can mean bad things…but I’m really doing this for the greater good especially considering the amounts of Network Engineers and Unified Communications Engineers moving into Software Development…So what the heck is a Fork; according to Wikipedia: “In software engineering, a fork happens when developers take a copy of source code from one software package and start independent development on it, creating a distinct piece of software.”
Continue reading

{Code: The Data Conversion Black Hole}

*Note: when I started writing this post, I thought I had a real winner on my hands; and it was put together fairly quickly. At this point, besides wasting the thoughts that were going through my mind at the time, I suppose I should either completely scrap this entire post or just go ahead and publish it..and let the pieces fall where they will.

I was answering a question on the Cisco Support Forums (formerly netPro) the other day; the OP was trying to get the current time (so he could use it to compare 2 ints) by making the below statement (he used the Cisco T[now] syntax in the post):

int currentTime = int.valueOf(cal.get(cal.HOUR_OF_DAY+
     "" + cal.get(cal.MINUTE));

Continue reading

{uccx script problem solving series: a socket to rule them all}

Open up a curly brace and strap in because we’re going to get moving pretty fast here. The other day I was approached with a question in regards to the Send eMail Step that went like the below:

"During my CCX Script, I have a procedure that Sends an Email 
in the event of 'X' occurring, but I noticed when the Mail
Server is down the Application hangs for about 10 Seconds!!!
How do I limit the amount of time the App Hangs on this step 
in this case?"

Continue reading