CLI commands in TCL IVR

Unanswered Question
Feb 22nd, 2008
User Badges:

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
stephan.steiner Tue, 02/26/2008 - 09:12
User Badges:
  • Silver, 250 points or more

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 Wed, 02/27/2008 - 04:17
User Badges:
  • Gold, 750 points or more

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 Wed, 02/27/2008 - 15:39
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    Founding Member

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.

agonza07 Wed, 02/27/2008 - 15:44
User Badges:

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

Actions

This Discussion