Showing posts with label Cisco. Show all posts
Showing posts with label Cisco. Show all posts

Tuesday, December 11, 2018

Cisco CME - Emergency Call History Notification - Part 2

Let's say you wanted to notify all phones that a Lockdown scenario has started  or 911 was dialed at this location.  We would need to find all registered phones and push out a message.

Short version...
a) Person dials the predetermined emergency number
b) CME Syslog see this event and runs the Event Manager applet
c) The CME uploads the TXT file to the Windows server and the PowerShell script sees the new file and runs the PHP script. 
d) The PHP script then reads each line of the uploaded TXT file and pushes out the XML file to the registered phones.



See the start of the event manager applet on Part 1

Find all register phones (SCCP and SIP) and add them to an variable
 action 002.60.01  cli command "show ephone registered sum | include 192.168"
 action 002.60.02 foreach line "$_cli_result" "\n"
 action 002.60.03  regexp "192\.168\....\...." "$line"
 action 002.60.04  if $_regexp_result eq "1"
 action 002.60.05   regexp "192\.168\.[0-9]+\.[0-9]+" "$line" temp_IP
 action 002.60.06   append array_IP "$temp_IP\n"
 action 002.60.07  end
 action 002.60.08 end
 action 002.61.01 cli command "show voice register pool registered | include IP address"
 action 002.61.02 foreach line "$_cli_result" "\n"
 action 002.61.03  regexp "192\.168\....\...." "$line"
 action 002.61.04  if $_regexp_result eq "1"
 action 002.61.05   regexp "192\.168\.[0-9]+\.[0-9]+" "$line" temp_IP
 action 002.61.06   append array_IP "$temp_IP\n"
 action 002.61.07  end
 action 002.61.08 end
 Send the results to a file on a TFTP server.  (In our case it's a TFTP server running on Windows Server 2016)
 action 003.01.01 set result_Final "$result_Site $result_Ext $result_Mac $result_IP $result_Called"
 action 003.01.02 set result_Notify "$result_Final\n$array_IP"
 action 003.02.01 if $result_Called eq "911"
 action 003.02.02  file open fh flash:911.txt w
 action 003.02.03  file write fh $result_Final
 action 003.02.04  file close fh
 action 003.02.05 else
 action 003.02.06  file open fh flash:Notify.txt w
 action 003.02.07  file write fh $result_Notify
 action 003.02.08  file close fh
 action 003.02.09 end

 action 003.03 cli command "configure terminal"
 action 003.04 cli command "file prompt quiet"
 action 003.05 cli command "end"
 action 003.06.01 if $result_Called eq "911"
 action 003.06.02  cli command "copy flash:911.txt tftp://eventlogger/demo911.txt"
 action 003.06.03 else
 action 003.06.04  cli command "copy flash:Notify.txt tftp://eventlogger/demoLock.txt"
 action 003.06.05 end
 action 003.07 cli command "configure terminal"
 action 003.08 cli command "no file prompt quiet"
 action 003.09 cli command "end" 
 Do something with those results.

This is were some searching on the Internet found a PowerShell script that can run commands based on different file actions. Create a new task that runs at computer startup and runs as System account.
Remove-Item c:\oss_snmp\LockDownlog.log
Remove-Item c:\oss_snmp\PHPlog.log
Remove-Item c:\tftp-root\*lock.txt
### SET FOLDER TO WATCH + FILES TO WATCH + SUBFOLDERS YES/NO
    $watcher = New-Object System.IO.FileSystemWatcher
    $watcher.Path = "c:\tftp-root"
    $watcher.Filter = "*lock.txt"
    $watcher.IncludeSubdirectories = $false
    $watcher.EnableRaisingEvents = $true 
### DEFINE ACTIONS AFTER AN EVENT IS DETECTED
    $LogAction = { $path = $Event.SourceEventArgs.FullPath
                $changeType = $Event.SourceEventArgs.ChangeType
                $logline = "$(Get-Date), $changeType, $path"
                Add-content "c:\oss_snmp\LockDownlog.log" -value $logline
              }   
    $PHPAction = { php -f C:\OSS_SNMP\LockdownCMEPHones.php
$path = $Event.SourceEventArgs.FullPath
                $changeType = $Event.SourceEventArgs.ChangeType
                $logline = "$(Get-Date), $changeType, $path"
                Add-content "c:\oss_snmp\LockDownlog.log" -value $logline
              } 
### DECIDE WHICH EVENTS SHOULD BE WATCHED
    Register-ObjectEvent $watcher "Created" -Action $PHPAction
    Register-ObjectEvent $watcher "Changed" -Action $LogAction
    Register-ObjectEvent $watcher "Deleted" -Action $LogAction
    Register-ObjectEvent $watcher "Renamed" -Action $LogAction
    while ($true) {sleep 1}
Install PHP for Windows on IIS.
This will allow us to run the Push2Phone function from the Cisco IP Services development kit.
Save the below text into the PHP file mention in the above PowerShell script.
<?php
//header("refresh: 30;");
$File = 'c:\TFTP-Root\demoLock.txt';
chdir('c:\OSS_SNMP');
$School = "";
$Address = "";
$Site = "Empty";
//echo "Start\n";
if (file_exists($File))
{
//echo "found \n";
$contents = file_get_contents($File);
$lines = explode("\n", $contents);
foreach ($lines as $line)
{
if ($line === ""){
//nothing
//echo 'Nothing';
}
else
{
if (strpos($line," ") !== false){
$Found = explode(" ", $line);
$Site = substr_replace(strTOUpper($Found[0]),"",-1);
$Site = str_replace($Site,"DEMO","DEMO-SITE");
$LookupSchool = SiteLocation($Site);
$School = $LookupSchool[0];
$Address = $LookupSchool[1];
//echo "$Site \n";
$Ext = $Found[1];
$Mac = $Found[2];
$IP = $Found[3];
$Number = $Found[4];
}
else
{
$IP = $line;
$Today = date("F j, Y, g:i a");
$Textdata = "$School \n$Address\nIs in LOCKDOWN\n$Today";
set_time_limit(0); //http://php.net/manual/en/function.set-time-limit.php
$uri = "http://cmephones.emailhost.ca:8080/XML/$IP.xml";
$uid = "icxml";
$pwd = "password";
$filename = "XML/$IP.xml";
$data = "<CiscoIPPhoneText><Title>$Number called from $Ext</Title><Prompt>Sent from $Ext</Prompt><Text>$Textdata</Text></CiscoIPPhoneText>";
//echo $data;
file_put_contents($filename, $data);
push2phone($IP, $uri, $uid, $pwd);
}
}
}
}
else
{
echo "$File not found \n";
}
unlink ($File); //Remove file

function push2phone($IP, $uri, $uid, $pwd)
{
$auth = base64_encode($uid.":".$pwd);
$Chime = "Play:chime.raw";
$xml = "<CiscoIPPhoneExecute><ExecuteItem Priority=\"0\"URL=\"".$Chime."\"/><ExecuteItem Priority=\"0\"URL=\"".$uri."\"/></CiscoIPPhoneExecute>";
//echo $xml;
$xml = "XML=".urlencode($xml);
$post = "POST /CGI/Execute HTTP/1.0\r\n";
$post .= "Host: $IP\r\n";
$post .= "Authorization: Basic $auth\r\n";
$post .= "Connection: close\r\n";
$post .= "Content-Type: application/x-www-form-urlencoded\r\n";
$post .= "Content-Length: ".strlen($xml)."\r\n\r\n";
$fp = fsockopen ( $IP, 80, $errno, $errstr, 30);
$response = "";
if(!$fp){ echo "$errstr ($errno)<br>\n"; }
else
{
fputs($fp, $post.$xml);
flush();
}
//return $response;
}
function SiteLocation($Site)
{
if($Site === "DEMO-SITE"){
return array("IT South","Street Address");
}
}

?>

Monday, December 10, 2018

Cisco CME - Emergency Call History Notification - Part 1

Here is one way to monitor those 911/emergency calls on a Cisco CME system.
In a later post, I will explain how we use that demoLock.txt file to send broadcasts to other phones using the Push2Phone.php file provided by Cisco's IP Services development kit.

Using Cisco's Event Manager applets we can monitor any dial peer and send out notifications to end users.

Basic Required Settings
event manager environment _email_from it.voip@emailhost.ca
event manager environment _email_to it.voip@emailhost.ca
event manager environment _email_server mail.emailhost.ca
voice emergency response settings
 elin 5555551234

Sample dial-peers (We use an 'Emergency lockdown' number for paging)
dial-peer voice 1407 pots
 description Emergency Paging
 emergency response zone
 preference 1
 destination-pattern 1407
 port 0/1/0
 prefix ,07#
dial-peer voice 600 pots
 trunkgroup pstn-outgoing
 description 911
 emergency response zone
 preference 1
 destination-pattern 911
 forward-digits all
Create a syslog event monitor that is trigger when one of the dial peers is called.
event manager applet Emergency_Call_Out
event syslog occurs 1 pattern "E911-5-EMERGENCY_CALL_HISTORY" period 1
Find the hostname and set the destination email (if you want to use something other than what was declared in the Basic Required Settings)
 action 001      cli command "enable"
 action 001.1    foreach line "$_cli_result" "\n"
 action 001.2     regexp "#" "$line"
 action 001.3     if $_regexp_result eq "1"
 action 001.4      set result_host "$line"
 action 001.5      regexp "[A-Za-z]+\-" "$line" result_Site
 action 001.6     end
 action 001.7    end
 action 001.8    set _email_to "voipgroupnotify@emailhost.ca"

Do some regexp work to extract the "Calling number, Mac-address & IP address" of the call being placed - used for logging purposes.
 action 002.01   set result_Ext "Empty"
 action 002.02   regexp "calling number\[([0-9]+)\]" "$_syslog_msg" result_Ext
 action 002.03   regexp "([0-9]+)" "$result_Ext" result_Ext
 action 002.10   set result_Mac "Empty"
 action 002.11   cli command "show ephone telephone-number $result_Ext | include mac-address"
 action 002.12   foreach line "$_cli_result" "\n"
 action 002.13    regexp "(.*)\.(.*)\.(.*)" "$line"
 action 002.14    if $_regexp_result eq "1"
 action 002.15     regexp "....\.....\....." "$line" result_Mac
 action 002.16    end
 action 002.17   end

 action 002.20   set result_IP "Empty"
 action 002.21   cli command "show ephone $result_Mac | include IP"
 action 002.22   foreach line "$_cli_result" "\n"
 action 002.23    regexp "10\.174\....\...." "$line"
 action 002.24    if $_regexp_result eq "1"
 action 002.25     regexp "10\.174\.[0-9]+\.[0-9]+" "$line" result_IP
 action 002.26    end
 action 002.27   end
 action 002.30   if $result_Mac eq "Empty"
 action 002.31    cli command "show voice register pool telephone-number $result_Ext | include 10.174"
 action 002.32    foreach line "$_cli_result" "\n"
 action 002.33     regexp "(.*)\.(.*)\.(.*)" "$line"
 action 002.34     if $_regexp_result eq "1"
 action 002.35      regexp "....\.....\....." "$line" result_Mac
 action 002.36     end
 action 002.37     regexp "10\.174\....\...." "$line"
 action 002.38     if $_regexp_result eq "1"
 action 002.39      regexp "10\.174\.[0-9]+\.[0-9]+" "$line" result_IP
 action 002.40     end
 action 002.41    end
 action 002.42   end
Getting the "Called Number" (Regular numbers and E164 format)
 action 002.50   set result_Called "Empty"
 action 002.51   regexp "called number\[([0-9]+)\]" "$_syslog_msg" result_Called
 action 002.52   regexp "([0-9]+)" "$result_Called" result_Called
 action 002.53  if $result_Called eq "Empty"
 action 002.53.01 regexp "called number\[\+([0-9]+)\]" "$_syslog_msg" result_Called
 action 002.53.02 regexp "([0-9]+)" "$result_Called" result_Called
 action 002.53.03 end
 Copy the results to the flash
 action 003.01.01 set result_Final "$result_Site $result_Ext $result_Mac $result_IP $result_Called"
 action 003.02.01 file open fh flash:911.txt w
 action 003.02.02 file write fh $result_Final
 action 003.02.03 file close fh
Copy to an offsite TFTP server. (The "no file prompt quiet" - prevents prompt for file names)
 action 003.03 cli command "configure terminal"
 action 003.04 cli command "file prompt quiet"
 action 003.05 cli command "end"
 action 003.06.01 if $result_Called eq "911"
 action 003.06.02  cli command "copy flash:911.txt tftp://eventlogger/demo911.txt"
 action 003.06.03 else
 action 003.06.04  cli command "copy flash:911.txt tftp://eventlogger/demoLock.txt"
 action 003.06.05 end
 action 003.07 cli command "configure terminal"
 action 003.08 cli command "no file prompt quiet"
 action 003.09 cli command "end"
 Send an email with the information
 action 003.10  mail server "$_email_server" to "$_email_to" from "$_email_from" subject "$result_host $_event_pub_time: Emergency call out $result_Called" body "Extension $result_Ext called $result_Called. Notification was sent to phones."

Tuesday, December 8, 2015

Cisco CME and TOA 8000 Paging Setup

This year it seems that we have had a lot of equipment failures do to power outages.

This has been hard on the older paging equipment in our schools resulting in the need for new equipment.

We approached our audio experts for a solution that was network accessible and would still work with a Cisco CME based phone system if one was installed at that location at a later time.

Their solution was a TOA 8000 system which can be controlled and monitored over the network.

Unlike the previous TOA 9000 and Bogen PCM units that connected using an FXS port, the TOA 8000 requires different hardware.

The FXO port (same hardware that we use to connect to our telco provider phone lines) on the Cisco CME 2921 connects into the NL-8000AL interface unit.  The Cisco paging dial peers only required a port change and no changes were made to the Singlewire LPI software configuration we had set up for the Bogen equipment. (see previous post)

We found the TOA 8000 required a setting of a 1 second delay before paging.  If the delay was set to zero, the generated DTMF tones could be heard over the speakers on random occasions.

Monday, November 16, 2015

Singlewire's InformaCast LPI solution for Bells using a Cisco CME

We had been using SingleWire's InformaCast and LPI solution to run our bells schedule.
It integrated well with our Bogen equipment and allowed bells to ring both on the SCCP phones and Bogen paging system using a FXS port.

A few years ago we were installing a new CME into one of our remote sites, and found that the new version of Cisco OS was no longer compatible with InformaCast.  Or at least that is what SingleWire was telling us.

We couldn't downgrade the Cisco CME OS because the SRE module running the CUE would not work with older versions of Cisco CME OS.

After a little bit of trial and error, installing the InformaCast software using the HRE install option worked. Bells would now ring even though it reported an error about not being able to talk to the Communications Manager cluster... (see below)


Both the CUCM or CME install options for InformaCast wanted to 'talk' to the CME every time a bell was to ring and since it couldn't 'talk' to the new OS... the bell would not ring.

It's been working great until this year... now we are not sure if the Bogen equipment is starting to fail due to age or if the numerous power outages this summer have caused damage to the Bogen.  Either way the DTMF tones from the LPI software are not triggering the Bogen zones.  However paging from the Cisco CME using the same DTMF tones worked everytime.

After several tests, solutions were found for 3 out of 5 sites.  Adjusting the DTMF length and volume in the LPI device settings resolved the issue.  1 site will be getting new equipment as the Bogen is over 10 years old.  The other site will be testing this solution.

The previous config had the LPI software sending the DTMF tones based on the speaker on the single Device (ex 1410).  (Sip Address is the Voice Vlan IP of the CME)


The CME already has paging dial peers for the zones, so the LPI software will use those numbers (ex. 1411) when calling the CME via SIP calls.  The CME will pass along the DTMF codes and then the bell (aka message) will play.  (Sip Address is the Voice Vlan IP of the CME)

dial-peer voice 1411 pots
 destination-pattern 1411
 port 0/1/0 'FXS port connected to Bogen
 prefix ,07#

The problem was that the LPI device software needs at least 1 DTMF code or it will not create the InformaCast speaker.

The solution was rather simple after testing different volumes and time outs.
Change the "DTMF Via" option from "RFC2833" to "SIP INFO".
Now you do not hear the extra DTMF tones before the bell.



The other feature we lost in changing to HRE mode was the ability to play the messages on the phones.

Solution:
Create a paging group for phones (In our case all phones)

ephone-dn  200
 number 1498
 name Paging All
 paging ip 239.1.1.2 port 20482 'Works with SIP and SCCP phones
 paging group 201,202,203,204,205,206,207,208,251,303

Create a LPI Paging device that calls the 1498 via SIP.


Now create the speakers in InformaCast and add the Phones speaker to any of the InformaCast Paging Recipient Groups.  You may have to increase the "Wait Time" on the messages to allow the CME to send the DTMF tones.  The "Example Humoctopus Alert" message is perfect for testing.
 



Thursday, July 23, 2015

Cisco CME and Lync Simultaneous Ringing using Cisco SNR Feature

Cisco has a Single number reach feature that allows calls to ring more than one number. Think of it as a parallel hunt group but with the option to turn it off and on from the user's phone.

With this setup, the end user's Lync client and Cisco phone will ring a the same time.

Lync (Skype for Business) setup

Create PSTN Gateways
 - use the IP address of the CME

Create the Trunks
- Listening on port 5060 and Mediation port 5068.

Enable Enterprise Voice for user's account.

Assign a fake number to the Line URI in the user's account setup
(Example of user with extension 4025 would be Tel:+13065554025)

* You can also create a CME Dial Plan and a CME Voice Policy to allow Lync users to call out on the CME's phone lines from their Lync client.

Cisco CME setup

- If you are using Voice and Data Vlans on your CME, bind it to the CME same Vlan used by the Lync server.

interface GigabitEthernet0/0.1
 description Voice 
 encapsulation dot1Q 1
 ip address 192.168.1.1 255.255.255.0
!
interface GigabitEthernet0/0.134
 description Data
 encapsulation dot1Q 2
 ip address 192.168.2.1 255.255.255.0

voice service voip
 sip
  bind control source-interface GigabitEthernet0/0.1
  bind media source-interface GigabitEthernet0/0.1


Create voice translation-rules (these will add the +1306 in front of the number)

voice translation-rule 8000
 rule 1 /^81306/ /+\11306/
 rule 2 /^810101306/ /+\11306/
 rule 3 /^8306/ /+\11306/
 rule 4 /^8/ /+\11306/

voice translation-profile Lync
 translate called 8000

Create dial-peer for Lync server, 8 followed by the 7 digit phone number. 

dial-peer voice 8000 voip 
description ** SIP 7 digit to Lync13-01 ** 
translation-profile outgoing Lync 
destination-pattern 8....... 
notify redirect ip2pots 
session protocol sipv2 
session target ipv4:192.168.2.10:5068 

voice-class sip bind control source-interface GigabitEthernet0/0.2
voice-class sip bind media source-interface GigabitEthernet0/0.2
session transport tcp 
dtmf-relay rtp-nte 
codec g711ulaw 
fax rate disable 
fax protocol pass-through g711ulaw 
no vad

SNR on SIP Phones  (Add these commands to the basic DN and Pool settings)

voice register dn 1 
number 4025 
mobility snr 85554025 
delay 0 timeout 12 cfwd-noan 1200 
snr ring-stop 
snr answer-too-soon 1
voice register pool 1
number 1 dn 1
session-transport tcp
dtmf-relay rtp-nte sip-notify

SNR on SCCP phones (Add these commands to the basis Ephone-dn and ephone settings)


ephone-dn 300 octo-line 
mobility 
snr calling-number local 
snr 85554025 delay 0 timeout 12 cfwd-noan 1200 
snr ring-stop 
snr answer-too-soon 1
ephone 1
button 1:300
See also - Cisco's Single Number Reach article


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

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.