Month: November 2012

Cisco Unified Communications Manager – Time Based Call Routing

Time based call routing is a convenient feature in the Cisco Unified Communications Manager that allows calls to be treated differently according to a time schedule.

For this example we’ll assume an incoming number will be manipulated so that during regular office hours it will route to reception. Off-hours including lunchtime the call will go direct to voicemail.

Main number is 206-555-1000 The CUCM strips all but the last four digits.
Hours of operation are Mon-Fri 8:00am to 6:00pm with a lunch between noon and 1:00pm.

The starting point is to create Time Periods associated with those hours.

Best practice is to name the time periods based on what they are.

The Open Hours will need two time periods:

  • Mon-Fri 8:00 to 12:00
  • Mon-Fri 13:00 to 18:00

The Closed Hours will need four time periods:

  • Mon-Fri 0:00 to 8:00
  • Mon-Fri 12:00 to 13:00
  • Mon-Fri 18:00 to 24:00
  • Weekends 0:00 to 24:00

Next is to assign the Time Periods to Time Schedules

  • TS_Reception_Open – the two associated time periods.
  • TS_Reception_Closed – the four associated time periods.

Once done you need to create two Partitions assigning the Time Schedules:

  • Part_Reception_Open – TS_Reception_Open
  • Part_Reception_Closed – TS_Reception_Closed

The Calling Search Space (SEA_Local) assigned to the incoming Gateway must then contain those two partitions:

  • For our example the reception phone Line1 is assigned 2000.
  • On the Cisco Unity server the voicemail subscriber with extension 1000 is Reception.
  • The Alternate Extension assigned to the subscriber is 2000 for convenience.

Next is to create a Translation Pattern for open office hours:

  • Translation Pattern – 1000
  • Partition – Part_Reception_Open
  • Description – Main Line 206-555-1000 Open
  • Calling Search Space – SEA_Local
  • Route This Pattern – checked
  • Called Party Transform Mask – 2000

Create a CTI Route Point for the Main Line Off-Hours going direct to Voicemail:

  • DeviceName – MainLineOpen
  • Description – Main Line 206-555-1000 Closed
  • Assign the appropriate Device Pool
  • Calling Search Space – SEA_Local
  • Save and then Line [1] – Add a new DN
  • Directory Number – 1000
  • Partition – Part_Reception_Closed
  • Description/Alerting – Main Line Closed
  • Calling Search Space – SEA_Local
  • Click the box to Forward All to Voicemail
  • Calling Search Space – SEA_Local

The Cisco Unified Communications Manager will then route the call appropriately.

Call flow follows:

PSTN calls 206-555-1000 and for our example strips it to the last four digits.

  • The Gateway sees incoming calls off the Calling Search Space of SEA_Local.
  • In that calling search space it sees two entries for 1000.
  • Next the CUCM checks the time schedule to see how to treat the call.
  • During hours it will be translated to 2000 Line1 of the Reception phone.
  • After hours it will route to the CTI Route Point with a CallFwdAll to the voicemail server and the subscriber extension 1000.

Finally Migrated to Octopress

For a while now, I wanted to migrate my blog from WordPress to Octopress, but for some reason I kept putting it on the shelf and not doing it. (let’s say because of all those client related projects…). Finally last weekend I’ve completed the migration and I’m really excited to get back to blogging after this. This post is meant to capture some of the issues I’ve encountered during the migration and how to fix them. This is not a full how to migrate post, as there are many such great articles available already.

Migrate old blog posts.

Believe it or not, I had 364 blog posts when I started the migration. Meaning a lot of energy was spent in importing those old articles. I’ve used exitwp to convert the wordpress-xml export of the blog posts; and this produced a reasonably good result. Still I had to run some fixes…

  • for code blocks:
 perl -pi -e 's/([^`]|^)(`)([^`]|$)/$1n```n$3/g' *
  • to enable comments (as ‘comments: true’ was missing from all posts)
find source/_posts/ -type f -print0 | xargs -0 -I file sed -i '' '2 i 
  comments: true' file


Enabled the octopress category list plugin and tags plugin, that you can see in the sidebar. Since I had already tags and categories on all posts it was very important to keep the same urls and not break them. Same thing for regular posts urls. Here are the relevant settings form the octopress config file:

root: /
permalink: /:year/:month/:day/:title/

category_dir: category

tag_dir: "tag"

Just keep in mind that if you have many tags as I do, the generation of the pages will increase a lot after you enable the tags plugin. You’ve been warned!

Read More

Finally Migrated to Octopress

Disqus comments not visible in Octopress

After completing the migration of my blog from WordPress to Octopress I had the surprise that Disqus comments were not showing up on the site. I’ve already migrated in advance to Disqus and the WordPress blog was working just fine with the new format. However, once switched to Octopress there were no comments active on the site. Strangely, the total number of comments for each post on the index page was showing just fine, but once you clicked on any post there were no comments. I tested adding new comment and it did show up correctly in Disqus.

Trying to understand and debug this issue, I looked in source/_includes/disqus.html and found the code that is generating the javascript variable disqus_identifier for the posts:

Read More

Disqus comments not visible in Octopress

Symfony2 Flash Message

Flash Messages make it possible to show a string on the next request, for example after a redirect.
This is useful when you want to inform a user about the success or failure of form-requests.
Symfony2 changed how flash messages work from version 2.0 to 2.1, so below you can read about how to use flash messages in both versions.
Symfony2 flash message for Symfony 2.0 and below Setting the flash message To add a flash message – which lasts exactly one request – to a session use this code in the controller: