Monthly Archives: July 2013

Video: Lego Computer

Whilst browsing some of my favourite programming forums, a user posted this video up which is absolutely fantastic. The physical representation of the different computational gates is mind boggling and is definitely worth a watch.



Scripting, scripting, scripting

I have been tasked with some more scripts to build for work. I’ve wanted to get into programming in the past six to twelve months but I find working from reference books extremely abstract but having an actual goal to work towards, in my opinion, aids in the development of a skill.

Recently, I have been given the opportunity to hone my scripting and programming skills by undertaken various Cisco Contact Centre Express projects which involves a lot of call flow scripting, and because of this, I have been tasked with more and more generic scripting jobs.

The latest non-trivial script I have to build requires automated web browsing. As per usual, I will make all of my scripts available once they have been built. If you download any of them, please let me know what you think of it and also report any bugs to me for further development =)


New theme

I’ve decided to change the theme of my blog. I noticed a few things had gone wrong with the previous theme, as much as I liked it, and I am a little bit of a perfectionist at times.

Anyway, I like the minimalistic theme… for now!



Pinging with times

Today, I found the need to write a simple batch script that would be able to ping a remote host as well as output the times as to when a group of pings were sent. The need for this stemmed from a customer of the company I work for having problems with Cisco IP phones re-registering with the central Cisco Unified Communications Manager server at a certain time every day. Initially, the prognosis was that DHCP was the root cause of the re-registering whereby the devices were renewing their DHCP lease, which by default on Cisco routers is every 24 hours, disconnecting from the network briefly then reconnecting to the network with the same IP address and then re-registering with CUCM. However, this turned out to not be the case as the DHCP lease was extended to occur every seven days but the phones continued to re-register every day. The times in which the re-registering occurred began to change also, varying from 11:30am to 3:45am.

A colleague of mine, during the diagnostic stage, pointed out that the office in which all these phones were re-registering at has a satellite ADSL link to the main office where the CUCM server is at. Now, to prove that this satellite link is the root cause of the re-registering every day, as it is known to be flaky, a constant stream of pings would need to be sent to the remote site’s voice gateway. Simply pinging an interface wouldn’t suffice as time data is not captured and any drops in packets would not be able to be married up to any data captured from the Real Time Monitoring Tool which can be used to view logs on CUCM servers. This is where my very simple, not so clean, batch script comes in handy.

The build of  the script is simple – there’s two files; pingWithTimes.bat and output.bat. The pingWithTimes batch file simple echos the current system time and then pings the the desired interface IP address for, by default, ten times before looping back to the start. Output.bat runs the pingWithTimes.bat file and then saves any output to a text file name output.txt.

The IP address and name of the text document can be edited by using a text editor such as Notepad or Notepad++. Ideally, I would like the script to have prompts but for now, this will suffice.

You can download the .rar of these files here.