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

No comments:

Post a Comment