Home » Voip Service

Gateway Configuration For EWI VOIP services

4 April 2012 No Comment

Cisco H.323 Gateway Configuration Example

The configuration of H.323 gateway below include only generic commands needed for VoIP activity and not consider internetworking configuration.

Example of the Cisco gateway configuration for ISDN connection


!— Purpose: Configuration of H.323 gateway using ISDN connection

  • gw# configure terminal
    !— Enters voice service configuration mode and specifies
    !— a voice encapsulation type as Voice over IP (VoIP) encapsulation.
    !— Voice service configuration mode is used for packet Telephony service
    !— commands that affect the gateway globally.
  • gw(config)# voice service voip
  • gw(conf-voi-serv)#h323
  • gw(conf-voi-serv)#exit
    !— Setting up multiple codecs for usage in dial-peer
  • gw(config)# voice class codec 1
  • gw(config-class)# codec preference 1 g729r8
  • gw(config-class)# codec preference 2 g723r53
  • gw(config-class)# codec preference 3 g723r63
    !— Set the timeout to 5 seconds.
    !— Forces the H.323 gateway to use Fast Connect procedures.
  • gw(config-class)#voice class h323 1
  • gw(config-class)# h225 timeout tcp establish 5
  • gw(config-class)# call start fast
  • gw(config-class)#exit
    !— Enters controller configuration mode.
    !— Change the framing format.
    !— Configures the PRI group for E1 to carry voice traffic, available time slots are from 1 through 31.
  • gw(config-class)#controller E1 0
  • gw(config-class)# framing NO-CRC4
  • gw(config-class)# pri-group timeslots 1-31
    !— Enters interface configuration mode and specify the D-channel interface, the D-channel number, use: 0:15 on an E1 PRI
    !— Specify not use IP address.
    !— Specify encapsulation type.
  • gw(config)#interface Serial 0:15
  • gw(config-if)# no ip address
  • gw(config-if)# encapsulation <hdlc|ppp>
    !— Selects a service provider switch type that accommodates PRI
    !— Configure the Layer 2 and Layer 3 port protocol emulation.
    ! — Incoming voice calls will be treated as voice calls
    !— Disable CDP protocol on interface.
  • gw(config-if)# isdn switch-type <providers ISDN type>
  • gw(config-if)# isdn protocol-emulate <user|network>
  • gw(config-if)# isdn incoming-voice voice
  • gw(config-if)# no isdn outgoing display-ie
  • gw(config-if)# no cdp enable
  • gw(config-if)# exit
    !— Enters interface configuration mode for ISDN connection.
  • gw(config)#voice-port 0:15
    !— Configure call leg for POTS
  • gw(config)#dial-peer voice 1 pots
  • gw(config-dial-peer)#destination-pattern <customer pattern>
  • gw(config-dial-peer)#direct-inward-dial
  • gw(config-dial-peer)#port 0:15
    !— Configure call leg for VoIP
  • gw(config-dial-peer)#dial-peer voice 11 voip
  • gw(config-dial-peer)# destination-pattern <customer pattern>
  • gw(config-dial-peer)# voice-class h323 1
  • gw(config-dial-peer)# session target ipv4:216.206.188.216
  • gw(config-dial-peer)# dtmf-relay h245-alphanumeric
  • gw(config-dial-peer)#exit
    !— Configure router as gateway
  • gw(config)#gateway
  • gw(config)#Ctrl-Z
    !— Save your configuration at NVRAM
  • gw# copy running-config startup-config

Example of the Cisco gateway configuration for FXO/FXS connection


