Showing posts with label VoIP. Show all posts
Showing posts with label VoIP. Show all posts

Monday, September 7, 2015

VoIP- CUCM Express: Advanced Features, H323 and SIP Trunks Configuration.



Introduction:

  In this lab, I will introduce you how to configure several call features including call-transfer, hunt groups, call park, call pickup, paging groups, paging/intercom, Music on Hold (MoH). Then, I will implement the auto-QoS and cRTP as well as show you how to configure VTP (VLAN trunking protocol) so you can add, delete and modify VLAN on a single switch and have that VLAN information propagate into the VLAN database on other switches within the VTP domain. Finally, I will show you how to configure H323 and SIP trunks between voice gateways using specific codecs.

Network Topology:
                                                              
                                                               Figure 1: Lab Topology.



                                                           
                                                         Figure 2: Lab device connectivity.

Equipment List:

- Site A:
Ra: Cisco router 3750.
SWA, SWA1: Cisco router 3750, included NM-16ESW card, operates as Switch 3560.
DNS_A: VPCS operates as DNS Server.
IP phone A1, A2, A3:  VPCS operates as Cisco IP Phone 7960.

- Site B:
Rb: Cisco router 3750.
SWB: Cisco router 3750, included NM-16ESW card, operates as Switch 3560.
DNS_B: VPCS operates as DNS Server
IP phone B1, B2, B3:  VPCS operates as Cisco IP Phone 7960.

- Site C:
Rc: Cisco router 3750.
SWC: Cisco router 3750, included NM-16ESW card, operates as Switch 3560.
DNS_C: VPCS operating as DNS Server
IP phone C1, C2, C3:  VPCS operates as Cisco IP Phone 7960.

For more information: GSN3-tutorial.

Overview:

- VoIP is a technology that allows phone calls to be reliably made over a packet-switched network. As we know,  human voice is analog signals that need to be transmitted over IP environment. So, this analog signals need to be converted into digital signals for transmission and be converted back to analog signals at the other side so called person can hear the voice. There are 2 main reasons for us to deal with digital circuits: One deals with inefficiencies of analog because we can't compress the analog signals for transmission in order to reduce the bandwidth. The other reason is that there is a distance limitation with analog signals. The longer distance, the degrader it's sufferred. we can address this degraded problem by using a electrical repeater that its job is to listen to the electrical signals coming in one end and reproduce the signals out the other. However, while this may work to extend analog distances a bit farther, they stop becoming productive at a certain point. This is because repeaters can interpret electrical pulses called noise on the wire and falsely assume they are part of the signal to be repeated. This noise gets retransmitted by the repeater and be carried to other side.
-   Four steps are necessary to transform an analog signal into a compressed digital signal. 
The steps always occur in the following order: 
     1. Sample the analog voice signal.   
     2. Quantize the sample.   
     3. Encode the digital sample.   
     4. Compress the encoded sample (optional).


Figure 3: Analog to Digital Conversion Process.

- In reality, DSP resources provide analog-to-digital translation, codec transcoding, echo cancellation, DTMF-Relay Services, and Media termination points. Because DSPs are responsible for analog-to-digital conversion, they are required on voice gateway that sits between the legacy PSTN network and the VoIP network. Moreover, when two VoIP devices wish to talk to one another over the IP network, both need to be able to understand the codec that is being used. If one VoIP end unit uses a codec that the other end unit does not understand, a DSP can be used to transcode  the stream into a codec that is supported. DSP resources are also used to assist in the elimination of echo when converting from one voice signal into another. Besides, it may be necessary to allow your IP endpoints to use DTMF to communicate with non-VoIP-based services. DTMF-relay can be used to facilitate this conversion. There are several methods for configuring DTMF-relay. All of them require the use of DSPs to properly transport the DTMF tone uncompressed over an IP network. When using H.323 or SIP endpoints or gateways, you can use DSP resources to assist with the process of functions such as call holds, parks, transfers, and conferences. These supplementary services are referred to as  media termination points.
- In order to encode and decode the quantized samples, we use intelligent algorithms called a codec (compressor/decompressor). We usually use some popular codecs:
+ G711: ITU standard codec is known as pulse code modulation (PCM). This codec samples voice signals at a frequency of 8,000 samples per second. There are 2 types G711 codec: G711 u-law is used in US, Canada and Japan while G711 a-law is used elsewhere on the planet.  Each phone call on the network requires 64 Kbps on the wire, and there is no compression when it encodes the voice stream.
+ G729: ITU standard codec samples the voice signal at the same rate as G.711 of 8,000 samples per second per the Nyquist rate theorem. Also like G.711, the bit rate is fixed at 8 per sample. The major difference between G.711 and the variations of G.729 has to do with compression. G.729's use of CS ACELP allows the compressed voice signal to require only 8 Kbps per call as opposed to 64 Kbps required per stream of G.711. However, the quality of the voice signal is not quite good and sound  likes robotic.
 While G711 is considered as medium complexity, G729 is considered as high complexity. High- complexity codecs use more DSP processing power than medium-complexity codecs.
