How to setup IVR on loopbacked Cisco gateway
Sunday, 30 December 2007

Until recently it was not possible to play IVR prompts on Cisco gateways VoIP leg. New IOS releases allow this to be done under certain circumstances. However, there are still high number of older Cisco AS53xx, AS54xx, 36xx and other NASes around which may be used to play IVR on IP (VoIP) leg using loopbacked PSTN E1 or T1 interfaces. This guide will attempt to explain how to do it.

 

First, make sure there is physical loopback between at least two E1 or T1 interfaces. You should use so called crossover cable which connects receive pin (Rx) with transmit (Tx) and vice versa. Below in example we will use loopback between two E1 interfaces, number 0 and 1.

Configuration is started with lower level, i.e. configuring E1 interfaces:

 

controller E1 0 
 clock source line primary
 pri-group timeslots 1-31
controller E1 1
 clock source line secondary 1
 pri-group timeslots 1-31
 

At this point it is possible to check if physical loopback is connected by issuing:

 
Router#sh controllers E1 0 brief

 

The output should be something like this:

 
E1 0 is up.
   Applique type is Channelized E1 - balanced
   No alarms detected.
   alarm-trigger is not set   Version info of slot 0:  HW: 1, PLD Rev: 11
  Framer Version: 0x8
Manufacture Cookie Info:
 EEPROM Type 0x0001, EEPROM Version 0x01, Board ID 0x4B,
 Board Hardware Version 2.0, Item Number 800-3881-02,
 Board Revision A0, Serial Number 15971285,
 PLD/ISP Version 0.1,  Manufacture Date 28-Oct-1999.
  Framing is CRC4, Line Code is HDB3, Clock Source is Line Primary.
  Data in current interval (478 seconds elapsed):
     0 Line Code Violations, 0 Path Code Violations
     0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
     0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
  Total Data (last 24 hours)
     0 Line Code Violations, 0 Path Code Violations,
     0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
     0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

 

Next we need to assign voice port to each E1 controller:

 
voice-port 0:D
voice-port 1:D

 

Then create ISDN link between both E1 interfaces by setting one of interfaces to "network" mode, i.e. emulating ISDN switch:

 
isdn switch-type primary-net5
interface Serial0:15
 no ip address
 isdn switch-type primary-net5
 no cdp enable
interface Serial1:15
 no ip address
 isdn switch-type primary-net5
 no cdp enable

 

At this point loopback itself should be functional up to ISDN level and we can add other configuration.

To have Radius function properly:

aaa new-model
aaa authentication login default local
aaa authentication login h323 group radius
aaa authorization exec h323 group radius
aaa accounting connection h323 start-stop group radius
aaa session-id common

gw-accounting aaa
radius-server host xx.xx.xx.xx auth-port 1812 acct-port 1813
radius-server key sharedsecret
radius-server vsa send accounting
radius-server vsa send authentication


And to have TCL scripts and IVR prompts loaded from remote TFTP server:

 

call application voice some_tcl_script tftp://xx.xx.xx.xx/path/to/tcl/script
call application voice some_tcl_script language 0 en
call application voice some_tcl_script set-location en 0 tftp://xx.xx.xx.xx/path/to/tcl/ivr/prompts/

 

Finaly add dial peers. Not that we need at least 4 dial-peers:

  1. VoIP incoming (number 1 in example);
  2. PSTN outgoing to loop (number 2 in example);
  3. PSTN incoming from loop , where IVR application is played (number 3 in example)
  4. VoIP outgoing, to terminating carrier or gateway (number 4 in example)
dial-peer voice 1 voip
 description incoming from IP leg
 incoming called-number .T
 session protocol sipv2
dial-peer voice 2 pots
 description outgoing pstn leg to loop via E1 port 2
 destination-pattern .T
 no digit-strip
 port 0:D
 forward-digits all
 prefix 1000
dial-peer voice 3 pots
 description incoming pstn leg from E1 port 0 - ivr application
 application some_tcl_script
 incoming called-number 1000T
 port 1:D
dial-peer voice 4 voip
 description outgoing voip leg
 destination-pattern .T
 session target ipv4:xx.xx.xx.xx

Note to have H.323 call accepted, use

session protocol cisco 

command, and for SIP use

 session protocol sipv2




Digg!Del.icio.us!Slashdot!Technorati!Free social bookmarking plugins and extensions for Joomla! websites! title=