1. How to Configure TCL-IVR Application on Router
Steps to Configure TCL application on Router:
i) Load the script into flash or onto TFTP server
ii) Load the prompts into flash or onto TFTP server
iii) Define application and initial parameter values
(config-app)# service sample_script flash:sample_script.tcl
(config-app-param)# param clid1 4001
(config-app-param)# param clid2 4002
2. How to Associate TCL-IVR Application with a dial peer
(config)#dial-peer voice 90 pots
3. How to Reload TCL-IVR Application on Router
(config)# call application voice load sample_script
4. How to View the Content of a specific script
show call application voice sample_script
5. How to verify if an application is bound to a dial peer
show dial-peer voice 90
6. How to debug TCL-IVR Applications
You can view debugging information applicable to the Tcl-IVR Applications that are running on the router. debug voip application command allows you to specify the type of debug output you want to view. To view debug output, enter the following command in privileged-exec mode:
debug voip application states
debug voip application script
debug voip application tclcommands
debug voip application callsetup
debug voip application digitcollect
debug voip application error
7. How to List Active Sessions
show call application sessions
If any sessions are active, they can be stopped with below command.
call application session stop id XX
8. How Start Tcl-IVR Application from CLI instead of via a new call
call application session start sample_script
9. How to overwrite existing audio files in router RAM/cache.
You can use the audio prompt load command to erase the audio file in router RAM/cache.
audio-prompt load flash:enter_pin.au
In the above example, if you have rerecorded the audio file enter_pin.au and loaded in flash then enter the above command after loading the audio file in flash. This command avoids reloading of router to effect the new audio file.
10. How to make IVR load the audio files from its original location rather than from cache while playing media.
There is a way in which you can always say the router to load the audio file every time from the respective location rather than storing it in cache/RAM. But this one puts some load on router CPU/performance as every time it reads the file freshly.
ivr prompt memory 128 ==> 128 is the least amount of memory allocated to cache, so no audio file be cached
11. How to record the audio received on the incoming or outgoing call leg
The media record command records the audio received on the specified call leg and saves it to the location specified by the URL.
media record leg_incoming -p recInfo flash:call_in.au
media record leg_outgoing -p recInfo flash:call_out.au
12. Ring back tone not heard on IVR that is placed on the incoming POTS leg.
Ring back is automatically generated by DSP when IVR is in the process of dialing the DNIS number. However if the IVR has issued "leg setup" API without referencing the leg ID, then ring back tones won't get generated.
leg setup $dnis callInfo leg_incoming >>>>>> generates ring back tone to the caller
leg setup $dnis callInfo >>>>>> doesn't generate ring back tone
13. Dial tone not played from the IVR.
IVR used "playtone leg_incoming tn_dial" API to play dial tone to the caller. It didn't work as the IVR was placed on the incoming VoIP leg. Playtone API won't work in the incoming VoIP leg as it needs DSP to generate the tones. In case of VoIP, we don't have DSP. So it is required to prepare an audio file playing dial tone and use it with "media play" API.
14. Unable to hear the audio prompt in the VoIP leg, but worked well with POTS leg.
IVR application placed on the incoming POTS leg played the media well, however the same application placed on the incoming VoIP leg played media which is not heard. The GW traces for both the call shows the media played well but caller not hearing the prompt only with VoIP leg.
The issue is IVR application didn't use "leg connect leg_incoming" API apart from other call initializing API's like "leg setupack and leg proceeding". This won't create issue with POTS leg, but for IVR on VoIP leg that plays media, make sure the call is connected using "leg connect" API.
15. How to set "" as starting pattern for "leg collectdigits".
set pattern(1) "
leg collectdigits $legID params pattern
16. How to fetch SIP Headers in TCL-IVR Application
Configure "header-passing" CLI as provided below,
Router(config)#voice service voip
Use infotag get evt_proto_headers and infotag get leg_proto_headers Commands to fetch SIP headers.
17. How to execute Blind Transfer with TCL-IVR application.
Set the callInfo mode and reroute mode as REDIRECT_ROTARY
set callInfo(mode) REDIRECT_ROTARY
set callInfo(rerouteMode) REDIRECT_ROTARY
leg setup $dnis callInfo leg_incoming
18. How to add GTD field to outgoing INVITE.
In the leg setup use callInfo as callInfo(Content-Type) "application/gtd"
Also, add the following config under "voice service voip" mode.
Router(config)#voice service voip
Router(conf-voi-serv)#signaling forward unconditional
19. How to make the dial-peer selection based on the carrierID.
set callInfo(targetCarrierID) YoLlamoGlobal
dial-peer voice 20 pots
carrier-id target YoLlamoGlobal
20. Access or execute IOS commands inside TCL- IVR script
Not like EEM, TCL- IVR API cannot execute IOS command inside the script.