- It is important to know that VoIP uses IP for routing decisions, UDP for packet delivery, and RTP/RTCP for real-time transport. While RTP is used for the transport of voice packets on a Unified Communications system and uses even numbered UDP port (e.g port 22864), RTCP is responsible for out-of-band monitoring of the RTP packets and uses the next-highest odd-numbered UDP port (e.g port 22865). You also need to understand how the CUCM solution handles the signaling responsibilities for voice endpoints. VoIP endpoint signaling protocols are responsible for locating endpoints, negotiation of various functions, and the setup and teardown of voice calls. You must be familiar with some endpoint signaling protocols below:


Figure 4: Voice signaling protocols

- In VoIP world, there are many things that need to be discussed such as Dialing Plan, Signaling protocols, QoS and so on. I've just mentioned some important points so that we can understand what happened underlying the VoIP calls.

Configuration:

Based on the Lab diagram in Figure 1, and refer to VoIP-Cisco Unified Communications Manager Express (CUCME)  for configuration of step 1 to 6 below:

Step 1: Build the lab Topology.
Step 2: Perform basic device configuration.
- On each router and switch:
•  Set the hostname as indicated on the topology diagram
•  Set the enable secret to class
•  Disable DNS lookups
•  Set a Telnet and Console password of cisco 
•  Set IP addresses as indicated on the above chart
- On each switch:
•  Create VLAN 10 with the name VOICE
•  Create VLAN 20 with the name DATA
•  Create VLAN 99 with the name MANAGEMENT
•  Configure VTP on SWA and SWA1:

 The purpose of VTP is  that we can add, delete and modify VLAN on a single switch, for example SWA, and have that VLAN information propagate into the VLAN database on other switches, for example SWA1, within its VTP domain. There are 3 VTP modes:
VTP Server: 
 VTP server mode allows an administrator to add, delete, and modify VLANs on the network over trunked links. All changes are propagated to other switches within the VTP domain. VTP server is the default VTP mode on all Cisco switches.   
VTP Client: 
  VTP client mode listens to the VTP server and copies its VLAN settings to its own VLAN database. It also forwards the VTP update messages from the server to other switches within the same VTP domain on its trunked links. This mode does not allow you to add, delete, or modify VLANs.   
VTP Transparent: 
  VTP transparent  mode basically disables VTP on the switch. You can add, delete, and modify VLAN information on the switch, but it never propagates this information to any other switch. Also, if the switch in this mode receives VTP update messages from other switches it is trunked with, it ignores the updates locally but will pass them on to connected neighbors.
  The VTP configuration on SWA and SWA1 as below
 Step 1:
SWA:
   VTP Mode: Server  
   VTP Version: 2
   VTP Domain: voip 
   VTP Password: cisco  
 SWA1:
   VTP Mode: Client
   VTP Version: 2
   VTP Domain: voip  
   VTP Password: cisco
On SWA:
SWA#vlan database
SWA(vlan)#vtp server
SWA(vlan)#vtp v2-mode
V2 mode enabled.
SWA(vlan)#vtp domain voip
SWA(vlan)#vtp password cisco
On SWA1:
SWA#vlan database
SWA(vlan)#vtp client
SWA(vlan)#vtp v2-mode
V2 mode enabled.
SWA(vlan)#vtp domain voip
SWA(vlan)#vtp password cisco

 Step 2:
 Configure 802.1Q trunking on Fa3/14 interface of SWA and SWA1
On SWA:
SWA(config)#int f3/14
SWA(config-if)#switchport trunk encapsulation dot1q
SWA(config-if)#switchport mode trunk
SWA(config-if)#no shut
On SWA1:
SWA1(config)#int f3/14
SWA1(config-if)#switchport trunk encapsulation dot1q
SWA1(config-if)#switchport mode trunk
SWA1(config-if)#no shut
 After creating VLAN 10, 20, 99 on SWA, these vlans will be propagated into vlan database on SWA1.
SWA1#show vtp status
VTP Version                     : 2
Configuration Revision          : 2
Maximum VLANs supported locally : 68
Number of existing VLANs        : 8
VTP Operating Mode              : Client
VTP Domain Name                 : voip
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Enabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x68 0xC6 0x4B 0xA9 0xE6 0x84 0x2A 0x57
Configuration last modified by 172.16.99.2 at 3-1-02 00:18:36
SWA1#show vlan-switch
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa3/0, Fa3/1, Fa3/2, Fa3/3
                                                Fa3/4, Fa3/5, Fa3/6, Fa3/7
                                                Fa3/8, Fa3/9, Fa3/10, Fa3/11
                                                Fa3/12, Fa3/13, Fa3/14, Fa3/15
10   VLAN0010                         active
20   VLAN0020                         active
99   VLAN0099                         active
1002 fddi-default                     active
1003 trcrf-default                    active
1004 fddinet-default                  active
1005 trbrf-default                    active

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
99   enet  100099     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 trcrf 101003     4472  1005   3276   -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off

- On each DNS Server:
•  Configure a static IP address.
VPCS[1]> ip 172.16.20.100 172.16.20.1 24
Checking for duplicate address...
PC1 : 172.16.20.100 255.255.255.0 gateway 172.16.20.1
VPCS[1]> 2
VPCS[2]> ip 172.17.20.100 172.17.20.1 24
Checking for duplicate address...
PC2 : 172.17.20.100 255.255.255.0 gateway 172.17.20.1
VPCS[2]> 3
VPCS[3]> ip 172.18.20.100 172.18.20.1 24
Checking for duplicate address...
PC3 : 172.18.20.100 255.255.255.0 gateway 172.18.20.1

- On each IP Phone:
•  Configure to receive IP address via DHCP.
VPCS[4]> ip dhcp
DDORA IP 172.16.20.2/24 GW 172.16.20.1
VPCS[4]> 5
VPCS[5]> ip dhcp
DDORA IP 172.18.20.2/24 GW 172.18.20.1
VPCS[5]> ip dhcp
DORA IP 172.16.20.3/24 GW 172.16.20.1
VPCS[5]> 6
VPCS[6]> ip dhcp
DDORA IP 172.16.20.4/24 GW 172.16.20.1
VPCS[6]> 7
VPCS[7]> ip dhcp
DDORA IP 172.17.20.3/24 GW 172.17.20.1
VPCS[7]> 8
VPCS[8]> ip dhcp
DDORA IP 172.17.20.4/24 GW 172.17.20.1
VPCS[8]> 9
VPCS[9]> ip dhcp
DDORA IP 172.17.20.5/24 GW 172.17.20.1

  Note that VPCS supports only 9 PCs using udp ports. If we want to configure more IP phones in the lab, we can create MS Loopback adapter and apply on cloud devices that operate as IP Phones. Furthermore, these IP Phones cannot make call because they are actually cloud devices. But they can obtain IP address via DHCP from routers within DATA VLAN instead of VOICE VLAN because GSN3 simulator doesn't support IP Phone devices as Cisco Packet tracer does. In this lab, I used GNS3 simulator to show you how to configure advanced features in CUCME. However, we won't find these features on Cisco routers if we use Cisco Packet tracer simulator.
 As I said, GNS3 doesn't support IP Phone devices. However, you can even connect to virtual machines running on your computer inside VMware or Virtual PC. Then you run Cisco soft IP Phones that can talk to themselves. You can also connect GSN3 simulator to a real PC with MS Loopback interface as well. I have sucessfully registered the Cisco IP Communicator 7.0.4.0 that ran on real PC when connecting to GNS3 simulator via MS Loopback interface with DN 4001. Furthermore, I have already registered the Cisco IP Communicator 7.0.4.0 that ran on window XP based virtualbox via bridged adapter MS Loopback interface with DN 4002. Then I made a call from DN 4001 to DN 4002.

Ra#sh telephony-service
CONFIG (Version=3.3)
=====================
Version 3.3
Cisco CallManager Express
For on-line documentation please see:
www.cisco.com/univercd/cc/td/doc/product/access/ip_ph/ip_ks/index.htm

ip source-address 172.16.10.1 port 2000
max-ephones 5
max-dn 5
max-conferences 8 gain -6
dspfarm units 0
dspfarm transcode sessions 0
hunt-group report delay 1 hours
max-redirect 5
time-format 12
date-format mm-dd-yy
timezone 0 Greenwich Standard Time
keepalive 30
timeout interdigit 10
timeout busy 10
timeout ringing 180
caller-id name-only: enable
web admin system name Admin
web admin customer name Customer
edit DN through Web:  disabled.
edit TIME through web:  disabled.
Log (table parameters):
     max-size: 150
     retain-timer: 15
auto assign 1 to 5
local directory service: enabled.

Ra#sh telephony-service ephone
Number of Configured ephones 2 (Registered 1)
ephone 1
mac-address 0200.4C4F.4F50
type CIPC
button  1:1
!
ephone 2
mac-address 0800.27BE.48DE
type CIPC
button  1:2
!

Ra#sh telephony-service ephone-dn

ephone-dn 1
number 4001
preference 0 secondary 9
huntstop
call-waiting beep

ephone-dn 2
number 4002
preference 0 secondary 9
huntstop
call-waiting beep

ephone-dn 3
number 4003
preference 0 secondary 9
huntstop
call-waiting beep


Figure 5: Local call between Cisco IP Communicator 7.0.4.0

Step 3: Configure DHCP service on the Routers.
Step 4: Enable basic VoIP service on each router.
Step 5: Configure the pool of directory numbers on each router. 
Step 6: Configure switch interfaces. 
Step 7: Configure site-to-site calling: H323 and SIP trunks.




Monday, August 24, 2015

VoIP-Cisco Unified Communications Manager Express (CUCME)


Introduction:

 In this lab, I will introduce you how to configure Cisco Unified Communications Manager Express (CUCME) in a basic two site topology. You'll learn how to create vlan, configure trunk ports and switch ports as well as provide power supply to the IP Phones using PoE on switches. Moreover, You'll also learn how to configure DHCP, enable VoIP service and create directory numbers (DNs) on each router. Especially, you will have an opportunity to learn how to configure site-to-site calling (H323 trunk) so we are able to make call between Site A and Site B.

Network Topology:


Figure 1: Lab Topology.
 Equipment List:

- Site A:
RouterA1: Cisco router 2811.
SwitchA1: Cisco switch 3560-24PS
IP phoneA1, and A2: Cisco IP Phone 7960
PC A1

- Site B:
RouterB1: Cisco router 2811.
SwitchB1: Cisco switch 2960-24T
IP phoneB1, and B2: Cisco IP Phone 7960
Home VoIPB1: Analog Telephone Adapter (ATA)
Analog PhoneB1: Cisco Analog phone.
PC B1

Configuration:

 Step 1: Build the lab Topology.
  Build the lab topology as the figure 1. Note that the IP Phones at site A will be receiving Power over Ethernet (PoE) from the Switch (3560) but the IP Phones at site B should be configured with Power Supply.

Step 2: Perform basic device configuration.
- On each router and switch:
•  Set the hostname as indicated on the topology diagram
•  Set the enable secret to class
•  Disable DNS lookups
•  Set a Telnet and Console password of cisco 
•  Set IP addresses as indicated on the above chart
- On each switch:
•  Create VLAN 10 with the name VOICE
•  Create VLAN 20 with the name DATA
•  Create VLAN 99 with the name MANAGEMENT
- On each PC:
•  Configure to receive IP address via DHCP

