MGCP Gateway

I had a need to assign a call pickup group to an FXS port and was not able to accomplish this with an H.323 gateway. In order to accomplish this I had to do the following:

On the IOS voice gateway

mgcp
mgcp call-agent 1.2.3.4 service-type mgcp version 0.1
!
ccm-manager redundant-host 1.2.3.5
ccm-manager mgcp
ccm-manager config server 1.2.3.4
ccm-manager config

Once this is configured the MGCP gateway can be added to the CallManager via Device->Gateways

The configuration is very straightforward and involved selecting the appropriate gateway model and voice interface module(s) and card(s)

One important note on adding the gateway to CallManager: the name of the gateway should be the DNS name of the gateway. (i.e. PSTNGW.domain.com or just PSTNGW if you aren’t using a domain suffix, this name must be the hostname of the gateway) The hostname is configured by the global configuration command “hostname” on the IOS gateway. The domain name is configured using the “ip domain-name domain.com” command.

IP to IP Gateway

Cisco supports a feature they call IP to IP Gateway whereas an incoming VoIP call can be routed to another VoIP endpoint. Without this feature IOS voice gateways were only able to send calls to a VoIP dial-peer or receive a call from a VoIP dial-peer, but not “hairpin” the call back to another VoIP device. This feature was introduced in 12.3(11)T and is supported in either “Advanced Enterprise” or “IP Voice” feature sets and required at minimum a 2601XM router. The configuration of IP to IP gateway is VERY simple.

voice service voip
allow-connections PROTOCOL to PROTOCOL (where PROTOCOL is h323 or sip)
i.e.

voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
Once that is configured you can create the appropriate VoIP dial-peers to route calls.

dial-peer voice 1 voip
description OUTBOUND CALLING TO PROVIDER
destination-pattern T
progress_ind setup enable 3
modem passthrough nse codec g711ulaw
session target ipv4:2.3.4.5
codec g711ulaw
fax-relay ecm disable
no vad
!
dial-peer voice 2 voip
description INBOUND TO CALLMANAGER
huntstop
destination-pattern 5551234567
progress_ind setup enable 3
session target ipv4:1.2.3.4
dtmf-relay h245-signal h245-alphanumeric
codec g711ulaw
fax-relay ecm disable
no vad
Once this is configured on the gateway CallManager needs to be configured to send calls to this device. From the CallManager admin page click Device->Trunk->Add a New Trunk. Select “Inter-Cluster Trunk (Non-Gatekeeper Controlled)” and click Next.
Fill in the appropriate values for Device Pool, Location, etc. (NOTE: Check “Media Termination Point Required” to enable services that are not natively supported by H.323 like hold, transfer, music on hold, etc)

Inbound call routing defines how many digits are presented to CallManager and which Calling Search Space the trunk uses for incoming calls. (NOTE: If more significant digits are used than the DN’s assigned to the phones in CallManager a Translation Pattern needs to be defined to route the calls to the correct phones.
Outbound call routing defines how the calling party (ANI) is presented amongst other things.

Remote Cisco CallManager Information defines the IP address of the gateway that we are connecting to.

POTS dial-peers

I learned an important lesson which becomes all too obvious if you stop to think for a moment. I had setup a Route Pattern in CallManager that pointed to an H.323 gateway. I had created On this gateway I created the appropriate POTS dial-peer pointing to the voice-port I wanted to ring. I noticed however that if the fax machine connected to this voice-port was in use the call routed back to the originating CallManager. I had configured a VoIP dial-peer some time earlier to place outgoing calls from this gateway back to the CallManager. When calls came in and the POTS peer was busy it simply hunted to the next best dial-peer which happened to be the VoIP dial-peer back to CallManager. To correct this all I had to do was add the “huntstop” command to the POTS dial-peer. Once the “huntstop” command was added incoming calls would ring busy if the port was already in use.

Before:

dial-peer voice 100 pots
destination-pattern 5551234567
port 0/1/0

dial-peer voice 200 voip
destination-pattern T
session target ipv4:1.2.3.4

After:

dial-peer voice 100 pots
destination-pattern 5551234567
port 0/1/0
huntstop