CUCME: Forward Receiption Number to Mobile During Non-Business Hours

Posted: August 29, 2009 in CME
Tags: , , ,

Sounds good fun – Yeah!? We actually can achieve this without any software automatically every day?
Recently, I  had a request from my friend asking for a help to divert the CME receptionist calls at 5pm to a pre-defined mobile number and UN-divert the call at 8:30am when the receptionist started working. I was going to post it last month, but due to being busy with project work and other commitments I couldn’t possible get even a minute to post this!!

Anyhow, It took me about 30 minutes to think about the best solution and here is what I came up with and it works perfectly.

If you have any better way to achieve this please let me know.

Required: CME router version 4 or 7x (didn’t test on older versions), any model of Cisco router.

Here are the steps:

Steps #1
———————————————————————————

Copy below, call-divert.tcl and call-un-divert.tcl in a notepad and save them as .tcl extension

User Access Verification

Username: push

Password:

HQ-CME>en
HQ-CME#dir *.tcl
Directory of flash:/
94  –rw–         108  Jul 17 2009 14:28:02 +10:00  frog.tcl
95  –rw–         481  Jul 17 2009 14:40:20 +10:00  call-divert.tcl
96  –rw–         484  Jul 17 2009 14:40:30 +10:00  call-un-divert.tcl

512065536 bytes total (443867136 bytes free)

HQ-CME#

——————- call-divert.tcl ——————————

HQ-CME#more flash:call-divert.tcl

#
# Copyright (c) 2009 FROG silly billy

# All rights reserved.
# by:            Push Bhatkoti 28 Mar 2009 / CCIE# voice 21569

# title:          Call divert
# name:       call-divert.tcl

# desc:     This script runs in conjunction with IOS KRON, which  diverts CME DID number         #                  office phone to a Mobile phone after 5pm

#

ios_config “ephonedn 50″ “call-forward all 00412733020”
ios_config “end”
ios_config “do wr mem

HQ-CME#

——————–call-un-divert.tcl————————–

HQ-CME#more flash:call-un-divert.tcl
#
# Copyright (c) 2009 FROG silly bill
# All rights reserved.#
# by:       Push Bhatkoti 28 Mar 2009/ CCIE Voice#21569
# title:    CME router Call UN-divert at 8:30am
# name:    call-un-divert.tcl
# desc:     This script runs in conjunction with ours IOS KRON, which UN-diverts CME DID
#               so that when receptionist starts in the morning will be able to attend the calls
#
#           * download the file into flash:call-divert.tcl
#

ios_config “ephonedn 50″ “no call-forward all  004127492820”
ios_config “end”
ios_config “do wr mem

HQ-CME#

HQ-CME#

Now you’d be thinking what the hell ephone-dn is doing here.  Actually, upon-Dane 50 is a reception outline here is the sample config of DN.

ephonedn  50  octo-line
number 2000 secondary 94232000
pickup-group 88
label Nice-Dolls – 3002
description 02 23233002
name Reception
call-forward busy 4222
call-forward noan 4222 timeout 50
corlist incoming INTL-COR
no huntstop
hold-alert 120 originator
transfermode consult

IN above ephonedn, 94232000 is the main DID number which hits the CME router and receptionist picks it up and then transfers to the phones.

Step #2:
———————————————————————————

Put the above 2 files in a TFTP server and then copy them into the flash:

HQ-CME#dir *.tcl
Directory of flash:/
95  –rw–         481  Jul 17 2009 14:40:20 +10:00  call-divert.tcl
96  –rw–         484  Jul 17 2009 14:40:30 +10:00  call-un-divert.tcl
512065536 bytes total (443867136 bytes free
HQ-CME#

Step #3:

The final step, Kron about two scripts to run them in a record time. BTW, the cron used to be a unix/Linux worlds keyword, but it seems Cisco has  adapted it by using a fancy word like “Kron” duh!

The original requirement was 5pm calls divert to a mobile phone and 8:30 am call un-divert.

Here is how they should be cron’d:

First two cron policy lists and reference the two .tcl scripts into them:

kron policy-list call-divert
cli tclsh call-divert.tcl  ! for call divert

!
kron policy-list call-un-divert
cli tclsh call-un-divert.tcl ! for call un-divert

Then create 2 Kron occurrence and put the above policy list with required divert / undivert time in them.

kron occurrence call-divert at 14:59 recurring !
Policy-list call-divert
Divert reception call at 4:59pm

!
kron occurrence call-un-divert at 8:29 recurring
policy-list call-un-divert
! Un-divert receiption call at 8:29AM
!
If anyone has a better solution, please feel free to provide your feedback.

-Push Bhatkoti

Advertisements
Comments
  1. Steve says:

    Hi; for going with a scheduled config change I would recommend using EEM + time based scheduling:
    http://blog.ioshints.info/2009/03/time-based-ios-actions.html

    Using a queue (bacd .tcl based) Attendant solution with a time of day schedule would be even better, providing a lot more features for primary call coverage:
    http://pbevila.fastmail.fm/public/app-b-acd-aa-2.1.2.2-pl2.tcl

    BR, Steve

  2. shivlu jain says:

    really a good one, in this way calls can be routed according to the days also.

  3. Harish says:

    Please let me know how i can block three called number from router, cme is installed in router.

  4. Hi Push,

    I have also found a likewise solution, but I use in the flash a normal config-file, include the commandlines for the ephone-dn … and call-forward all … resp. a second with the no call-forward all … and in the kron-job I use the command: copy flash:forward-on running-config resp. copy flash:forward-off running-config for return.

    Best regards
    Werner

    • Hi Werner,
      Nice option. I thought about this but the issue with this was, dropping call when you’ve 100+ handsets!!
      also when you’ve UCCX integration with CME – you will notice the drop. Somehow when u write to running config it resets the tcp sessions.
      not sure with the latest codes though.

      Thanks for sharing this though 🙂

      cheers, Push

Leave a Reply , I will reply ASAP

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s