Wednesday, October 29, 2014

Cisco CME Station ID for DID FXS FXO Port Config

In my previous post "Dealing with Multiple Incoming Phone Lines - Cisco CME", you will know we were looking for a way to monitor incoming calls and report prank calls.

In searching for Caller ID programming on a Cisco CME, I came across the station-id command for FXO, FXS and DID ports.

Since we are not subscribing to our Telco providers incoming call display, this command allows us to assign a name (or number) to calls coming in on the voice-ports.

If we were using the Telco's call display, we would need to use the ephone-dn forwarding setup in the previously mentioned post.

Incoming Call
Now all incoming and outgoing calls are now labeled with the Line 50x and DID 30x. (x referring to the line number)

voice-port 0/0/0
  station-id name Line 501
voice-port 0/1/3
 station-id name Line 508

Outgoing Call
Why use 50x and 30x?  - Park codes are 10x and if you look at the dial pad L is #5 and D is #3.

Since we can't call out on a DID port, the station-id helps us report troubles to our Telco provider.

The station-id number command would assign a E164 number to that port.  However, some people might get confused and think that is the number of the person calling.

We using the FXS port for paging, so we simply call it "Paging".

voice-port 0/2/0
 station-id name Paging

Friday, October 24, 2014

Call History Reporting via Notepad++ for Nortel/Avaya BCM Phone Systems

Call Detail Recording for Nortel (now Avaya) BCM is done with push or pull client software.  This setup allows end users to access the FTP share files using Notepad++.  (Keep in mind setup is done on Windows based machines.)

Setup the Call Detail Recording Data File Transfer to push the records to your FTP server based on what ever schedule you like.

For multiple sites, create sub folders in the root of your FTP server based on their location.  i.e. Reports\School or Reports\Office

Setup an account on the BCM end users or support staff to manually push out the file if it's an urgent request.  They just click the "Push Now" button once you have setup the information.
** Keep in mind they will see the IP address and remote user account name for the FTP server.

Now that the files are being pushed to the FTP server, we need a way to get them to the end user.

Since we are using a Windows FTP server, create a share based on the "Reports" folder in the FTP root so that end users can have read access to that folder.  Change the security on the subfolders (i.e. School or office) so that only admins and the specific end user accounts have access.

Problem: Opening text files that don't end in .txt or .csv
Now that the end user can browse to the files, then need a program to open the "record.20141024xxx" files.  Since the extension is the date of push, it will not open automatically and the extension will always change.

Solution: - Notepad++ and Scheduled Task to the rescue.

Notepad++ will open the "record.20141024xxx" files but if the end user doesn't have Notepad++ or just wants to open the txt file with another program here's a batch file that renames them to "record.20141024xxx.txt"

REM Location Cleanup
cd C:\FTP root\Reports\Location
REM copy all date files into one txt file
copy /y record.20* records.*.txt
REM delete the original date file
del record.* /q

Create scheduled task on FTP server to convert the date files to TXT files. Runs 1/2 hour after BCM Push schedule.

For the end users with notepad++

Create a new shortcut for Notepad++ then change the properties of that new shortcut.
Add the share path to the end of the existing the target path.
i.e. "C:\Program Files (x86)\Notepad++\notepad++.exe" "\\server name\Call History Reports\School\"

This will start Notepad++ and open any file that is in that folder.

Staff now press "Ctrl+F" and type in "Digits Dialed" and click "Find All in All opened Documents"
To see more information about that call...

The end user double clicks on the phone number in the "Find result" window.
Notepad++ will jump to that line in that file and show you the Line # and the STN (aka extension number)

Problem: Too many log files can cause Notepad++ to start "Not Responding" especially when using remote network locations.

Solution: Create a scheduled task that runs batch files to merge and overwrite files on the FTP server. (Or monthly depending on your record keeping needs)

Sample Cleanup batch file
- Run every Sunday night
- overwrites the existing weekly.txt file

cd C:\FTP root\Reports\Location
REM merges previous records into a one txt file
copy /y records.20*.txt Weekly.txt
REM delete previous txt files
del records.*.txt /q

Friday, October 10, 2014

Call History Reporting via the Cisco CME GUI for End Users

