Вы находитесь на странице: 1из 25


English Book


Mahmoud Ibrahim Mohamed ezzat El shaare



Jeremy Cioara

Ccna voice used equipment layer.
1- phones ,softphone , softphone+usb phone ,other app
2- voice mail , IVR (inter active response) , TFTP server , DHCP server,call
3- Cisco Unified Communications Manager
4- Cisco Unified Communications Manager express, cisco router’s,cisco

*we can use cisco switch’s to power the cisco ip phone and that’s by use the
other unused wire from the wire cable (the wire cable have 8 wired used 4 to
the data and the other 4 to power the phone’s) POE power over ethernet

*we use the voice vlan to separating the voice from the data and that by use

*we must put the Qos at the main target for the voice user’s

3 way to power your phone

1-we can use the POE switch (inline power,IEEE 802.3af)
2-we can use power patch panel
3-we can use wall power

*switch # show power inline → this command will show the powerd port and
the unpowerd port on the switch and will show the used watt and the
remaining power

*cisco phone use CDP (cisco discovery protocol ) to communicate with cisco
switch to told the switch that I’am cisco phone I’am use 6.3 watt and no more
put If we use non cisco phone the switch will give the maximum power to that
phone put we can manage it from the switch also we can go inside the port
and power on the port or no

switch(config)# int f0/0

switch(config-if)# power inline auto
switch(config-if)# power inline never
switch(config-if)# power inline delay shutdown 20 → that’s will not cut the
power from the port for 20 sec and that’s because some phone restart them
self for while of time and that will make the switch think that the phone go
down put it’s in resting time.

Voice vlan
We know that in our network we use vlan’s to separating the vlan’s from
each other and each vlan have it’s own broadcast domain each switch
connected to the next switch by trunk and that trunk can access all the vlan’s

And that because that port make the transfer between the all vlan’s
And the vlan tag it’s packet by dot1q tag (encapsulation dot1q) and that for
the data put for the voice the tag is 802.Q1 that the encapsulation for the
So the voice vlan when we connect to end point like the pc and the phone to
the switch on one port we in this second have make a (mini-trunk) that
contain the two vlan’s information the voice vlan for the phone and the pc
vlan for the data and the switch detect the phone by send the cdp
Every vlan have a number like vlan 10 and voice vlan 10

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10 → for the pc
Switch(config-if)#switchport voice vlan 10 → for the phone

And by that way the pc can’t access the voice vlan and the pc can’t access the
data vlan

We must put an access list (ACL) to make the data vlan’s cant access the
voice vlan

Switch#show cdp neighbors → that will show all neighbors or cisco equpment
that the switch discover.

Switch#show vlan brief → when we type this command will show all the
vlan’s that we have and the port’s that belongs to that vlan’s and we will
discover that we have port’s belong’s to two vlan’s the voice and the data

Preparing the infrastructure for voip

you can skip this part if you are not interesting

For the people how watch the cbt nuggets for voice we will make a little
exchange we will have in this scenario two(2) route and one(1)switch and
Two(2)phone and two(2)valn’s vlan (10-voice) and vlan (50-data)

The scenario is we will connect the two router to the switch router (1-dhcp)
Router (2-CME) and the pc’s will be in vlan (50) and the phone’s will be in
vlan (10) and don’t forget that the phone’s are connected to the switch port
and the pc’s are connected to the port switch that in the phone’s ok.
The dhcp will be in vlan (50) and the CME will be in trunk mode.

We will begin in create the vlan’s on the switch and the dhcp router in vlan
50 on port (1) and we will connect the CME router on port (2)

Switch(config)#int vlan 50
Switch(config-vlan)#name data

Switch(config)#int vlan 10
Switch(config-vlan)#name vioce

Switch(config)# int f 0/1
Switch(config-if)#switchport mode trunk – for the CME

Switch(config)#int f 0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 50 – for the dhcp

The ip addressing we will give to the pc’s ip address

And for the voice ip

For the dhcp router we will give ip for the int f0/0 in the router
And for the CME we will gave ip for int f0/0

Dhcp#conf t
Dhcp(config)#int f 0/0
Dhcp(config-if)#ip address
Dhcp(config-if)#no shutdown

*we will go to the switch and configuring the port form 3-4 to access vlan 50
for the data and vlan 10 for the voice

switch(config)#interface range fastethernet 0/3 – 4

switch(congig-if-range)#switchport access vlan 50
switch(config-if-range)switchport voice vlan 10

now we will go to the CME router or the main router to configure the
ok.’ We here type the encapsulation dot1q because this port in trunk mode
and the routing between the phone’s and the pc’s will happen here in the
cme router.

CME#conf t
CME(config)#int f 0/0
CME(config-if)#no shutdown

CME(config)#int f 0/0.10
CME(config-subif)# encapsulation dot1q 10 – fot the voice vlan
CME(config-subif)#ip address – voice ip

CME(config)#int f 0/0.50
CME(config-subif)# encapsulation dot1q 50 – for the data vlan
CME(config-subif)# ip address – data ip

Ok that’s good now we will go to the dhcp and configure the dhcp range
Now but in your mind that the pc’s are in the data vlan 50 and the voice are in
vlan 10 and the dhcp router are in vlan 50 then how the phone’s will have it’s
own ip’s the CME are in trunk mode so the phone’s will broadcast asking for
ip’s from the dhcp message we will put a command that will help the phone’s to
reach to the dhcp and take an ip address and a tftp ip address from the dhcp
And that command is

* ip helper-adress – we will put this ip helper-address in the CME int sub
interface .10 so

CME(config)#int f 0/0.10
CME(config-subif)#ip helper-address

So if any phone in the boot level will send message asking for where the dhcp
is,the router will connect to the dhcp asking for an ip from the same range
that the broadcast came from and the dhcp will give an ip for the CME and
the CME router will give it to the phone.

Now we will configure the DHCP router , and we will put in the configuration
for the section of the pool address for the phone we will put option 150 that
(tftp server) for the xml configuration that the phone need to startup
In the nugget he excluded the range from to
And for and we will excluded this ranges too

DHCP#conf t
DHCP(config)#ip dhcp excluded-address
DHCP(config)#ip dhcp excluded-address

Now we will create a scope to the two address

DHCP(config)#ip dhcp pool voice

DHCP(dhcp-config)#network /24
DHCP(dhcp-config)#default-router – for the router
DHCP(dhcp-config)#option 150 ip

DHCP# show run | section dhcp – will show the dhcp config

DHCP(config)#ip dhcp pool data

DHCP(dhcp-config)#network /24
DHCP(dhcp-config)#default-router – for the router
DHCP(dhcp-config)#option 150 ip

DHCP#show ip interface brief – good command will show every interface

that you have and the ip addres that assigen to that interface and is up or
down realy is a good command

DHCP#show ip dhcp binding – this command will show to you the taken ip
address’s and how have this ip address linked by the mac address

*the NTP (network time protocol) this service is to adjust the time from the
or you can set your clock at the right time and your good

so,you look at the internet for a ntp server and take the name or the ip
and put it in your CME router to adjust the right time

CME#conf t
CME(config)#ip name-server – for the dns server
CME(config)#ntp server X.X.X.X – where x is the ip
CME(config)#clock timezone cairo -2
CME(config)#ntp master – to make the router to give the right time to the
all network

Copy the needed file’s to the router

Here we will copy the needed file’s to the CME now the file’s is
-basic files : thos for the ios or the cme basic file’s that you need to have the
cme on your network and they are often come with the router ios.

1 - GUI files : for the web managing we can manage your cme from the web
with these files.

2 - xml template : this files for the phone configuration files

3 - moh files : music on hold

4 - script files : they can do more than one job they can act like the ivr

5 - miscellaneous files: for the background picture and ring’s

after you download this files you need it to copy to your flash
there is two command that we can use

copy from tftp two flash and this command will take a huge time

CME#copy tftp flash – and here you need to type the ip address of the remote
client and after that the sourse file name , here you will type for every file the
file name that he have and repet this for every file name (I’have tray it , it
will take amount of time )

Or we can use the new command that command will extract the tar file in
your flash

CME#archive tar / extract tftp:X.X.X.X /the file name.tar flash:

- where the X is the ip address.

CME#dir flash: - this command will show to you the directory that in your

Ephone & Ephone_dn

Here we will see how the phone go to the CME and take the xml
configuration file from the CME but firest we need to create a ephone and

CME#conf t
CME(config)# telephony-service – and this are the service that responsible to
make the router a CME

CME(config-telephony)# max-ephones 24 – that is the maxmuim number of

the phone that we need to connect and you can know how many phone can
your router handle by command

CME(config-telephony)# max-ephones ? – and you will know

CME(config-telephony)# max-ephones_dn 35 – here you can confusing how

the ephone_dn more than the phone’s itself the answer the phone they are the
h/w the phone itself BUT the ephone_dn is the directory number that the
phone dependent on to get the phone number and the username …..
So you can see a phone with many number.

CME(config-telephony)#ip source-address – and that’s the ip

address of the CME where the phone go to get the configuration file

*in the next steb we will tell the router where is the configuration
or .( firmware) file’s that the phone will asking for and the alise name for it
actuality the phone ask for these alise name. he don’t know here to get the
path so we but the alise

CME(config)#dir flash:/phone/ - with dir command we will see all the file’s
that under this directory and we will see all the phone type

CME(config-telephony)#tftp-server flash:/ephone/7940-7960/p003009.bin
Alise p003009.bin

CME(config-telephony)#tftp-server flash:/ephone/7940-7960/p003009.sb
Alise p003009.sb

CME(config-telephony)#tftp-server flash:/ephone/7940-7960/p003009.sp2
Alise p003009.sp2

*Now we need to make the router to load this file’s or the firmware file’s for
the phone.with out the extension

CME(config-telephony)# load 7940-7960 p003009

*now how to know the needed file to be loade actuality you need to go to
cisco web site and search for
*cisco unified cme supported firmware,platform’s,memory and voice
products and under the phone details we will see the needed file remark with

*now we will create a CNF file that will told the needed firmware for what
kind of phone type
CME(config-telephony)# create cnf-files

CME#show telephony-service tftp- binding – that command will show to
you the file’s that your tftp server have for the phone

The single line Or dual line

*the single line is can handle one call just one call no more
*the dual line have this features handle two call at one time waiting service ,
conference ,call transfer

CME#show ephone – that will show the phone that you have and the mac

*now the time to configure the ephone_dn

router(config)#ephone-dn 1 – where 1 is a (tag) where the tag can be any


router(config)#ephone-dn 1 ?– here if we hit enter we will create ephone_dn

with single line but we if type dual-line the we have all the features ,no back
if make it single you cant make it dual and so if you make it dual you can’t
make it single after you hit enter

CME(config)#ephone-dn 1 dual-line

*after that we will see the router create the ephone_dn 1:1 and 1:2
and that because we crate a dual line this phone how will take the ephone_dn
1 will have two number.(later)

CME(config-ephone-dn)# number 101

CME(config-ephone-dn)#number 102 secondary 23456789 – this

secondary may be your pstn number so if you have a incoming call
from outside the router will deliver the out call to these internal
number 102

*to configure the ephone you need to know the mac address from the
phone itself so you can relate the ephone_dn to the phone by the default
all the phone already in auto assign

CME(config)#ephone 1 – the h/w phone

CME(config-ephone)# mac-address 1234.1234.1234 – the mac address
CME (config-ephone)#type 7960 - the type of the phone
CME (config-ephone)# button 1:1 – the ephone_dn 1
CME (config-ephone)#restart – this will restart the phone and give it
the feature of the line

CME (config-ephone)# button 1:1 2:2 – that will gave the ephone more
that one number

CME (config-ephone)# button 1:2 – that will two give the router two

CME (config-ephone)# button ? – if we type the ? mark we will see

more feature of the button command .

*there’s a good command that will show the section of the ephone
and we can use this command with other meny command
CME#show run | section ephone

Last part on ephone & ephone-dn

*realy this part is very cool part here we will rock the phone’s ☺

if you have a support team in your company what the best idea when a user
call the support team any one can answer the phone or all the support team
will receive your call , let us say that you have 3 guys every one own ip phone
and they all shared one phone number when some one call number 800 the
all three phone will ring , and when another user call the second two guys
there phone's will ring and when a user call them at the same time that the
other to have them call the last one will receive the last call ,put when another
fourth user call he will hear busy ring ok .but it’s not a problem we can make
another phone number for them.
The all three phone will shared the number (800) ok let us start
At the first we need to create a three ephone_dn

Oh , the letter (o) is for overlay line with no waiting (that mean that one
button will handle three ephone-dn

CME(config)# ephone-dn 1
CME(config-ephone-dn)# number 800
CME(config-ephone-dn)# preference 0
CME(config-ephone-dn)# no huntstop – ok this command will switch the
incoming call to the next phone if this phone is busy

CME(config)# ephone-dn 2
CME(config-ephone-dn)# number 800
CME(config-ephone-dn)# preference 1
CME(config-ephone-dn)# no huntstop

CME(config)# ephone-dn 3
CME(config-ephone-dn)# number 800
CME(config-ephone-dn)# preference 2 – here no need to the command
(nohuntstop) because ther is no other shared phone than those

*now we will go and configure the ephone

CME(config)# ephone 1

CME (config-ephone)# button 1o1,2,3 – this command will handle the three
dn on button 1 on the phone
CME(config-ephone)# mac-address 1234.1234.1234
CME(config-ephone)#type CIPC – for the softphone

CME(config)# ephone 2
CME (config-ephone)# button 1o1,2,3
CME(config-ephone)# mac-address 1234.1234.1234
CME(config-ephone)#type CIPC

CME(config)# ephone 2
CME (config-ephone)# button 1o1,2,3
CME(config-ephone)# mac-address 1234.1234.1234
CME(config-ephone)#type CIPC

*that’s all you have a number 800 for your three support guys

• ok if you have a one user he need to have a two or more line in his phone
you will need to have ephone_dn for one phone
*ok here I’have mention that if you see that 1:2 that mean the button one will
be have a phone number 810

CME(config)# ephone-dn 4
CME(config-ephone-dn)# number 810

CME(config)# ephone-dn 5
CME(config-ephone-dn)# number 811

CME(config)# ephone 3
CME (config-ephone)# button 1:4 2:5
CME(config-ephone)# mac-address 1234.1234.1234
CME(config-ephone)#type CIPC

In this case we have 1:4 and 2:5 that mean the button one in the phone will
have the phone-dn 4 and the 2:5 that mean button 2 will linked to ephone-dn
5 (I' wish that I' clear my point)

*now If you have a receptionist and she or he have a phone with one phone
number but she can monitoring all or some of the employee and transfer call
to them if there line’s are not busy
*ok we will have one ephone-dn and one ephone with more feature

CME(config)# ephone-dn 6
CME(config-ephone-dn)# number 811

CME(config)# ephone 4
CME (config-ephone)# button 1:6 2m1 3m2 4m3 4m4 5m5 – the (m) for
CME(config-ephone)# mac-address 1234.1234.1234

CME(config-ephone)#type CIPC

By this way the receptionist can see if the phone 1,2,3,4,5 are in use or not (by
the watch the ephone-dn ) and she can transfer the incoming call for the right
person if his line is not busy

*if you have a two guy’s and you need to balance the incoming call to this two
person every call will incoming to the number 812 will go to the first person
and the second will come to the second person but the third will go to the first
person. ☺

CME(config)# ephone-dn 7 dual-line

CME(config-ephone-dn)#number 812
CME(config-ephone-dn)# preference 0
CME(config-ephone-dn)# huntstop channel – huntstop channel will transfer
the second call to the next phone
CME(config-ephone-dn)# no huntstop – no huntstop will receive the third call

CME(config)# ephone-dn 8 dual-line

CME(config-ephone-dn)#number 812
CME(config-ephone-dn)# preference 1
CME(config-ephone-dn)# huntstop channel - will transfer the fourth call to
the first guy

CME(config)# ephone 5
CME (config-ephone)# button 1:7

CME(config)# ephone 6
CME (config-ephone)# button 1:8

• the auto assign command will give the registrar phone a dn and a number
• and by the defualt the auto registrar command is on

CME(config)# telephony-service
CME(config-telephony)#auto assign 10 to 15 – this command will give the
new ephone an ephone-dn from the range 10 to 15 dn

More feature's for the phone

To give a name to the phone number for when a user call another user he will
see the name for the calling person and the number

CME(config)# ephone-dn 8 dual-line

CME(config-ephone-dn)#number 812
CME(config-ephone-dn)#name mahmoud el shaare

*after you give for all the phone user’s a name and a number you can go to
the phone and press directories and press local directory and press select

and press submit then you will see all the phone user’s name and the number
for them

you can sorting the directory for the user’s name by fisrt name or by the last

CME(config-telephony)#directory first-name-first - sort by first name

CME(config-telephony)#directory last-name-first - sort by last name

*oh,you can put a name and a number for some one or a fax that not from
your netwok or for PSTN phone number

CME(config-telephony)#directory entry 1 01100000 name it manager mobile

• you can forward the incoming call from your phone to any phone number

go to your phone and press Cfwdall and type the phone number that you can
recevie your phone call if your not in your office

for the administrator you can call-forward the incoming call for the user’s in
case the phone is busy or no one answer
but in this case you will go to every phone-dn configuration

CME(config)#ephone-dn 1
CME(config-ephone-dn)#call-forward busy 802 – in case your phone busy the
incoming call will forward to the phone number 802

CME(config)#ephone-dn 1
CME(config-ephone-dn)#call-forward noan 802 timeout 20 – after 20 seconds
From ring and no one answer the call will forward to phone number 20

*Or you can put a limit for the number that the call will forward to or you
can cancel the forward feature

CME(config)#ephone-dn 1
CME(config-ephone-dn)#call-forward max-length 4 –that’s mean you can
forward four numer

CME(config-ephone-dn)#call-forward max-length 0 – that will cancel the call

forward feature

Or you can do that

CME(config-telephony)#call-forward pattern …. –that will forward just four
number for all the phone

Or you can forward the call by the PSTN by this way
CME(config-telephony)#call-forward pattern 9…….. – that will forward the
incoming call by the pstn to it’s destination

*the call transfer you can transfer the call from your phone to another user
by press trnsfer and type the needed number.
*the call transfer can be bad or good feature when you transfer a call inside
your building that will not hurt your Qos or your router processing
but if you transfer call that come from out of your company to another
branch of your company that will load your system because the call is steal
throw from the out router to your router to the branch router
but cisco has done protocol h.450.2 that protocol will transfer the call to the
next router

CME(config-telephony)#transfer-system full-consult

you can use transfer pattern to transfer your call with in the PSTN

CME(config-telephony)#transfer-pattern 9……..

*CALL PARK the call park is an option to park the call untile a some one
answer this call it's like the waiting option .
for use this option you need to create a phone-dn

CME(config)#ephone-dn 13
CME(config-ephone-dn)#number 711
CME(config-ephone-dn)#name call park

After you create the ephone-dn with option park-slot you can park your call at
this number by press more in your phone then press park the call will park at
this number and if you want to answer this call again press pickup and type the
park number 711

But there is an weakness point at the call park you can forget about this call
So we can make a time out for this call and after the time out of the call park end
the call will automatic cancel

CME(config-ephone-dn)#park-slot time out 5 limit 3 – this will set the time out to
5 seconds and the limit 3 if the call park for 3 time the call will cancel too.

We can use the (*) key to pickup any park call

We can build a group pickup for a group of phone like if your in sells group
And you have a 4 or 5 phone inside your department and your alone and a phone
Ring you need to know the phone number to pickup the call or you need to be in
the same pickup group for the sells department so to do that

CME(config)#ephone-dn 1
CME(config-ephone-dn)#pickup-group 130

CME(config)#ephone-dn 2
CME(config-ephone-dn)#pickup-group 130

CME(config)#ephone-dn 3
CME(config-ephone-dn)#pickup-group 130

CME(config)#ephone-dn 4
CME(config-ephone-dn)#pickup-group 130

The number 130 is the number that you will type to pickup the incoming call for
your group

More and more feauters

The new feauter are intercom , paging , after hours call blocking , music on hold

1-intercom in case if you have a managers and there secretaries the phone can be
an good intercom device

the coming configuration for the secertary phone

CME(config)#ephone-dn 20

CME(config-ephone-dn)#numbe S100 – (s) can’t dial from any phone so no one

can miss and dial s100

CME(config-ephone-dn)#intercom M101 label “manager”

the coming configuration for the manager phone

CME(config)#ephone-dn 21
CME(config-ephone-dn)#number M101
CME(config-ephone-dn)#intercom S100 label “secretary”

After that we need to assign this ephon-dn to the phone

CME(config)#ephone 1
CME(config-ephone)#button 2:20

CME(config)#ephone 2
CME(config-ephone)#button 2:21

There is mor option can be used with the intercom command

-* barge-in : this option will intersecting the call in case to give the priority to the
intercom used

-* no-auto-answer : this option to make you answer the intercom

-* no-mute : this option to make the mic on not mute

2-paging the paging option is more like an intercom but for group of user not for
one person and also it’s one way audio
in case to do that we need to create one ephone-dn and give it option paging and
after that assign the phone with option paging-dn

CME(config)#ephone-dn 22
CME(config-ephone-dn)#number 170

CME(config)#ephone 1
CME(config-ephone)#paging-dn 170

CME(config)#ephone 2
CME(config-ephone)# paging-dn 170

After that we can call the number 170 and we will paging the phone 1 and 2

-* after hours call blocking : this option will cancel the outgoing call after
the work hours end

CME(config)# telephony-service
CME(config-telephony)#after-hours day mon 8:00 5:00 – in this day the work
will start at 8:00 and will end at 5:00 after that no phone call we can repeat this
command for all the day of the week

CME(config-telephony)#after-hours block pattern 1 9T – for all the outgoing call

that use pstn

*we can also except a phone from block call

CME(config)#ephone 1
CME(config-ephone)#after-hour exempt

*we can also except another phone by another way like the pin code if you make
a call after work hour it will ask you for pin code

CME(config)#ephone 2
CME(config-ephone)#pin 1234

CME(config)# telephony-service
CME(config-telephony)#login timeout 120 clear 23:00 – that command will make
the user need to login after the end work hour and keep them login for 120
minute and after that they will ask to login and after 23:00 no login

-* music on hold : for music on hold
we need to copy an wav file or au music file to make it play when we but phone
on hold and after that

CME(config)# telephony-service
CME(config-telephony)#moh music.wav

-* CME GUI : for managing the CME from the web

*-at frist we must download the GUI for the call manager express
and the list of the requirement file’s is related with the ios version
after copy the files from the tftp server to the router we must enable
the http server to grant access to the http server

router(config)# ip http server → this will enable to access to the

router from the web

router(config)# ip http path flash:telephony_service.html → this

command will enable to access the telephony _service from the web

*-to make administrator account for access the web with admin

router(config-telephony)# web admin system name cisco password
cisco → this command will create an admin account with username
cisco and password cisco

router(config-telephony)# dn-webedit → this will enable adding of

directory number’s through the web

router(config-telephony)# time-webedit → this will enable change the

time through the web

router(config-telephony)# exit

*-to create a username and password for the telephony user’s enter
in the phone 1 or ….ext and create the user name and the password
for each user

router(config)# ephone 1
router(config-ephone)# username user1 password user1
router(config-ephone)# exit

The Different type of codec’s

Here we will see the different type of the codec’s that we can use for the voice
This codec’s will compress and decompress the voice packet they are very useful
for saving the wan bandwidth and they are to control the voice quality

The famous codec that we will see is G711 and that is the default codec that cisco
router use for the viop but that codec cost the wan bandwidth 64kbs and no
compress in that codec but the rate of the quality for this codec is very high
4.1 from 5 degree

the next famous codec is G729A and he compress the voice packet to 8kbs and
the quality rate 3.7 from 5 but you can’t tell the different between the G711 and

the G729 is compress the voice packet to 8kbps and a voice quality 3.92 from 5
but the he have a big problem he over lode the processor because he take a lot of
the DSP (digital signal processor)

the DSP it’s a chip that handle the voice coding processor , transcoding is the
processor for convert from on type of codec to another type of codec .

media termination point (MTP) is that service that the router give to you when
you but the call on hold like the music on hole .

conferencing is that option that when more that two users are talking for each
other at the same time the DSP handle the mixer of the voice for each user by
this way they can hear each other

the next codec is G726 and G728 but the are old and not used any more.

In the first we need to know how the voice convert from analog to digital
If we take one second of the analog voice its look like wave and if we take that
wave and for every one second for it divide into 8000 sample by this way every
curve of the wave draw will equal a number

By this way every curve of the wave equal a number

The (RTP) real time transport protocol : that is the voice that is our call that
protocol will send our voice to the another person
The (RTCP) real time transport control protocol : that is the call information
Like from what number and the user name …….

The Gateway and trunk

The Different between the router and the gateway is the router routing between
ip and the gateway that talk many protocol tcp/ip ipx appletalk

The FXS : Foreign eXchange Subscriber interface is the port that actually
delivers the analog line to the subscriber. In other words it is the ‘plug on the
wall’ that delivers a dialtone, battery current and ring voltage.

The FXO : Foreign eXchange Office interface is the port that receives the analog
line. It is the plug on the phone or fax machine, or the plug(s) on your analog
phone system. It delivers an on-hook/off-hook indication (loop closure). Since the
FXO port is attached to a device, such as a fax or phone, the device is often called
the ‘FXO device’. And we can also plug an PSTN line to make out call

The ATA : is a device have two FXS port and one ethernet port to attach a fax
or modem and connect into the network

-* we can use one of our line that come from the PBX and connect it to one of our
FXO port and use it like a small trunk but it can handle just one call.

The E&M card is used to connect the PBX with the CME with line T1 or E1
The PBX come with one E&M card and that use for 24 or 30 call with CAS or

The voice protocol

H.323 : audio/video communicaton suite but that protocol is very old

MGCP - used primarily by cisco , server-client model that use with call manager

SIP - poised to be the universal voip standard very common used

Dial-peer Part(1)
Good morning Miami here we are in configuring the dial-peer part here we will
connect the phone the old phone that in our home and the ip phone the FXS is for the
old phone and the FXO for connect the pstn with our CME ok lets set a scenario we
have to old telephone connected to the FXS port in our router and we have another
router and two ip phone connected to that router and we have our picture that explain

at the first we will configure our two old phone to dail each other and do not forget
they are connected to the FXS port with router B

RouterB(config)#dail-peer voice 1 pots – the number (1) is a tag the tag can be any
number between [1-214743647] this number just to mark or to know your dial-peer
number and the pots for Plain old telephone service (POTS)

RouterB(config-dial-peer)# destination-pattern 3301 → the end telephone number

RouterB(config-dial-peer)#port 1/0/0 → to associate the logical dial interface—

voice port 1/0/0——with the POTS dial peer

That is all the configuration for the first phone

-* the next phone configuration will be the same but the number,port and the tag will

RouterB(config)#dail-peer voice 2 pots

RouterB(config-dial-peer)# destination-pattern 3302
RouterB(config-dial-peer)#port 1/0/1

-*now we can dial the number from phone 3301 to phone 3302 and you will
hear the phone ring that’s the all configuration that you want to make a locl call
from phone to phone

ok if we need to dial the ip phone number 100 or 101 from our old phone
what we will need

-* in this case we will configure the voip dial-peer from it’s name we will know
what it mean we will make a call from router B to router A over the ip

but at first we need to be sure that the two router are connected and the reach
each other the next step to configure the voip dial-peer at routerB first

RouterB(config)#dail-peer voice 3 voip – the number (3) is our tag and voip for voice
over ip
RouterB(config-dial-peer)# destination-pattern 10. – the [.] for any number from
0-9 that’s mean you can dial 100 or 101 or 102 ….to 109

RouterB(config-dial-peer)# session target ipv4: → the ip of the next router

-*now we can dial from our old phone to the ip phone BUT if we dial from our
ip phone to the old phone that will not work because you don’t yet configure the
router A with dial-peer voip , ok lets begin

RouterA(config)#dail-peer voice 10 voip

RouterA(config-dial-peer)# destination-pattern 33..
RouterA(config-dial-peer)# session target ipv4:

-*now we can make a full phone call from router A to router B and from the ip
phone to the old phone post

we have a good command to view the fxo and the fxs port and what phone on-
hook or off-hook and to view the used code and the active call
routerA#show voice call summary – that command will show the active call and the
used codec

routerA#show voice port summary – that command will show all the connected phone
and even the ephone-dn will be show and the phone even off-hook or on-hook

oh we can choose the codec from the voip dial-peer when we configure the voip dial-

RouterA(config-dial-peer)#codec g729br8 – I’love this codec because when you make a

phone call this codec remove the silent voice from the call ( when you make a phone
call we don’t talk all the time there may be a moment of silent ) this codec when since
this moment of silent he don’t send it on the voice packet so he minimize the lode on
the router processor

And it will be good if you but the same codec in the others routers

routerA#show dial-peer voice summary – will show to you all the dial-peer that
you have and the ephone-dn too

routerA#debug voip dialpeer all – that command will debug the voip phone call
that’s good command to view what happen behind the scene

we have more optin or Special characters that we can use when we configure our
dial peer
like the dot (.) the dot mean a number like this 330. that dot mean you can enter
a number between 0 throw 9

and we have (T) that mean if we put [9T] any number after the 9 will match with
the dialed number example if we do a dial-peer for the pstn we will configure the
dial-peer like that

router(config)#dial-peer voice 100 pots

router(config-dial-peer)#destination-pattern 9T – that mean when a user dial 9
and enter any number after that , that number will match any number , like a
home phone or mobile number

we have too the brackets [] the bracktes maen that number between them
like 4[1-4]1 that mean you can dial 411 ,421,431, or 441 that’ all ☺
you will think that you can enter two digit like 4 2 3 1 no that’s wrong you just
choose from 1 to 4 any number between them will match

Another example 15[6-9]1 that mean you can dial (1561,1571) I’hope that you get

And we can use [1-3]… that mean we can dial 1234 or 2345 or 3789 any number
between 1 to 3 and any 3 digit after that

dial-peer part (2)

in the previous configuration we have made an local call and voip call,
now that’s the part where we will make out call from our T1 or fxo port
if we have a two router like the previous scenario but the router B is connected to
the pstn or T1 Controller how do we use them to make an out call.

At first we will make the fxo configuration, that’s pictures for fxo card on the left
and Fxs card on the right they are very Similar

RouterB#conf t
RouterB(config)#dial-peer voice 20 pots
RouterB(config-dial-peer)#destination-pattern 9……..
RouterB(config-dial-peer)#port 2/0/0 – that’s the fxo first port (for the fisrt line)

RouterB#conf t
RouterB(config)#dial-peer voice 21 pots
RouterB(config-dial-peer)#destination-pattern 9[011-012]……..
RouterB(config-dial-peer)#port 2/0/1 – that’s the second fxo port (for the second
line) and I’have make this line for the mobile phone call only

