Saturday, February 18, 2012

Austin's School Flashcards

Here is a quick post with some links to help some of Austin's (my 3rd Grader) classmates get access to the flashcards that I create for him.

Apple portable device - iPod Touch, iPhone, or iPad - This is the ideal method, because you will get access to some multimedia flashcards if I get ambitious and create them :) I use a program called Mental Case on my Mac, and with that I can export the "Study Archive", so that you can easily import it. For directions on this method click here *Note you can also use the method below with an iOS App that allows presentation of the information in additional formats such as matching etc.

Austin received a Kindle Fire for Christmas (which he really likes), so in addition to providing the Flashcards on his iPod which is really easy (with the Application I use) I also need to provide them on his Kindle. I use a site called Flashcard Exchange to provide the medium, and an Application from GABYSOFT to download and present the flashcards. They have apps for Apple, Nook, Android, and Amazon devices, so these should work for most people. Click here to read my instructions on how to download the flashcards I have created using these applications.

If you don't have any devices whatsoever, then feel free to view the flashcards themselves on the Web via Flashcard Exchange here. You should be able to bookmark this location for future flashcards as I get them created.

Wednesday, February 15, 2012

Extension Mobility Login/Logout

Here is some information about what I did for Extension Mobility during an upgrade from 4.x to 7.x, and then a Python script I used for maintenance afterwards. I don't have a CUCM cluster to validate this all on, but this should get you started :)

As part of the upgrade it was indicated that the users should be logged out of EM before the upgrade, and then logged back in after the upgrade. I think I did a report from CUCM that included the logged in user's name, and MAC Address of the phone. I then used Excel and Notepad++ to manipulate the file until I had a file with the following format that I could run as a shell script:

#!/bin/sh

curl -v "http://CUCM/emapp/EMAppServlet?device=SEPDDDDCCCCAAAA&doLogout=true"
sleep .5
curl -v "http://CUCM/emapp/EMAppServlet?device=SEPBBBBCCCCDDDD&doLogout=true"
sleep .5

I then ran that as a shell script to logout the phones, and piped the results into a text file. It was a few years ago, so what I did from here looks a little sketchy, but it looks like I for some reason had run the logout script against all phones (maybe I couldn't get a report in 4.x that included logged in user) and then I worked through the output results to get the phones that had actually been logged into, and determined who's they were based on their description.

Here is the script I used to log them in to the phones in version 7.x - I made sure to set all the PINs to the same value.

#!/bin/sh

curl -v "http://CUCM/emapp/EMAppServlet?device=SEPDDDDCCCCAAAA&userid=jdoe&seq=12345"
sleep 5
curl -v "http://CUCM/emapp/EMAppServlet?device=SEPBBBBCCCCDDDD&userid=jsmith&seq=12345"
sleep 5

I then ran that shell script, and piped the results into an output file for review... Let me know if you have any problems, because I did this several years ago, and like I said I couldn't test it against a CUCM.

After the upgrade I knew there were times that I would need to swap a user's phone, and being able to log them out, and log them in without interaction was going to be useful, so I created these two Python scripts... You will need to modify the IP Address, and the PIN (set to 12345 in the example). Again, I pulled these out of my Dropbox and wrote them at my previous employer, so couldn't test them. BTW - I believe these were setup for Python version 2, but I will try to validate that...

emlogout.py

#! /usr/bin/env python
import urllib2

mac_addr = raw_input("Enter the Mac Address of the Phone: ")
print "You entered: ", mac_addr

emlogout_url = 'http://CUCM/emapp/EMAppServlet?device=SEP' + mac_addr + '&doLogout=true'

print emlogout_url

urllib2.urlopen(emlogout_url)


emlogin.py

#! /usr/bin/env python
import urllib2

mac_addr = raw_input("Enter the Mac Address of the Phone: ")
print "You entered: ", mac_addr
username = raw_input("Enter the User Name in all lowercase: ")
print "You entered: ", username

emlogin_url = 'http://CUCM/emapp/EMAppServlet?device=SEP' + mac_addr + '&userid=' + username + '&seq=12345'

print emlogin_url

urllib2.urlopen(emlogin_url)


Again, let me know if you have any problems, and I will do what I can to help :)