!— Purpose: Configuration of H.323 gateway using FXO/FXS connection

  • gw# configure terminal
    !— Enters voice service configuration mode and specifies
    !— a voice encapsulation type as Voice over IP (VoIP) encapsulation.
    !— Voice service configuration mode is used for packet Telephony service
    !— commands that affect the gateway globally.
  • gw(config)# voice service voip
  • gw(conf-voi-serv)#h323
  • gw(conf-voi-serv)#exit
    !— Setting up multiple codecs for usage in dial-peer
  • gw(config)# voice class codec 1
  • gw(config-class)# codec preference 1 g729r8
  • gw(config-class)# codec preference 2 g723r53
  • gw(config-class)# codec preference 3 g723r63!— Set the timeout to 5 seconds.
    !— Forces the H.323 gateway to use Fast Connect procedures.
  • gw(config-class)#voice class h323 1
  • gw(config-class)# h225 timeout tcp establish 5
  • gw(config-class)# call start fast
  • gw(config-class)#exit
    !— Voice port 1/0 example configuration.
  • gw(config)# voice-port 0/1/0
  • gw(config-if)# input gain 7
  • gw(config-if)# output attenuation 0
  • gw(config-if)# echo-cancel coverage 16
  • gw(config-if)# cptone <country code>
  • gw(config-if)# timeouts interdigit 4
  • gw(config-if)# timeouts call-disconnect 1
  • gw(config-if)# timeouts ringing 6
  • gw(config-if)# timeouts wait-release 1
  • gw(config-if)# timing hookflash-out 50
  • gw(config-if)# timing guard-out 500
  • gw(config-if)# impedance 900c
  • gw(config-if)# station-id name <customer name>
  • gw(config-if)# station-id number <customer number>
  • gw(config-if)# caller-id enable
  • gw(config-if)# supervisory disconnect dualtone mid-call
  • gw(config-if)# no battery-reversal
    !— Voice port 1/0 example configuration.
  • gw(config)# voice-port 0/1/1
  • gw(config-if)# input gain 7
  • gw(config-if)# output attenuation 0
  • gw(config-if)# echo-cancel coverage 16
  • gw(config-if)# cptone <country code>
  • gw(config-if)# timeouts interdigit 4
  • gw(config-if)# timeouts call-disconnect 1
  • gw(config-if)# timeouts ringing 6
  • gw(config-if)# timeouts wait-release 1
  • gw(config-if)# timing hookflash-out 50
  • gw(config-if)# timing guard-out 500
  • gw(config-if)# impedance 900c
  • gw(config-if)# station-id name <customer name>
  • gw(config-if)# station-id number <customer number>
  • gw(config-if)# caller-id enable
  • gw(config-if)# supervisory disconnect dualtone mid-call
  • gw(config-if)# no battery-reversal
    !— Configure call leg for POTS
  • gw(config)#dial-peer voice 1 pots
  • gw(config-dial-peer)#destination-pattern <customer pattern>
  • gw(config-dial-peer)#port 0/1/0
    !— Configure call leg for VoIP
  • gw(config-dial-peer)#dial-peer voice 11 voip
  • gw(config-dial-peer)# destination-pattern <customer pattern>
  • gw(config-dial-peer)# voice-class h323 1
  • gw(config-dial-peer)# session target ipv4:216.206.188.216
  • gw(config-dial-peer)# dtmf-relay h245-alphanumeric
  • gw(config-dial-peer)#exit
    !— Configure router as gateway
  • gw(config)#gateway
  • gw(config)#Ctrl-Z
    !— Save your configuration at NVRAM
  • gw# copy running-config startup-config

Example of the Cisco access list

The access list rules below deny TCP connections to ports 1720 and 5060 for all addresses other than the HostedSwitch® IP Address. They also deny UDP connections to port 5060 for all IP addresses.

Create access list rules

  • gw# configure terminal
  • gw(config)# access-list 101 permit tcp host <HostedSwitch® IP address> any eq 1720
  • gw(config)# access-list 101 permit tcp host <HostedSwitch® IP address> any eq 1719
  • gw(config)# access-list 101 permit udp any any gt 1024
  • gw(config)# access-list 101 deny tcp any eq 1720
  • gw(config)# access-list 101 deny udp any eq 5060
  • gw(config)# access-list 101 deny tcp any eq 5060
  • gw(config)# access-list 101 permit tcp any any
  • gw(config)# Ctrl-Z
  • gw#

Apply access list rules

  • gw# configure terminal
  • gw(config)# interface <interface name>
  • gw(config-if)# ip access-group 101 in
  • gw(config-if)# Ctrl-Z

Comments are closed.