-* Now the T1 configuration it’s so easy

RouterB#conf t

RouterB(config)# Controller t1 1/0

RouterB(config- Controller)#framing esf – extended super fram

RouterB(config- Controller)#linecode b8zs – this information you can get it from

your ISP

RouterB(config- Controller)#ds0-group 5 timeslots 1-24 type fxo-loop-start --

(ds0-group : that’s used for cas configuration if we will use ccs we will use
pri-group and the same configuraton after that ) , (5 : is the group number , we
have t1 line with 24 channel if we splitting this line for 24 channel evry channel
have it’s own configuartin in this case we will need to use for evry channel it’s
own group number and we have from 0-23 group), (timeslots : 1-24 that mean
that we will use all the 24 channel for the same purpose),(type fxo-loop-start :
that mean that we connected this t1 with Central not with pbx system)

-*now we have 24 channel ready to use if we type the command

RouterB#show voice port summary – we will see the new created all 24 port 1/0:5
For the t1 controller and we will make a dial-peer to use them

RouterB#conf t
RouterB(config)#dial-peer voice 22 pots
RouterB(config-dial-peer)#destination-pattern 9T – for any out call
RouterB(config-dial-peer)#port 1/0:5 - the t1 controller port

-* when we in the beging of design a dial-peer we must make something called

