Mega Time of Day

July 7, 2014

You know when you have a customer requirement and you have to spend a little time thinking about it and when you figure out the solution you feel quite a bit triumphant?  I had that recently and I’m going to write about it here.  Mainly so that I don’t forget what I have done several years down the road, but you may run into one of these niche cases at some point too!

Requirements

The customer is a school district and wanted to have their teachers route by time of day, you might say, “John, that’s too easy, why are you writing about this?”, but this was no simple time of day routing scenario.  Let’s list out all of the requirements for this particular scenario with bullets!

  • First they wanted to make sure that outside callers could not reach classroom phones during instructional time
  • Second, they wanted to make sure that admins at the school site COULD call the classrooms at any point
  • Third, they wanted to make sure anyone else internal to the district could not call the classrooms during instructional time
  • Fourth, each of their 51 schools could have a different schedule, so we couldn’t apply the same schedule across the board

I think that those are all of the requirements.  Now it may not seem like a huge issue, however that last item was the doozy of this entire situation.  That combined with item number two makes it a little more complicated to deploy, but this is still the requirements section, let’s move on so we can talk about the solution!

The Solution

There are a couple of things that you need to be aware of before we talk to the solution.  Because admins for each school can call the classrooms and no one else can and also because each school can have it’s own schedule this solution requires a separate partition for each site’s teacher phones as well as a separate partition for each route when the teacher phone cannot be rung.  For 51 sites, that means we need a total of 102 partitions to make this solution work!  That’s a lot of partitions!  Additionally, Cisco Unified Communications Manager has a limitation placed on calling search spaces, the total characters allowed in the list of partitions is limited as follows:

 

Partition Name Length Max Number of Paritions
 2 170
3 128
4 102
5 86
10 46

If you look deeply at those numbers, the math really doesn’t look like it works out.  Shouldn’t 5 character partition names allow double the partitions as a 10 character partition name?  Sadly no, there are other things stored in that field with the partition names (like a comma) that actually make them longer than the actual name characters.

So those are the requirements, let’s get down to how this works.

Partitions

For the purposes of this explanation, I’m not going to include any of the partitions that would be needed in a normal dial plan to do things like dial outbound.  This is just for internal and classroom calling, so if you don’t see some of those, that’s why.  Here’s a list of the partitions and what they do:

 

Partition Name Description
Internal Partition for non-TOD phones
NR<SiteCode> The “no ring” partition for the site. This will hold the directory numbers that are enabled during instructional time
R_<SiteCode> The partition that the teacher extensions are in so that they can be dialed by admins or outside of instructional time
AllSchoolHours This partition contains a translation pattern that searches partitions with instructional hours extensions
Avail This partition contains a translation pattern that searches partitions with the teacher extensions for non-instructional hours

Ok, fairly straightforward on the partitions.  Only a handful, not counting that the NR and R will be replicated for each and every site that has time of day routing.

Calling Search Spaces

Now we will cover the calling search spaces that will be used for this scenario.  Just as before, there could be more for a regular dial plan, I’m just trying to impart the overall theory behind this.

<Site>-Admin

The calling search space for the admins at each site.  This allows them to call teachers at their own site during instructional hours, but not other schools.  The partitions that are included in this CSS are included in this order:

  • Internal
  • R_<Sitecode> – for this specific site only
  • AllSchoolHours

CSS-InstructionalHours

This calling search space is what is searched when someone dials a teacher phone that is not at their site.  It is referenced by the translation pattern included in AllSchoolHours.  The partitions that are included in this CSS are included in this order:

  • NR<SITE1>
  • NR<SITE2>
  • NR<SITE3>
  • Avail

So, the CSS searches through the no ring partitions and sees if the pattern that is being called has the no ring partition enabled, if not it searches and hits another translation pattern in the Avail partition.  We will get to the translation patterns after the calling search spaces.

CSS-CallTeacher

This calling search space is referenced by the translation pattern that is in the Avail partition and contains all of the teacher partitions for outside of instructional hours (when they can receive calls).  Here are the partitions included in this CSS:

  • R_<SITE1>
  • R_<SITE2>
  • R_<SITE3>
  • You may want a partition that contains a catchall if it didn’t match anything in the NR or the R partitions.  I’ll exclude that for the sake of this post though

Translation Patterns

In that last section I made several mentions to translation patterns that were use along the way.  Now we will get into the details of these patterns.  The translation patterns themselves are fairly basic, the calling search spaces are really doing the bulk of the work.  In fact, the pattern itself is not being changed at all, it’s just referencing a new calling search space.  Without further ado, here’s the translation pattern details I configured, for this purpose, all of the extensions start with a 6 and are 5-digit extensions:

Pattern Partition CSS
6XXXX AllSchoolHours CSS-InstructionalHours
6XXXX Avail CSS-CallTeacher

See, those translation patterns were pretty simple.  Now, I think we have all of the configuration put together, let’s walk through how it all works together.

Walkthrough

In our walkthrough, we will have three phones and two sites.  The directory numbers will be set up as follows:

  • 61000 – Admin at Bob Elementary with a CSS of Bob-Admin
  • 61001 – Teacher at Bob Elementary with a partition of R_Bob
  • 62001 – Teacher at Sam Middle School with a partition of R_Sam

When our admin at Bob ES picks up the phone to dial 61001, it will just complete.  No time of day routing required.  Because the R_Bob partition is in the Bob-Admin calling search space, the call will match the teacher extension and complete.

For dialing to another school, here’s what happens during instructional time:

  1. The admin dials 62001.  The CSS of Bob-Admin searches it’s partitions for the pattern and the closest match that it can find is the translation pattern 6XXXX in the AllSchoolHours partition
  2. 6XXXX pattern has a CSS of CSS-InstructionalHours. It searches through it’s partitions and finds a CTI route point of 62001 in the NRSam partition.  It chooses that pattern which forwards all calls to voicemail (or the school receptionist, depending on the school preference)

For dialing to another school, here’s what happens outside of instructional time:

  1. The admin dials 62001.  The CSS of Bob-Admin searches it’s partitions for the pattern and the closest match that it can find is the translation pattern 6XXXX in the AllSchoolHours partition
  2. 6XXXX pattern has a CSS of CSS-InstructionalHours.  It searches through it’s partitions and the closest match that it finds is a translation pattern of 6XXXX in the Avail partition (because the NR partition is not enabled outside of instructional time)
  3. The 6XXXX pattern in the Avail partition has a CSS of CSS-CallTeacher.  It searches through it’s partitions and finds an exact match of 62001 in the R_Sam partition.  The call proceeds to ring the teacher phone.

That’s all there is to it.  Hopefully you don’t run into this any time soon, but if you do this is an idea for how to resolve it.

No Comments

Comments are closed.