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.




No comments:

Post a Comment