کد:
http://ciscoconfigs.net/index.php?option=com_content&task=view&id=25&Itemid=26

This configuration snippet shows how to setup a voice gateway using MGCP with a PRI circuit from the telco. Remember that for
MGCP PRI circuits, the signaling channel is backhauled to callmanager.


# This configuration was taken from an ISR 2821 running 12.3(14)T2 Adv IP Svs It is always a good idea to check with TAC
# to see what they recommend as the latest stable version of code for this application.

# I always like debug and log informatio to show the actual date and time and it is also good security practice to make sure
# password-encryption is turned on

service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption

hostname Voice-GW-Rtr


# We need tp specify which wic or vwic cards will participate in the clocking domain as well as select a preference order
# for where we will pull the router's clock source from. In this case there is only one circuit so we set wic slot 0 to participate
# and then select it with a priority of 1 stating that this is our primary clock source.

network-clock-participate wic 0
network-clock-select 1 T1 0/0/0
no aaa new-model
ip subnet-zero

ip cef

no ip domain lookup
ip domain name ciscoconfigs.net


# The circuit provider will have to provide you with the correct ISDN switch-type that they are using and here we set
# it as primary-ni which is pretty common in my area.

isdn switch-type primary-ni

# The next statement is basically stating that we will not be using DSP resources for conferencing, transcoding or
# as an MTP.

voice-card 0
no dspfarm

# The following command allows the voice path to be established in both directions when the RTP channel is opened

voice rtp send-recv

# The following statements are needed to ensure that fax pass-through and modem pass-through are sent with the
# G.711 codec.

voice service voip
fax protocol pass-through g711ulaw
modem passthrough nse codec g711ulaw


# The following lines control how this router communicates with CallManager using MGCP . The simple arguement
# of MGCP enables the router to communicate via MGCP to CallManager. The fallback-mgcp statement allows the router
# to establish an mgcp session with a redundant CallManager in order to take over processing if the primary CallManager
# fails. Use the redundant-host command to define the backup CallManager. By default the fax protocol is set to cisco
# so we want to turn that off in order to allow fax pass-through to occur. We need to specify music-on-hold in order to
# allow multicast MOH on the MGCP gateway. The config server ip address statement defines the IP address of the
# CallManager TFTP server from which this MGCP gateway will tftp its MGCP configuration from. Finally we need to
# specify config, in order to actually enable the MGCP configuration downloads from CallManager.

ccm-manager fallback-mgcp
ccm-manager mgcp
ccm-manager redundant-host 172.16.1.10
no ccm-manager fax protocol cisco
ccm-manager music-on-hold
ccm-manager config server 172.16.1.11
ccm-manager config


# The router has a vwic-1mft card that will be used to terminat the PRI voice circuit from the provider.
# Default framing and linecoding has been defined per carrier specs.
# We then create a pri-group with all 24 channels and need to specify the that it is using the service of mgcp
# This command will then create the serial0/0/0:23 interface which we will see further down in the config.

controller T1 0/0/0
framing esf
linecode b8zs
pri-group timeslots 1-24 service mgcp


# This router has 2 Gigabit Ethernet interfaces. We used the first one for Data and the second one
# for voice. Note there is a dhcp server on the data segment therefore we need to provide the helper-address
# on the voice side so the dhcp broadcast can be forwarded to the dhcp server.


interface GigabitEthernet0/0
description Data Vlan
ip address 10.1.1.1 255.255.255.0
duplex full
speed 1000

interface GigabitEthernet0/1
description Voice Vlan
ip address 172.16.1.1 255.255.255.0
ip helper-address 10.1.1.10

# Here is the interface that was created when we defined the pri-group. This is where the voice calls go
# in and out. We specify the isdn switch-type per the carrier specifications. We need the
# isdn incoming-voice voice statement to ensure that the calls will be handled as voice as passed off to
# a DSP (Digital Signal Processor). In order to configure the PRI signalling channel to be backhauled to
# CallManager we need to add the bind-l3 ccm-manager statement. This is needed for MGCP
# PRI voice gateways.

interface Serial0/0/0:23
no ip address
isdn switch-type primary-ni
isdn incoming-voice voice
isdn bind-l3 ccm-manager



ip classless
ip route 0.0.0.0 0.0.0.0 10.1.1.254


ip http server
ip http authentication local
ip http secure-server
ip http timeout-policy idle 600 life 86400 requests 10000


control-plane


# Prior to 12.3(14)Tx, not sure which specific one, this was needed to make sure that calls were not rejected when the dial
# peer did not have valid voice application. In this case it lets us roll back to a pre-loaded application called DEFAULT which
# handles basic call processing on the port. Although I am not 100% sure of this I believe this is needed in order to be
# able to roll back to h.323 call processing if there is an MGCP outage, i.e. can't connect to callmanager and you need
# SRST to kick using h.323 dial peers.

call application alternate DEFAULT

# Set up a local username for administrative access

username admin privilege 15 secret ciscoconfigs


# This is voice port that was dynamically created when we created the PRI-GROUP on the controller interface.

voice-port 0/0/0:23


# Finally all of the MGCP statements.
# First we turn mgcp on then we define who the call agent is. i.e. in most cases callmanager. The version type is just
# reference to different RFC versions for compatibility. Port 2427 is the default port for version 0.1.
# dtmf-relay is turned on to ensure forwarding of the digits through the compressed codecs.
# Default modem passthrough command
# The packages define what capabilities the mgcp gateway will support. This is the default set we typically use and
# works in most cases. The mgcp fax t38 is disabled by default. This is no longer true in IOS 12.4T or later.
# The sdp mode is set to simple.
# The rtp payload type is used to ensure backward compatibility if talking with an older gateway.
# The bind commands force the media and control packets to be sourced with the ip address on the
# associated gateway. You want to make this the IP address of the interface on the voice network. This way
# you know what it is.

mgcp
mgcp call-agent 172.16.1.11 2427 service-type mgcp version 0.1
mgcp dtmf-relay voip codec all mode out-of-band
mgcp rtp unreachable timeout 1000 action notify
mgcp modem passthrough voip mode nse
mgcp package-capability rtp-package
no mgcp package-capability res-package
mgcp package-capability sst-package
no mgcp package-capability fxr-package
mgcp package-capability pre-package
no mgcp timer receive-rtcp
mgcp sdp simple
mgcp fax t38 inhibit
mgcp rtp payload-type g726r16 static
mgcp bind control source-interface GigabitEthernet0/1
mgcp bind media source-interface GigabitEthernet0/1

mgcp profile default



# In this scenario, only one dial peer is needed. The key statement here is application mgcpapp, which
# tells the dial peer that it is controlled by MGCP. The incomin called-number . command will ensure that
# all incoming calls will match this dial peer. We disabled the fax rate since we are using fax pass-through.
# Since we had DID service we need to specifiy the direct-inward-dial command so the router will use the
# called number to match the destination pattern for the call. Finally we assign the PRI data channel as
# the port for this dial-peer.

dial-peer voice 1 pots
application mgcpapp
incoming called-number .
fax rate disable
direct-inward-dial
port 0/0/0:23



# Configured the console and the virtual terminal ports to accept a loing by authenticating against
# the local user database.

line con 0
login local
line aux 0
line vty 0 4
privilege level 15
login local
transport input telnet ssh


# It is always good to have a time server configured so all of your network devices will have the correct
# time. This is important when trying to correlate events between devices and logs.

ntp server 10.1.1.100

end






موضوعات مشابه: