When your LEC (Local Exchange Carrier) gives one or more analog lines to your office, it is more or less clear how to manage them. But when the full E1 channel or its part is concerned the administrators lose heart. Though everything is not as difficult as it may seem at first sight. Let us describe the whole procedure of creating telephony service in the small branch office with Cisco Systems devices. It is important to mention that the matter concerns not the voice communications between the branch offices via data links but the SOHO phone service connection to the PSTN. The creating process can be divided into two parts: local phone network building and connecting it with the global. In order to build such a network we should have a router with the voice and E1 cards, a switch and several IP-Phones. We have Cisco 2851 router, its main parameters are listed below (here and later several uninteresting strings were omitted). The important things are shown in bold and the commands are in italics.

ATS_2851#sho ver
Cisco IOS Software, 2800 Software (C2800NM-SPSERVICESK9-M), Version 12.4(15)T4, RELEASE SOFTWARE (fc2)
Compiled Thu 13-Mar-08 03:04 by prod_rel_team
ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)
Cisco 2851 (revision 53.51) with 249856K/12288K bytes of memory.
Processor board ID FCZ120670M0
4 FastEthernet interfaces
2 Gigabit Ethernet interfaces
16 Serial interfaces
2 Channelized E1/PRI ports
8 Voice FXS interfaces
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write)
ATS _2851#sho controllers e1
E1 0/2/0 is up.
Applique type is Channelized E1 - balanced
No alarms detected.
alarm-trigger is not set
Version info Firmware: 20071011, FPGA: 13, spm_count = 0
Framing is CRC4, Line Code is HDB3, Clock Source is Free Running.
CRC Threshold is 320. Reported from firmware is 320.
Data in current interval (153 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
7 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
7 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
Total Data (last 24 hours)
0 Line Code Violations, 7 Path Code Violations,
3265 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
3265 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 33 Unavail Secs

We also used a switch Cisco Catalyst 3560 with the platform listed below.

PhonesSwitch_3560#sho ver
Cisco IOS Software, C3560 Software (C3560-IPBASE-M), Version 12.2(35)SE5, RELEASE SOFTWARE (fc1)
cisco WS-C3560-24PS (PowerPC405) processor (revision R0) with 122880K/8184K bytes of memory.
Processor board ID FDO1225X12E
1 Virtual Ethernet interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
512K bytes of flash-simulated non-volatile configuration memory.
Model number : WS-C3560-24PS-S
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C3560-24PS 12.2(35)SE5 C3560-IPBASE-M

We setup Cisco IP-Phones 7906, 7940 and 7960 for end-users.

Local IP subnet is And for the IP-Phones we use IP-addresses from to Now we need to configure DHCP pool for these devices. It’s important to emphasize that additional options (66, 128 and 150) are necessary for connecting these IP-Phones to the media gateway.

ip dhcp pool DHCP_Phones
option 150 ip
option 66 ip
option 128 ip

The following configuration lines make the router to allocate all IP-addresses from the C-class network. To limit the available block of addressees we should exclude ranges and 192.168.151-192.168.254 from the pool, as it is shown below.

ip dhcp excluded-address
ip dhcp excluded-address 192.168.151-192.168.254

Let’s connect the first phone to the port FastEthernet0/1 of the switch. To check that the link is up we can via the appropriate external LED indicator at the front switch panel or via the command sho int fa0/1.

PhonesSwitch_3560#sho int fa0/1
FastEthernet0/1 is up, line protocol is up (connected)

The next step is its MAC-address identification.

PhonesSwitch_3560#sho cdp ne | incl 0/1
SEP001EF7C47496 Fas 0/1 154 H P IP Phone Port 1
PhonesSwitch_3560#sho mac-address-table | incl 0/1
1 001e.f7c4.7496 DYNAMIC Fa0/1

Why is it needed? For instance, the address can be used for MAC-IP binding in some special cases of DHCP usage. But the primary function of IP-Phone MAC-address is the device identification during the phone line configuration. When the phone is unable to use CDP, its channel-level address can be taken from the switch bridge-table with show mac-address-table command.

PhonesSwitch_3560#show mac-address-table
Vlan Mac Address Type Ports
All 0180.c200.0010 STATIC CPU
All ffff.ffff.ffff STATIC CPU
1 001e.4af1.4258 DYNAMIC Fa0/3
1 001e.f7c4.7496 DYNAMIC Fa0/1
1 001e.7ac3.d99e DYNAMIC Fa0/4

Now it is time for the most important part in the whole process – we are going to configure the telephony-service as shown below. The maximum number of the supported IP Phone devices depends on the hardware and is configured by max-ephones command. The function max-dn allows to determine the maximum phone numbers which can be assigned to the IP Phones. Using the ip source-address command we can specify IP address and port of our media gateway which is on the current Cisco router hardware. Timeouts ringing determines the timeout of the call. The command system message shows a message on the users’ phone screens. Time-zone, time-format, date-format and user-locale are used to configure locale and time settings on the IP Phones. The command max-conferences determines the maximum number of the simultaneous conference calls. The music On Hold is configured by moh command. Now we need only to set an ability to redirect the calls with forward, transfer-system and transfer-pattern commands.

max-ephones 10
max-dn 30
ip source-address port 2000
timeouts ringing 60
system message Test_IP_Phone
user-locale RU
time-zone 28
time-format 24
date-format dd-mm-yy
max-conferences 16 gain -6
call-forward pattern .T
moh music-on-hold.au
transfer-system full-consult
transfer-pattern .T

Let’s create a 7960 phone with two buttons to illustrate several features. The following actions are aimed to create two virtual phones (lines) for the future binding with the real device.

ephone-dn 1
number 1111
label Maxim Klimanov
description Maxim Klimanov
name Maxim Klimanov
preference 1
call-forward busy 1112
call-forward noan 1112 timeout 10
no huntstop
ephone-dn 2
number 1111
label Maxim Klimanov
description Maxim Klimanov
name Maxim Klimanov
preference 1

Now let’s make physical device settings.

ephone 1
mac-address 001e.f7c4.7496
speed-dial 1 1112
speed-dial 2 1113
type 7960
button 1:1 2:2

Button command allows us to bind the hardware phone buttons to virtual lines, which were created earlier.

The local telephony configuration is completed. Let’s pass on to the E1 channel. It is important that the router configuration must include information about the controller card type. As in our case the E1 stream comes to the 0/2/0 controller, we specify this very port in the card type.

card type e1 0 2

Now we enter the parameters responsible for the functionality of E1 and ISDN controllers and the voice card.

network-clock-participate wic 2
isdn switch-type primary-net5
carrier-id source
voice-card 0
dsp services dspfarm
controller E1 0/2/0
clock source free-running
pri-group timeslots 1-16

Special attention should be paid to the time-slots, which the router is going to receive over the E1 channel. The commands above configure the router to operate with the half bandwidth of the channel. An error in the time-slots list may result in the situation when the outgoing calls are unavailable with the wide variety of error messages in the log files, though all incoming (LEC->Cisco) calls pass successfully. It can be explained by the fact that the time-slots begin to be used from the end of the range.

After the time-slots configuration, the system will create the appropriate amount of the sub-interfaces.

ATS_2851#sho ip int bri
Interface IP-Address OK? Method Status Protocol
Serial0/2/0:0 unassigned YES unset down down
Serial0/2/0:1 unassigned YES unset down down
Serial0/2/0:2 unassigned YES unset down down
Serial0/2/0:3 unassigned YES unset down down
Serial0/2/0:4 unassigned YES unset down down
Serial0/2/0:5 unassigned YES unset down down
Serial0/2/0:6 unassigned YES unset down down
Serial0/2/0:7 unassigned YES unset down down
Serial0/2/0:8 unassigned YES unset down down
Serial0/2/0:9 unassigned YES unset down down
Serial0/2/0:10 unassigned YES unset down down
Serial0/2/0:11 unassigned YES unset down down
Serial0/2/0:12 unassigned YES unset down down
Serial0/2/0:13 unassigned YES unset down down
Serial0/2/0:14 unassigned YES unset down down
Serial0/2/0:15 unassigned YES NVRAM up up

The more detailed information about system events can be received by the debug command. But here we must be very careful because the output stream can exceed the available bandwidth and cause the device speed degradation.

ATS_2851#term mon
ATS_2851#deb isdn ?
all ISDN debug messages
api ISDN Application Program Interface(s)
cc ISDN Call Control
error ISDN error messages
events ISDN events
mgmnt ISDN management
q921 ISDN Q921 frames
q931 ISDN Q931 packets
standard Standard ISDN debugging messages
tgrm ISDN TGRM events
ATS_2851#deb isdn q921
debug isdn q921 is ON.
ATS_2851#deb isdn q931
debug isdn q931 is ON.

Use command no deb all to stop generating all debug messages.

ATS_2851#no deb all
All possible debugging has been turned off

Additional information about ISDN troubleshooting can be found here.

The external voice channel is considered to be in the up state, and we can enter the command for redirecting the call to the LEC. To redirect digital voice call into the E1 channel, the following commands should be used. The string dial-peer creates a peer according to which the redirection would be applied. The command destination-pattern allows us to specify the digit (pattern) for the external call. To enter the phone number that will be displayed on the called user phone the clid network-number command should be used. Port command indicates the voice port for the external call.

dial-peer voice 50 pots
destination-pattern 9T
clid network-number 1234567
port 0/2/0:15

For the full functionality of the telephony service your network device should not only make the outgoing calls but receive incoming ones and pass them to the certain IP Phone. To specify the dial-peer section to function, the command incoming called-number is used to determine the called number. In this section we apply the profile according to which the incoming call will be redirected to another local phone with the command translation-profile.

dial-peer voice 100 pots
description E1_incoming
translation-profile incoming TRL1234567
incoming called-number 1234567

Some translation rules should be configured inside the profile.

voice translation-profile TRL1234567
translate called 1

The profile rules themselves should be determined as well.

voice translation-rule 1
rule 1 /1234567/ /1111/

Now the incoming call will be matched to a certain dial peer, according to which it will be directed to the translation profile for the conversion, where the appropriate rule will be used.

An undocumented command csim start phone_number can be used to initiate simulated calls to whichever real-world E.164 number is desired. It is most useful when you are testing dial plans.

Let’s sum up: the telephony service creation task for the branch office can be divided into three parts, which are listed below.

  • Telephone service creation inside the office.
  • The outgoing calls organization.
  • Receiving the incoming calls.

For the extra function supplementing to the new telephone service the deep knowledge of the call functions is needed. Such information can be obtained from the great number of sources. For example, the readers can address to the article, but this one came to the end.

The author would like to publicly acknowledge the help of Andreeva Maria, who corrected the english version of the article.

Add comment

Security code

Found a typo? Please select it and press Ctrl + Enter.