*  Site A configuration:
Switch 3560:
Switch(config)#hostname SwitchA1
SwitchA1(config)#no ip domain lookup
SwitchA1(config)#line console 0
SwitchA1(config-line)#password cisco
SwitchA1(config-line)#exec-timeout 0 0
SwitchA1(config-line)#exit
SwitchA1(config)#line vty 0 4
SwitchA1(config-line)#password cisco
SwitchA1(config-line)#login
SwitchA1(config-line)#exit
SwitchA1(config)#enable secret class 
SwitchA1(config)#vlan 10
SwitchA1(config-vlan)#name VOICE
SwitchA1(config-vlan)#vlan 20
SwitchA1(config-vlan)#name DATA
SwitchA1(config-vlan)#vlan 99
SwitchA1(config-vlan)#name MANAGEMENT
SwitchA1(config-vlan)#exit
SwitchA1(config)#int vlan 99
SwitchA1(config-if)#
%LINK-5-CHANGED: Interface Vlan99, changed state to up
SwitchA1(config-if)#ip address 172.16.99.2 255.255.255.0

 Router 2811:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RouterA1
RouterA1(config)#enable sec class
RouterA1(config)#no ip domain lookup
RouterA1(config)#line con 0
RouterA1(config-line)#pass cisco
RouterA1(config-line)#exec-timeout 0 0
RouterA1(config-line)#exit
RouterA1(config)#line vty 0 4
RouterA1(config-line)#pass cisco
RouterA1(config-line)#login
RouterA1(config-line)#exit
RouterA1(config)#int fa0/1
RouterA1(config-if)#ip address 10.0.0.1 255.255.255.0
RouterA1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
RouterA1(config-if)#int fa0/0
RouterA1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
RouterA1(config-if)#int fa0/0.10
%LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up
RouterA1(config-subif)#encapsulation dot1Q 10
RouterA1(config-subif)#ip address 172.16.10.1 255.255.255.0
RouterA1(config-subif)#no shut
RouterA1(config-subif)#int fa0/0.20
%LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up
RouterA1(config-subif)#encapsulation dot1Q 20
RouterA1(config-subif)#ip address 172.16.20.1 255.255.255.0
RouterA1(config-subif)#no shut
RouterA1(config-subif)#int fa0/0.99
%LINK-5-CHANGED: Interface FastEthernet0/0.99, changed state to up
RouterA1(config-subif)#encapsulation dot1Q 99 native
RouterA1(config-subif)#ip address 172.16.99.1 255.255.255.0
RouterA1(config-subif)#no shut

 Switch 2960 and router 2811 are configured similarly on site B.

Step 3: Configure DHCP service on the Routers.
  The VoIP devices and PCs need to receive IP addressing information by DHCP. Each router will need to act as the DHCP server for its location. We will be separating the voice and data networks at each location so we will need two DHCP pools. The special DHCP option 150 is used to send the CUCME address to the VoIP devices so they can register and receive configuration information. Even though this option is only required on the Voice VLAN we have included it on the Data VLAN in case soft-phones are ever used on the PCs. 
  The commands to setup the DHCP pools on RouterA1 are given below. You will have to modify them as appropriate for RouterB1 and apply them there as well.

RouterA1(config)#ip dhcp pool VOICE
RouterA1(dhcp-config)#network 172.16.10.0 255.255.255.0
RouterA1(dhcp-config)#default-router 172.16.10.1
RouterA1(dhcp-config)#option 150 ip 172.16.10.1
RouterA1(dhcp-config)#exit
RouterA1(config)#ip dhcp pool DATA
RouterA1(dhcp-config)#network 172.16.20.0 255.255.255.0
RouterA1(dhcp-config)#default-router 172.16.20.1
RouterA1(dhcp-config)#option 150 ip 172.16.10.1

Step 4: Enable basic VoIP service on each router:
 The DHCP option 150 instructs the VoIP devices receiving addresses to contact the router for registration and configuration information. We must next configure the router to provide voice service to those devices. Enable the VoIP service and set the maximum number of VoIP devices and directory numbers to 5 on each router. We will also allow phones to self-register and get an extension number automatically from directory numbers 1-5. Finally, the outgoing IP and port number for VoIP traffic from the router must be selected. The example configuration commands for RouterA1 are given below. Modify and apply to router B1 as well. 

