Cisco TCL script base commands

Run script

!define where the scripts will be stored
event manager directory user policy flash:
OR create a folder “eempolicy” in flash and store them in there
event manager directory user policy flash:/eempolicy/
NOTE: The above cmd dose NOT check that the folder “flash:/eempolicy/” is valid

Load script
copy tftp:// flash:
Register script
event manager policy rtpstreams.tcl
when change made them after you reload the script you need to re-register it is well
no event manager policy rtpstreams.tcl
event manager policy rtpstreams.tcl

Run it using
tcls flash:sipcount.tcl
tcls source flash:sipcount.tcl
event manager run sipTrunk.tcl


debug event manager detector ? !turn on debug for an event that your wrtiting the script for
debug event manager action cli


router#show event manager history events !see if a script has been excecuted
router#show processes cpu | include Tcl !show tcl scripts been currently executed
router#show event manager statistics detector
router#show event manager version

code snippets
!pass a command to cli that requires it to be confirm eg. clear logging or clear counters
action 80.0 cli command "clear logging" pattern "confirm"
action 81.0 cli command "y"

Tags: , ,

About Alexis Katsavras

Working as Freelance Cisco Unified Communications Consultant in the UK.