Tag Archives: Python

{unity connection api: schedules}

Recently, I’ve had the notion to create some automation tasks for Unity Connection (9.x) using the provided API (apparently it (the api) now goes back to 7.x) that uses REST..I’ve blogged about this before even..in Resetting a User’s VM PIN. Why am I spending time creating automation you might ask? The tasks that must be performed on a week by week basis (for the next 49 weeks) includes: Create a Class of Service, Directory Handler, Schedule (and Schedule Detail of course), GDMs, 2 Call Handlers, a User Template and a partridge in a pair tree..MULTIPLIED by 4..I’ve been doing all this for the past 6 weeks..all by hand..Today I’m going to briefly discuss automating the task of creating Schedules..(the actual Holiday Schedules are already configured..but and this doesn’t show you how to create a Holiday Schedule..but if you follow..then you might get the notion and/or no-how to do this 🙂

Before moving on with this, a few disclaimers must be added..this post is really about getting you started with creating Unity Schedules in a bulk fashion..I’m not sure there is any “built-in” methods to do this within Unity itself..unless you use COBRAS (and modify the CSV file?). My other intent is to share some code that might spawn ideas on how to do other interesting things using the API..
Continue reading

{cisco uc devops: remotely deleting the ITL cert from a 7900 series phone}

Del78series

 

 

 

 

Can you guess what type of phone is depicted in the Image above? First one to guess correctly..wins…

In todays installment we are going to dive into Cisco IP Phone Services Development; we aren’t going to develop any Services, but we will do something that might be somewhat useful for everyone interested in this blog..I am going to demonstrate the remote deletion of an ITL file “just like they do” with the paid applications and just as an FYI, PhoneView’s secret sauce to sending commands like Backgrounds et al is XSI Object Passthrough..Ok now that that is out of the way..today we are just going to POST XML objects straight to a Cisco IP Phone..So, there are a few things that have to be in order before we can get this to work: Web Access has to enabled on the Phone, the CUCM end user account you will use will need to be associated to the phones you are going to “touch”, and the Authentication URL needs to be pointing to a CUCM Node.
Continue reading

{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

{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

{uccx scripting tips & tricks: generating prompts}

Today we are going to do away with the Create Generated Prompt Step, because it really isn’t needed and in my opinion it obfuscates the development process..and toward the end of this post I will show you an example of a Prompt I had to create for a customer because the Speed of the Playback Message was too fast for them; in this real-world example it is required that you have, at a minimum, an Enhanced License for CCX.

What types of Prompts can you “Generate” without the Create Gen Prompt Step? Well ALL of them: Number Prompts (N[], such as in a year where the playback is like the following: Two-thousand and fourteen), Spellings (S[], this is typically how we playback a “number” from a Get Digit String Step), Dates (P[]+date), Currency ($[]), and it goes without saying (pun intended 🙂 a Delay Prompt (DP[]which produces silence).
Continue reading