Configure Cisco MGCP

From Yate Documentation
Jump to: navigation, search

Accessing circuits on a Cisco Media Gateway requires configuration in the Gateway (Cisco) and also in the Call Controller (Yate).

IMPORTANT: All Cisco gateways support a single active MGCP Call Agent at a time (although it may have backups).
It is not possible to have multiple controllers each for part of the circuits.   
Therefore for flexibility it is desirable to have several smaller gateways rather than a big one.

Contents

Cisco configuration

Here is a configuration involving two E1 ports, one with signaling and one without.

hostname EXAMPLE-NAME
!
!
! this is the E1 which has the signaling link on timeslot 1 and
! voice for mgcp on timeslots 2-31
controller E1 3/0
 channel-group 0 timeslots 1
 ds0-group 1 timeslots 2-31 type none service mgcp
!
controller E1 3/1
 ds0-group 1 timeslots 1-31 type none service mgcp
!
voice-port 3/0:1
 compand-type a-law
!
voice-port 3/1:1
 compand-type a-law
!
mgcp
mgcp request timeout 10000
mgcp call-agent a.b.c.d 2727 service-type mgcp version 0.1
mgcp restart-delay 5
mgcp sgcp disconnect notify
mgcp sgcp restart notify
mgcp package-capability dtmf-package
mgcp package-capability rtp-package
!
mgcp profile default

In the example above one E1 trunk is configured for SS7 signaling (on timeslot 1) and MGCP controlled voice on the remaining timeslots 2 to 31. The second E1s is used only for voice.

For a T1 controller the timeslots of each port are in range 1 to 24 but otherwise the configuration is similar.

Normally the G.711 A-Law compander is used on E1 trunks while mu-Law is used on T1. The MGCP protocol should set that automatically but please set a sensible default.

The name of each controller depends on the board and port location. 3/0 means port number zero (that is, first) of board in slot number three.

Replace a.b.c.d 2727 with the IP and port of the Yate Call Controller.

IMPORTANT: The name of the router is used in the host part of the MGCP Endpoint Identifier. You cannot set an override for MGCP only.

You may experience RTP timeouts that cause the MGCP gateway to disconnect the call too early while still ringing. The solution depends on the IOS version and the DSP cards.

You can try to add the following to your configuration:

mgcp rtp unreachable timeout 10000
!
gateway
 timer receive-rtcp 24
 timer receive-rtp 1200

On some IOS versions the receive-rtcp setting is ignored (the default is 5) and the timeout will happen at 5 * RTCP reporting interval. A workaround is to set the reporting interval to a larger value:

ip rtcp report interval 24000

You can tell if you need this workaround by checking what the completion help indicates in configuration mode. If it says "available for h323/sip only" you need to apply the workaround:

Cisco#configure terminal
Cisco(config)#gateway
Cisco(config-gateway)#timer ?
 receive-rtcp  configure RTCP receive timer- available for h323/sip only at this time
 receive-rtp   configure absolute RTP receive timer in seconds

Yate configuration

In Yate you will need one or more sections in mgcpca.conf plus some global engine settings:

[engine]
request_ack=no
send_provisional=no
;port=2727
;address=0.0.0.0

[endpoint]
; defaults are OK

[gw TRUNK_1]
host=EXAMPLE-NAME
user=S3/DS1-0/2
version=MGCP 0.1
;address=w.x.y.z
;port=2427
voicechans=2-31
offset=2
forward_rtp=yes
;forward_sdp=yes

[gw TRUNK_2]
host=EXAMPLE-NAME
user=S3/DS1-1/1
version=MGCP 0.1
;address=w.x.y.z
;port=2427
voicechans=1-31
offset=1
forward_rtp=yes
;forward_sdp=yes

In the engine section it is possible to change the MGCP Call Agent port from the default of 2727. In case you need to bind to a specific local address (on the Yate machine) it can be specified there too. It is not possible to bind to more than one address and one port.

For each trunk the section name must start with gw, a space and the trunk name as referred from the call controller voice= setting in ysigchan.conf:

[SOME NAME]
type=ss7-isup
voice=TRUNK_1,TRUNK_2

The user part of the Endpoint Identifier must be set according to the controlers in Cisco. For E1 or T1 it is of the form:
S<SLOT>/DS1-<PORT>/<TS>

  • <SLOT> is the number of the slot in which the controller is located (1-3 for AS 5400, 1-7 for AS 5350)
  • <PORT> is the number of the port on board (0-3 for 4xE1/T1, 0-7 for 8xE1/T1, 0-27 for T3 cards)
  • <TS> is the first voice timeslot (1-31 or 1-24)

The voicechans setting must match the voice timeslots. For each entry in range a voice circuit is created.

For each trunk you should specify the IP address of Cisco (the w.x.y.z) so Yate doesn't have to wait a RSIP message. You may also specify the port if it's not the default 2427.

The forward_rtp setting allows a setup where RTP media is sent directly between the Media Gateway and the other endpoints, be them other gateways or SIP devices. This is very desirable for traffic but pay attention that Cisco gateways' RTP does not deal with NAT.

The forward_sdp setting enables the entire SDP of the MGCP connection to be passed unchanged. This allows using non-standard features but prevents any manipulation of the RTP session like limiting the codecs.

Other configuration steps

Other documentation

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers