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.

Saturday, August 30, 2014

Recovering Laptop Harddrive with Sync Toy and USB Dock Master

Needed to recover data off of a laptop and moving the files just wasn't working...
Decided to try Microsoft's SyncToy. We use it on some of our laptops to backup data from the laptop user's documents folder to a server which has it's own backup.
Created folder pairs for syncing between the failed harddrive and new folder on my desktop.
Since the harddrive was failing (faint click sound), paging errors and the odd bad block error showed up in the event log and SyncToy would stall, but not stop responding.  (Unlike Windows explorer)
To get it to start copying again, simply unplugged the USB cable from my desktop and plug it in again.
Now most copy jobs would stop completely when you do this, but not SyncToy. It moved on to the next file and try to copy that one.  
Granted there would be some files that would be missed based on how long Windows took to re connect the drive however, that is better than no files at all or manually copying over file by file and trying to find out which one was failing.
Once that was done, reran the Windows Chkdsk program on the drive and then ran the SyncToy folder pairs again to recover more files. 
Since SyncToy catalogs and compares file changes, this time the Sync took less time.  The harddrive still had that faint click of death and still required unplugging and plugging the USB cable.  When SyncToy stalled on a bad file, wrote down the file name(s) and then went back into the Folder pair settings and excluded the file(s).  This helped recover as much as 90% of the folders contents in some cases.

Friday, August 8, 2014

SCCM 2012 Clients with Random Software Update Install Failures

Yesterday (Aug. 7, 2014) our SCCM clients started randomly failing to install locally published software updates.  Then even the new RDS servers started failing to install Windows updates via SCCM.  Yet for some reason other clients would install updates

First thought was WSUS certificate issues or Group Policy settings...  Strike one and two.

Try again in the morning...

Of course they didn't magically fix themselves over night (when does that ever happen).

This morning no clients would install any updates.

Looking at the windows update logs on the client machines found error about communication with the endpoint at http .... /clientwebservice/client.asmx.

So the WSUS server was the problem...

Sure enough Windows Update Server Service errors - Event ID in the Application log 12002,12012,12032,12042,12052,12072.

Started with restarting the WSUS service and Window Internal database service... Strike three.

Still not out... maybe I'll just stop using baseball references...

Started looking at the System event log and found that WAS or WsusPool had failed, so onto an IIS investigation. 

Restarting the WSUSPool, it look promising... Wsus was starting... no errors, but then failed after maxing out the CPU for about 5 minutes.

Found one website that said there was no solution, had to rebuild the server from scratch.  That would be bad... very bad... At that point I thought of restoring the system from the day before it failed.

Kept searching the internet for nearly 2 hours and then finally came up with this process...

1) IIsreset /noforce

2) Restarted the Windows Internal database service

3) Deleted the preferences in %appdata%\Microsoft\MMC for WSUS

4) Opened WSUS management console and waited...

Everything was back to normal and actually the final solution is not that complicated.

As with all solutions... there is no guarantee.  It worked for me, it may not work for you.

More SCCM related posts

Thursday, May 1, 2014

Custom Lync Room System Startup

Keep update on this project by following this link...

To create the Domain joined custom Lync Room System...
  1. Group Policy to change these Registry Entries using Preferences
    1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon (Applied to Computer Settings)
      1. DefaultUserName - LyncRoomAccount
      2. DefaultPassword - LyncRoomAccount Password
      3. DefaultDomainName -
      4. AutoLogonCount - Deleted
      5. AutoLogonChecked - Deleted
    2. HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell to wscript.exe //NoLogo /I "C:\Program Files\Lync Room System\Lync Room Computer Startup.vbs"  (Applied to Lync Room User Account Preferences)
    3. By using Preferences you can apply the settings based on Computer Name or Account name.  This allows the computer to still be used as a regular Windows system when logged off.
  2. Lync Room Computer Startup.vbs 
    1. Uses these Sysinternals programs BGInfo, PSKill
      1. Copy the BGinfo program over to "Program Files\Background"
      2. Edit LRS.bgi to change the desktop text and jpg images.
    2. Starts Rainmeter program with "Lync Room System" skin
      1. Once you install the program and installed Lync Room Skin, you must copy the "Lync Room System" folder from your documents\Rainmeter folder to the "Lync Room System" folder.
    3. Runs Office 2013 Lync
The Source files can be found here.  Copy them over to "C:\Program Files\Lync Room System" once the programs have been installed.  Includes a MS Word document with Group Policy information for creating your own GPO.

Monday, April 28, 2014

Rainmeter Custom Desktop Skin

Keep update on this project by following this link...

April 30, 2014
Changed from Images to Buttons (Changes Icon based on mouse action - hover/click)
 - Includes Paint.Net PDN files for you to change
Battery Skin
 - Changed "Charging" to "AC Power"

Future versions will include the option to disable Right mouse button by adding
RightMouseUpAction=[] at the top of each skin in the [Rainmeter] section.

April 29, 2014

Shutdown/Restart/Log Off Bug - You will have to change the Logoff.cmd and Restart.cmd commands to say shutdown.exe other wise it will run the shutdown.cmd file before the shutdown.exe file. 

April 28, 2014
Uploaded the Rainmeter skin for the Custom Lync Room system to DeviantArt

Requires Rainmeter 3.1 -

Latest version of the Lync Room System Rainmeter Skin

This allows for desktop icons, date, time, battery level, speaker levels and custom application launching without "explorer.exe" running.

Added the Rainmeter.exe with custom rainmeter.ini to load this skin via the computer startup script.

See previous article...

Tuesday, April 15, 2014

Custom Lync Room System

Keep update on this project by following this link...

This past month (April 2014) has been spent working on a custom Lync Room System solution that doesn't involve purchasing a Lync Room System.

Followed the Lync Room System deployment guide for the LRS account setup, but instead of the LRS special software/hardware...
It uses the Lync 2013 client and can be deployed to any Windows 7 computer.

Update - April 30, 2014 - Now using Rainmeter software to add Desktop icons, clock, volume control and battery level.

Setting up the computer to Autologin with LRS account.

Custom Lync Room Startup Video

Detailed Setup for the Custom Lync Room System

Resource Links
Lync LRS Deployment guide -

Automatic Login Windows 7 -

Sysinternals - BGInfo program for custom wallpaper background -

Sysinternals - Suite - Used PSkill and PSExec programs -

Encode a Script -

Lync Custom Commands -