02-22-2008 02:44 PM - edited 03-13-2019 05:00 PM
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?
02-26-2008 09:12 AM
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).
02-27-2008 04:17 AM
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 **
02-27-2008 03:39 PM
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.
02-27-2008 03:44 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide