Showing posts with label Call History. Show all posts
Showing posts with label Call History. Show all posts

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...

telephony-service
  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"; */