Posts Tagged ‘CME how to divert calls’

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


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)


——————- 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#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



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

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