RouterA1(config)#telephony-service
RouterA1(config-telephony)#max-ephones 5
RouterA1(config-telephony)#max-dn 5
RouterA1(config-telephony)#auto-reg-ephone
RouterA1(config-telephony)#auto assign 1 to 5
RouterA1(config-telephony)#ip source-address 172.16.10.1 port 2000

Step 5: Configure the pool of directory numbers on each router. 
  Each site will have a unique pool of directory (extension) numbers for each phone. On physical equipment it is possible to have overlapping dial plans (the same extension numbers duplicated at both sites) and then use a special prefix to dial between sites, but this is not supported by Cisco Packet Tracer simulation tool. We will need to ensure that each phone in the topology has a unique number. The numbers at site A will all start with 4xxx and at site B they should all start with 5xxx. Below is the configuration for one of the directory numbers at site A. Create enough (correctly numbered) directory numbers at each site to support all of the VoIP devices at that site.

RouterA1(config)#ephone-dn 1
RouterA1(config-ephone-dn)#%LINK-3-UPDOWN: Interface ephone_dsp DN 1.1, changed state to up
RouterA1(config-ephone-dn)#number 4001
RouterA1(config-ephone-dn)#ephone-dn 2
RouterA1(config-ephone-dn)#%LINK-3-UPDOWN: Interface ephone_dsp DN 2.1, changed state to up
RouterA1(config-ephone-dn)#number 4002

Step 6: Configure switch interfaces. 
 Trunk Ports: 
Configure an 802.1Q trunk link from FastEthernet 0/1 on each switch to the router. 
Access Ports: 
 All of the remaining ports on each switch should be configured as access ports in the DATA VLAN and should have PortFast enabled. The ports should all be shutdown for security reasons unless they have a device plugged into them. Enter this configuration as you normally would on the switches at both sites. Remember that there are shortcuts to configuring multiple interfaces on a switch the same way. Because we want to have our IP phones on a different VLAN than our PCs we need to perform a special configuration on all the access switch ports to turn them into two VLAN trunks when IP phones are identified by CDP. Leave the ports in switchport mode access but add a special second VLAN to them for voice traffic.

SwitchA1(config)#int fa0/1
SwitchA1(config-if)#switchport trunk encapsulation dot1q
SwitchA1(config-if)#switchport mode trunk
SwitchA1(config-if)#int range fa0/2-24
SwitchA1(config-if-range)#switchport access vlan 20
SwitchA1(config-if-range)#switchport mode access
SwitchA1(config-if-range)#switchport voice vlan 10
SwitchA1(config-if-range)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION
%Portfast will be configured in 23 interfaces due to the range command
but will only have effect when the interfaces are in a non-trunking mode.
SwitchA1(config-if-range)#
  At site A we also need to provide power to the IP phones using PoE:

SwitchA1(config-if-range)#power inline auto
 Because SwitchA1 does not support port-security so I couldn't configure this feature on this switch. However, you can do it on SwitchB1 as below:

SwitchB1(config)#int rang fa0/2-24
SwitchB1(config-if-range)#switchport port-security 

Step 7: Test the configuration.
 At this point you should have enough configuration done for communications within each site to be working so this is a good place to stop and test your work. The first thing to check is to ensure all your devices have IP addresses in the appropriate subnets. Note that after you enable all the ports it will take some time for all the devices to attempt requesting a DHCP address again so if you don’t see addresses right away wait a couple minutes and check again. You can easily check the addresses of IP phones and PCs by hovering your mouse over the device in PT (Packet Tracer) and checking the listed IP and gateway addresses. You can further check connectivity by pinging one of the interfaces on the router at the same site from each PC. Once your IP phones have IP addresses they should automatically contact the CUCME software running on the router (using the option 150 address), register, and get an extension number. You can verify the extension number of each IP phone by hovering your mouse over the phone and looking for a Line Number or by opening the phone and checking on the upper right of the display on the GUI tab. Note that the Analog Telephone Adapter (ATA) at site B does not use DHCP option 150 to find the CUCME server. You will have to enter the correct server address on the Config tab of the ATA before the analog phone will receive an extension number. Once all your devices have extension numbers you can try placing a call between devices at the same site. Click on one of the IP phones and switch to the GUI tab. Open up the same window for another IP phone at the same site and place it next to the first window so you can see both phones at the same time. Enter the extension number of the other phone on the dial pad of one phone and click on the receiver to place the call. The other phone should indicate that it is ringing and the number of the extension which is calling should appear on the display. Click the receiver on this phone to answer the call. The display should now show the phones are Connected. If you look to the upper right of each phone (you may have to scroll over to the right) you should see Do, Re, Mi buttons. Pressing one of these simulates talking into the phone. If you press one you should see a message above the phone you are connected to like Playing ‘Do’… for a short while after you press it. This indicates the connection between the phones is working properly.
 Now, I will try to make a local call on site A from IP Phone with ext. 4001 to the IP Phone with ext. 4002.


Then, off-hook the phone with ext. 4002


Step 8: Configure site-to-site calling (H323 trunk).
 To enable site-to-site dialing we must make each of the two CUCME systems aware of the other so that they can facilitate a connection between phones. Even though the CUCME systems manage the connection the voice traffic is not required to flow through them (though it does in this topology when a call is being made site-to-site). Because of this the first thing we need to do is make sure that every device at each site will be able to reach all of the devices at the other site. Add the appropriate routes to each router to enable routing between the sites. The most best way to do this is with a single /16 summary route on each of the routers to manually summarize the addresses found at the other site. Once you have the appropriate routes installed and have tested by successfully pinging from the PC at one site to the PC at the other site we need to setup VoIP call routing between sites. This link is made by what is called a dial-peer which identifies specific destination extensions and directs them to another CUCME server in much the same way a routing table works for IP traffic. We must also identify what extension numbers to direct to the other server, something done with a destination-pattern. Examine the dial-peer configuration given for RouterA1 below and then enter it into RouterA1.

RouterA1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RouterA1(config)#router rip
RouterA1(config-router)#version 2
RouterA1(config-router)#network 172.16.0.0
RouterA1(config-router)#network 10.0.0.0
RouterA1(config-router)#no auto
RouterA1(config-router)#dial-peer voice 1 voip
RouterA1(config-dial-peer)#destination-pattern 5...
RouterA1(config-dial-peer)#session target ipv4:10.0.0.2

  This will identify all extensions which start with a 5 followed by three other digits and direct them to the CUCME server running on RouterB1. Make the appropriate changes to this configuration and then apply it to RouterB1 to allow the VoIP devices at site B to call site A as well.
 Test your configuration by calling from site A to site B and from site B to site A.
 Now, I will try to make a remote call from IP Phone with ext. 4001 on site A to the IP Phone with ext. 5001 on site B.


Then, off-hook the phone with ext. 5001.


Now, I will try to make a remote call from IP Phone with ext. 5002 on site B to the IP Phone with ext. 4002 on site A.


Then, off-hook the phone with ext. 4002.


Well-done! Now, I want to challenge you by making some or all of these modifications to what you have done so far: 
•  Add another VoIP device (IP phone or ATA) to site A 
•  Setup specific devices to receive specific extension (directory) numbers. For example, make sure that IP Phone A1 always receives extension 4001 and IP ATA B1 always receives extension 5003 
instead of allowing devices to auto register. Hint: Exploring your running configurations on the routers after you have everything working should provide some hints about how to do this. 
•  Setup a multiuser Packet Tracer configuration and enable calling between your two sites and a 
partner’s two sites 
•  Add a third site and enable calling between all three sites 
•  Add quality of service (QoS) to the network to prioritize voice traffic over data traffic 

Conclusions:
 In this lab, you've learned how to build a lab to make call from site to site by using function CUCME on Cisco router. Specifically, you learned how to create vlan, configure trunk ports and switch ports as well as provide power supply to the IP Phones using PoE on switches. Moreover, you also learned how to configure DHCP, enable VoIP service and create directory numbers (DNs) on each router. Finally, you learned how to configure dynamic routing protocol RIPv2 and dial-peer on each router so we can make call from site to site by using H323 trunk.