Over the years, people or students have accidentally dialed 911 and in some cases the police are dispatched.

Then we (IT department) get the call wanting to know who called 911 or do we log outgoing calls.

Without video surveillance pointed at every phone, it's hard to say who was the one dialing, but the call history on the CME GUI could at least report which extension.

Changed the default logging in the CME configuration to...

dial-control-mib retain-timer 10080
dial-control-mib max-size 500

To reduce my work load and give the locations a quicker response to the "Who called 911?" question,
I began looking for a way to allow the locations to access the CME web GUI but not have the ability to may any changes to the system.

After following the GUI install from this website and hiding everything in the XML template...

  web admin customer name Report password Password
  web customize load flash:callreport.xml

The customer account still had the ability to may changes to the configuration.

After searching the internet for how to edit the ccme.html file and finding that the file is not really a file... the next stop was the .js files in the GUI folder.

Knowing nothing about JavaScript, I opened the admin_user.js file in Notepad++ and started looking for some keywords.

Found the Extensions, phones, users and system parameters and was about to cut out the code lines when I noticed the "Block comment" option when I right clicked on the selection.

So I started commenting out line by line and eventually came up with these changes and now any user (even the admin account) that logs into the CME web interface will only be able to access the Call history. - Let face it, when was the last time you configured the CME via Cisco's GUI.

Copied the new admin_user.js file to the tftp server and then downloaded it to the CME.

Changes to the admin_user.js file starting at about line 72 in the version installed on the cme. (Copied the original to admin_userbk.js - Just in case)

Tip - Comment each line as you go and then reload to make sure it is working. - In Notepad++ it's just a right click and "Block Comment" on each line or select more than one line.

/* out += "\"Extensions\", \"javascript:if(!parent.frames[0].checkPageDirty()){parent.frames[0].SetPageCookie(\'page\', \'displayDN()\', true);parent.frames[0].displayDN();}\", 0\n"; */
  /* out += ",\"Phones\", \"javascript:if(!parent.frames[0].checkPageDirty()){parent.frames[0].SetPageCookie(\'page\', \'displayEphone()\', true);parent.frames[0].displayEphone();}\", 0\n"; */
//  out += ",\"Users\", \"javascript:parent.frames[0].displayUsers();\", 0\n";
  /* out += ",\"System Parameters\", \"javascript:if(!parent.frames[0].checkPageDirty()){parent.frames[0].SetPageCookie(\'page\', \'startKeySwitchMenu()\', true);parent.frames[0].startKeySwitchMenu();}\", 0\n"; */
  out += ")\n";
  out += "mn2 = new Array\n";
  out += "(\n";
  /* out += "\"Save Router Config\", \"javascript:if(!parent.frames[0].checkPageDirty())parent.frames[0].writeBack();\", 0\n"; */
  /* out += ",\"Update System Info\", \"javascript:if(!parent.frames[0].checkPageDirty())parent.frames[0].updateFunc();\", 0\n"; */
/* out += ",\"Create CNF Files\", \"javascript:if(!parent.frames[0].checkPageDirty())parent.frames[0].updateCNF();\", 0\n"; */
  out += ")\n";
  out += "mn3 = new Array\n";
  out += "(\n";
 /* if (showControl[SSysMwiSer] != false){
  out += "\"Message Waiting Server Setting\", \"javascript:if(!parent.frames[0].checkPageDirty()){parent.frames[0].SetPageCookie(\'page\', \'displayMWI()\', true);parent.frames[0].displayMWI();}\", 0\n";

  } */
 /* if (!((showAttr[SSysVM] == "Both") &&
                    (showControl[SSysVM] == false))){
    if (showControl[SSysMwiSer] != false){
       out += ",";
  out += "\"Pilot Number\", \"javascript:if(!parent.frames[0].checkPageDirty()){parent.frames[0].SetPageCookie(\'page\', \'setVoiceMailNumber(2)\', true);parent.frames[0].setVoiceMailNumber(2);}\", 0\n";
 } */
  out += ")\n";
  out += "mn4 = new Array\n";
  out += "(\n";
  out += "\"Call History\", \"javascript:if(!parent.frames[0].checkPageDirty()){parent.frames[0].SetPageCookie(\'page\', \'displayCallHistory()\', true);parent.frames[0].displayCallHistory();}\", 0\n";
  out += ")\n";
  out += "mn5 = new Array\n";
  out += "(\n";
  /* out += "\"About\", \"javascript:parent.frames[0].showVersion();\", 0\n"; */
  /* out += ",\"Configuration\", \"javascript:parent.frames[0].showHelp('help_extension()');\", 0\n"; */

Wednesday, October 1, 2014

Dealing with Multiple Incoming Phone Lines - Cisco CME

When our first Cisco CME system was installed, we were told that there wasn't a way to report nuisance calls or block outgoing caller id because the incoming phone lines were programmed into trunk groups.

About 4 years and 16 CME systems later, the IT Department is now deploying the CME systems and we are still asked if this is possible.  Mostly to report nuisance calls, the odd time to block outgoing caller id.

Today I have found a solution to this question for standard phone lines.  This will not work on DID calls as they are only incoming.

In our previous CME configuration, the incoming lines were all forwarded to one DN and appeared as one DN on the main admin phone.  This confused some staff as they were used to having 3 or more line buttons on the Nortel, Norstar or Meridian phones.

In smaller locations, with only 2 or 3 phone lines, we could go with the individual DNs showing up on the phone as individual DNs and then forward to one voice mailbox.  However, some years the Admin assistants are moved around from location to another location so we want to keep things as consistent as possible in our 30+ locations.

In the new configuration...

The incoming calls will forward to their own separate DN (5xx) via the connection plar command in the voice port configuration.

The 5xx DN will then forward onto the main DN (5400).

Example: A call comes in on Line 1 (FXO 0/0/0), it will show up as a forwarded call from the 501 DN.


Now let's say this was a prank call and they want to report it to our telephone provider.

In the old configuration, it would pick the first available phone line out, which would be Line 4...3...2...1 in the example below.  Very often the outgoing call would not pick the same line that the call came in on, so that increase the chances of not working or a false report being filed.

In the new configuration...
The person sees that the call came in on L01 5551212 (501) aka Line 1
Now to report the call to the provider, they dial 9501*57 and the call goes out on Line 1 (FXO port 0/0/0)  and *57 is dialed. (Based on dial-peer voice 500 pots)

If the call came in on L03 5551214 (503) aka Line 3, they would dial 9503*57 and the call would be handled by dial-peer 502

The new 5xx dial peers also allows for calling out on the specific line to do troubleshooting with service providers.

Here's the new configuration.

voice-port 0/0/0
 trunk-group pstn-outgoing 4
 connection plar 501
 description FXO Out 5551212 via 501

voice-port 0/0/1
 trunk-group pstn-outgoing 3
 connection plar 502
 description FXO Out 5551213 via 502

voice-port 0/0/2
 trunk-group pstn-outgoing 2
 connection plar 503
 description FXO Out 5551214 via 503

voice-port 0/0/3
 trunk-group pstn-outgoing 1
 connection plar 504
 description FXO Out 5551215 via 504

dial-peer voice 500 pots
 description ** Line 1 5551212 **
 destination-pattern 9501.T
 port 0/0/0

dial-peer voice 501 pots
 description ** Line 2 5551213 **
 destination-pattern 9502.T
 port 0/0/1

dial-peer voice 502 pots
 description ** Line 3 5551214 **
 destination-pattern 9503.T
 port 0/0/2
dial-peer voice 503 pots
 description ** Line 4 5551215 **
 destination-pattern 9504.T
 port 0/0/3

ephone-dn  296
 number 501
 description Line 1 5551212
 name L01 5551212
 call-forward all 5400

ephone-dn  297
 number 502
 description Line 2 5551213
 name L01 5551213
 call-forward all 5400

ephone-dn  298
 number 503
 description Line 3 5551214
 name L03 5551214
 call-forward all 5400

ephone-dn  299
 number 504
 description Line 4 5551215
 name L04 5551215
 call-forward all 5400

ephone-dn  300  octo-line
 number 5400
 pickup-group 1
 label 5400
 description IT South
 name IT South Office
 allow watch
 call-forward noan 85400 timeout 16
 corlist incoming call-International
 night-service bell

Click the video below to see it in action.