dialer map that map or that design must be content evry thing you imagin every
branch number every department number.

I’told you that because if you have a dial-peer like that

router(config)#dial-peer voice 100 voip

destination-pattern ….
session target ipv4:

And you have dial-peer like that

router(config)#dial-peer voice 101 voip

destination-pattern ….
session target ipv4:

What will the router use to call the dial number ?

For this case you need to make a good design for your dial-peer

Manipulating Dialed Digits
When we make a dial-peer like the’s
Dial-peer voice 50 pots
destination-pattern 9……..

the 9 is not dialed number this number will be strip when we make the phone
call example for that if you dial in your ip phone 901200000000 the number 9
will not dial .
then what is the useful of but 9 at the beginning of the destination-pattern
☺ the useful of the number 9 is to separating between the use of pots and voip
like if you will use the voip all the number will be send and if you don’t use 9 in
the beginning of the destination-pattern all number will be send too and the first
match first send like if you have two dial-peer like that

router(config)#dial-peer voice 100 voip

destination-pattern ….
session target ipv4:

router(config)#dial-peer voice 101 pots

destination-pattern …….

How the CME will know where I’will send the dial number by the pstn or by the
viop that’s the number 9 mean just for mark or separate between the viop and
the post

Ok at this point we know that the number 9 will be strip, what the other case of
the dial-peer that the number will be strip

destination-pattern 911… - all the first 3 digit will be strip

then what we can do to don’t strip the needed number in case of Emergency

we have 4 new command

1- prefix <digits>
2- forward-digits <number>
3- digit-strip
4- num-exp <match>

the first command (prefix) is used when you try to dial an local extension for
your remote branch that are connected with the wan voip and the wan is
disconnected in this case you can use the prefix command with the preference
command the prefrance command that give the priority to the needed dial-peer
example for that.

Dial-peer voice 6000 voip
destination-pattern 6…
session target ipv4:
preference 0

dial-peer voice 6001 pots

destination-pattern 6…
port 1/0:5
no digit-strip
prefix 1512555
preference 1

the explaining at the first the CME will try to connect throw the voip because the
voip have preference 0 if the wan disconnected the CME will go to the next dial-
peer with the preference 1 the CME will find two command no digit-strip it’s
mean that he will send the all dialed number like 6571 and after that he will find
the next command prefix he will but the number 1512555 before 6571
so he can use the pstn network so the total dialed number is 1525556571
so that was for the prefix command.

The froward-digits command used when you use the pstn network and you want
to strip some digit and froward the rest of the number like the next example

Dial-peer voice 911 pots

destination-pattern 9911
port 1/0/1
forward-digits 3

in this case if you dial 9911 the router will send the 3 digit read them from lifet to
the right 911 and you will have the call

more easy way for this case (Emergency case) the command
no digit-strip

Dial-peer voice 911 pots

destination-pattern 911
port 1/0/1
no digit-strip

in this case you don’t have to dial 9911 you can dial 911 direct and you will have
your call

the num-exp command can do that you can dial 0 and you get 500 how that
come the num-exp will convert the 0 to 500.
this configuratin will but in the configuration mode

router(config)#num-exp 0 500

in this case if you dial 0 the person how have the ephone-dn number 500 he will
answer the call

Incoming call from FXO
When we have incoming call from the fxo port the router do'not know
where to redirect this call here we will but the right configuration to
redirect the incoming call to a phone number we will but this configuration
Into the fxo port.
router(config)#voice-port 1/0/0 → fxo port
router(config-voiceport)#connection plar 3301 → the command plar will
redirect the incoming phone call's from the fxo port to the phone number