cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
362
Views
0
Helpful
4
Replies

CLI commands in TCL IVR

agonza07
Level 1
Level 1

Is it possible to run CLI commands with a TCL IVR script? For now I want to be able to change a parameter that I pass through to a current IVR script, but as I'm thinking about it, it might be cool to have a TCL IVR script authenticate me and allow me to change a connection type.

"Press one for T1 connection, Press 2 for VPN"

and then have it run config commands based on what option I pick. (Sorry guys, just imagining the possibilities out loud...)

I tried executing the "exec" and "ios_config" commands, but that didn't work.

Anybody have an idea on how I can get it them to run?

4 Replies 4

stephan.steiner
Spotlight
Spotlight

I have no experience with TCL but does the language description mention a way to execute cli commands? If there is no specific command/function to do that, then I'd consider it impossible.

I know that router XML (the limited XML API for Callmanager Express) has a command to execute cli commands, but it is limited to a small number of cli commands (and your example would already be too much).

leighharrison
Level 7
Level 7

Hey there,

If you enter the tcl shell on a router, you'd be able to put in these commands:-

r5#tclsh

r5(tcl)#foreach i {

+>(tcl)#1.1.1.1

+>(tcl)#2.2.2.2

+>(tcl)#} { puts [ exec "ping $i" ] }

This would then put "ping 1.1.1.1" and then "ping 2.2.2.2" on the command line

Hope that helps!

LH

** Please rate all posts **

paolo bevilacqua
Hall of Fame
Hall of Fame

Hi,

TCL/IVR has no support whatsoever for executing CLI commands.

Because I've this need, I'm writing a module that has an IOS TCL (the one related to EEM) http server that listens to requests from a TCL/IVR client and execute command on its behalf.

I'm not done yet with this, but is definitely on my list of to-do things. I will update here once progress is made.

Awesome! Please be sure to let me know on how you got it to work. I wish I could help but I'm very new to scripting on the router side.

Hope to hear from you.

--mando

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: