#

Monday, August 27, 2018

The router model I am using is a Cisco 2911 and the IP phone is Cisco 7945. There will be something to consider regarding licenses if the router is brand new.

Router#show version | b Package










You will notice that uc (for unified communications) is not enabled. For 2911 platform you will have to enable it by issuing the following command.

Router(config)#license boot module c2900 technology-package uck9

After the reboot, the license will be enabled and voice commands will be present.










Now you have voice capabilities with an evaluation license, you can move it to permanent by following command.

Router#license right-to-use move <license name>

Anyway, because it is enough to use evaluation for this, this will be fine..

I configured the IP address of the router to be 192.168.137.100 & the DHCP server is configured with option 150 which points to the TFTP to be 192.168.137.100 (same CME).
Also remember to issue ntp master command on router which will be used by the phone to get time.

(1) Download Firmware for IP Phone

I downloaded "Firmware Files Only" from here. If you are doing this, you have to find the firmware for your IP phone.

It was a zip file for me. So I extracted it in my PC. Following were the files in it.












Last one can be neglected as it is for 7965 model which I don't have.

(2) Upload Firmware to CME

I did it using a TFTP server on my PC. If the file was a .tar file, you will have to use the following command, 192.168.137.10 is my PC.

Router#archive tar /xtract tftp://192.168.137.10/cme-full-7.1.0.1.tar flash:

(3) Telephony-Service Configuration

Router(config)#telephony-service
Router(config-telephony)#max-dn 30
Router(config-telephony)#max-ephones 20
Router(config-telephony)#ip source-address 192.168.137.100
Router(config-telephony)#cnf-file location flash:
Router(config-telephony)#load 7945 SCCP45.9-4-2SR3-1S.loads
Router(config-telephony)#create cnf

Maximum number of directory numbers to be configured is 30, and maximum number of phones to be configured is 20. These values should comply with the licenses. IP source address is the IP address of CME. Load command specifies the firmware to load for the specific model.

(4) Ephone-DN configuration

Router(config)ephone-dn 1
Router(config-ephone-dn)#number 1001

Router(config)#ephone 1
Router(config-ephone)#mac-address 2c31.246f.9413
Router(config-ephone)#button 1:1

Button x:y means the 'x' is the real button on the phone while 'y' is the ephone-dn number.

(5) TFTP configuration

Router(config)#tftp-server flash:/term45.default.loads alias term45.default.loads

Now everything is ok. After connecting CME and the IP phone to same switch, phone will come up..

Tuesday, August 21, 2018

Go to Cisco Unified Servicability > Trace > Configuration
Select the server and select CM services as the Service Group & select Cisco CallManager (Active) as the Service.
Tick Apply on All Nodes if you have a CUCM cluster and hit Save.

Following will be the default settings.



























Go to Cisco Unified CM Administration > Application > Plugins, Hit Find to search available plugins and download Cisco Unified Real-Time Monitoring Tool and install it.

Login to CUCM giving username and password.









Go to Voice/Video tab and click Real Time Data.


















You can double click on a row and view the call flow. Following is a successful call.


Monday, August 20, 2018

The core of any telephony service is to access the numbers they want to dial.
In the CUCM there are 3 main components to build a dial plan.

1. Route Pattern
If someone dials a number which matches a configured route pattern, that call is eligible for routing.
Ex:- XXX, 9.XXX, [1-2]XX, 234!#

If you want to know about Route Patterns click here.

2. Dial Plan Hierarchy
This is what tells the CUCM to route the call to the specified destination.
Ex:- route 911 calls to external gateway..

If you want to know about Dial Plan Hierarchy click here.

3. Class of Control
This controls the calling abilities of phones.
Ex:- A lobby phone should not be able to take IDD calls..

In this post, let's discuss about Class of Control.
To control access between phone numbers we use 2 things with a simple logic.

1. Partitions
2. Calling Search Space (CSS)

Partitions
Who can call me?
Name assigned to a set of numbers and patterns

CSS
To whom can I call?
List of Partitions

Let's assume following phone numbers of a company are assigned to Partitions & CSSs like below.

Let's assume 
PT_1 is assigned to CSS_2
PT_2 is assigned to CSS_1

Default is equivalent to no Partition.




You can only call a number, if that number's Partition is in your CSS & You can always call a number if that number is not in a Partition.. 

Can 1001 call to 1002 and vice versa?
Cannot.. Because  both 1001 and 1002 is in CSS_1 which has access only to PT_2

Can 1001 call to 2001 or 2002?
Can.. Because 1001 is in CSS_1 which has access to PT_2

Can 1001, 1002, 2001 or 2002 call to 3001 or 3002?
Can.. Because 3001 is not in a Partition..

Can 3001 or 3002 call to 1001, 1002, 2001 or 2002?
Cannot.. Because 3001 and 3002 has no CSS..

Can 3001 call to 3002 and vice versa?
Can.. Because both 3001 & 3002 has no CSS and not in any Partition..

The core of any telephony service is to access the numbers they want to dial.
In the CUCM there are 3 main components to build a dial plan.

1. Route Pattern
If someone dials a number which matches a configured route pattern, that call is eligible for routing.
Ex:- XXX, 9.XXX, [1-2]XX, 234!#

If you want to know more about Route Patterns click here.

2. Dial Plan Hierarchy
This is what tells the CUCM to route the call to the specified destination.
Ex:- route 911 calls to external gateway..

3. Class of Control
This controls the calling abilities of phones.
Ex:- A lobby phone should not be able to take IDD calls..

If you want to know more about Class of Control click here.

In this post, let's discuss about Dial Plan Hierarchy.
Following diagram shows 2 independent companies which has 2 CUCMs and connected via a SIP trunk. And both of them have E1 connections to PSTN too.





















Let's assume 011224 & 011225 are prefixes given to identify the area code and the specific company.
To dial 4642 from people outside the companies (from home - PSTN) they should dial the full number 0112254642.
But if 4641 of company B dials 4642, they can make an internal call.
Also to dial 4642 of company B from company A, 74642 is enough as they have a SIP trunk and the CUCM of company A is configured with a route pattern 7.XXXX to be routed out to the inter-company SIP trunk. But in this case, if a phone at company A dials only 4642, it should ring the 4642 of company A..

Let's see how the dial plan hierarchy works..

Route Patterns are pointed to Route Lists which are pointed to Route Groups which are pointed to Devices/Gateways/Trunks

When you are configuring it, you actually do it from right to left. You configure Devices (Gateways/Trunks), Route Groups, Route Lists & finally Route Patterns.

Above hierarchy is for the CUCM of company A. It should be configured to route calls to company B from company A which matches the route patterns in CB_RL route list which is associated with CB_RG route group which points to SIP_to_CB SIP trunk.
If the SIP trunk fails, the calls will be routed out via PSTN_RG route group which points to PRI-1 & PRI-2. But before sending out to PSTN, we should do digit manipulation in order to match the numbers of the outside world. This digit manipulation (changing numbers) is something we can do in dial plan hierarchy.

We have to change 2 numbers in the above scenario.

1. Calling Party number
2. Called Party number

Let's assume 4641 of company A (Calling Party) wants to dial 4642 of company B (Called Party). So he dials 74642 which is the route pattern associated with CB_RL. But when the device (SIP_to_CB) of CB_RG fails, the CB_RL route list should consider PSTN_RG which is the second route group associated with it. When we add the PSTN_RG to the CB_RL is the place we do digit manipulation.
























Company A should add prefix digits 011224 for the calling party and 011225 for the called party so that the number can be identified by PSTN. In the gateway configuration of company B, they can configure to accept only last 4 digits which will strip away the prefix digits company A added so that their Call Manager can route the call internally.






The above digit manipulation can be also done using a mask too like the following.

























To change the Calling Party number, Company A need only to select on from drop down menu of Use Calling Party's Phone Number Mask which will use the default external mask we give while configuring extensions. If that mask is not enough to route the calls back from a long distance, we can add prefix digits too.

Note:- 

Although the user dials 7.4642, I have not configured a discard predot at Route Lists because it is already stripped away at the route pattern. 

Sunday, August 19, 2018

The core of any telephony service is to access the numbers they want to dial.
In the CUCM there are 3 main components to build a dial plan.

1. Route Pattern
If someone dials a number which matches a configured route pattern, that call is eligible for routing.
Ex:- XXX, 9.XXX, [1-2]XX, 234!#

2. Dial Plan Hierarchy
This is what tells the CUCM to route the call to the specified destination.
Ex:- route 911 calls to external gateway..

If you want to know about Dial Plan Hierarchy click here.

3. Class of Control
This controls the calling abilities of phones.
Ex:- A lobby phone should not be able to take IDD calls..

If you want to know more about Class of Control click here.

In this post, let's discuss about Route Patterns and their usage in common.









Lets get a simple example of XXX, X can be any digit. it is called a wildcard.

When someone dials a number, let's say 911, 9 matches the 1st X, 1 matches the 2nd X and final 1 matches the final X. if XXX is configured as route pattern and if someone dials 911, that call is eligible for routing. X means any digit, that means any 3 numbers can be routed using XXX route pattern..

When a shorter pattern matches the beginning of a longer pattern, calls to the shorter pattern will be delayed by the inter digit timeout (t.302 timer).

Ex:- Let's say we have 2 route patters configured..

XXX
XXXXX

If some one dials 911 now, it will be delayed to process because CUCM thinks the user may be dialing the 2nd pattern.. This delay is the t.302 timer which is default to 15 seconds and can be changed manually at Unified CM Administration > System > Service Parameters, select the server and the service as Cisco CallManager (Active).

Under Clusterwide parameters, you will find it.

You can configure a route pattern to exactly match 911 and set Urgent Priority Tick under route pattern configuration to route the call right way ignoring t.302 timer.














Companies use access codes to differentiate between internal and external extensions.

Ex:- 9.XXXXXXX

When you start dialing with 9, CUCM thinks it is an external call now.
So there cannot be internal numbers starting from 9 in the company..

Ofcourse this 9 must be stripped away when you route the call out from your network to public telephone network which we call 'digit manipulation'. To do that chose 'Discard Predot on called party transformations'

As soon as you hit 9 a second dial tone comes from the CUCM. We need to configure it from CUCM, tick Provide Outside Dial Tone. You can see it is ticked on above screen shot.

Now let's think another possibility..

If someone dials 911, it should be routed externally but people may not remember to dial an additional 9 before 911. So following 2 route patterns must be configured..

911
9.911

Now what about other service numbers like 211, 311, 411? Following route pattern must have to be configured to match them..

9.[2-9]11

This says the 2nd digit can be any number between 2-9

If [257-9] is there that means the digit can be 2 or 5 or 7 or 8 or 9..

Now what will be matched if someone dials 9911 from following route patterns?

911
9.911
9.[2-9]11

It will match the 2nd one because it is the best match as the 3rd one has 8 more combinations..

When a number matches more than one pattern, the pattern with the smallest number of possible matches is selected.

Ex:- 1234 is dialed and following route patterns are configured.

[1-5]XXX
[1-2]XXX

2nd pattern is selected as it has only 2000 possibe matches compared to the 1st one which has 5000 possible matches.

Here are some other wildcards..

9.011!

'!' means there can be any number of digits so if someone dials 9011234567 CUCM will wait for t.302 timer and route the call. To stop t.302 waiting time another wild card can be introduced.

9.011!#

'#' means the user has end dialing. So if 9011234567# is dialed, the call will be routed right away..