Use of gset in CSM TCL Script

Hello,
I am trying to write a TCL script on a CSM (Code Ver 4.1) that retains the value of a variable between probe instances (so I can increment and check a variable in each probe attempt). Looking at the documentation there is supposed to be a 'gset' command that does this but cannot make this work.
The example says 'gset var 1 ; incr var'.
I have several problems with this:
1. I would think that this would set the value of var to 1 each time it runs and then increment it (maybe)
2. How can I read the value of the persistent variable without it causing an error if it doesn't exist?
3. It doesn't seem to work anyway as var doesn't appear in the Persistent Variables section of 'show mod csm x tech script'
Any ideas on this or on where I can get some examples where the gset command is used?
Many Thanks
LP

it works for me:
I just added the gset and incr commands to the echo probe and it I do see the counter increasing.
gset counter 1
# parse cmd line args and initialize variables
puts "initializing variable 2"
set EXIT_MSG "Error config: script ECHO_PROBE "
incr counter
puts "Counter: $counter"
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.48:21: opening socket
ECHO_PROBE_SCRIPT:192.168.30.48:21: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.48:21: receiving response
ECHO_PROBE_SCRIPT:192.168.30.48:21: closing socket
ECHO_PROBE_SCRIPT:192.168.30.48:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
initializing variable 2
Counter: 7
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.24:7: opening socket
ECHO_PROBE_SCRIPT:192.168.30.24:7: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.24:7: receiving response
ECHO_PROBE_SCRIPT:192.168.30.24:7: closing socket
ECHO_PROBE_SCRIPT:192.168.30.24:7: probe success
initializing variable 2
Counter: 7
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.24:21: opening socket
ECHO_PROBE_SCRIPT:192.168.30.24:21: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.24:21: receiving response
ECHO_PROBE_SCRIPT:192.168.30.24:21: closing socket
ECHO_PROBE_SCRIPT:192.168.30.24:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
initializing variable 2
Counter: 8
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.48:7: opening socket
ECHO_PROBE_SCRIPT:192.168.30.48:7: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.48:7: receiving response
ECHO_PROBE_SCRIPT:192.168.30.48:7: closing socket
ECHO_PROBE_SCRIPT:192.168.30.48:7: probe success
initializing variable 2
Counter: 8
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.48:21: opening socket
ECHO_PROBE_SCRIPT:192.168.30.48:21: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.48:21: receiving response
ECHO_PROBE_SCRIPT:192.168.30.48:21: closing socket
ECHO_PROBE_SCRIPT:192.168.30.48:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
initializing variable 2
Counter: 8
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.24:7: opening socket
ECHO_PROBE_SCRIPT:192.168.30.24:7: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.24:7: receiving response
ECHO_PROBE_SCRIPT:192.168.30.24:7: closing socket
ECHO_PROBE_SCRIPT:192.168.30.24:7: probe success
initializing variable 2
Counter: 8
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.24:21: opening socket
ECHO_PROBE_SCRIPT:192.168.30.24:21: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.24:21: receiving response
ECHO_PROBE_SCRIPT:192.168.30.24:21: closing socket
ECHO_PROBE_SCRIPT:192.168.30.24:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
initializing variable 2
Counter: 9
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.48:7: opening socket
ECHO_PROBE_SCRIPT:192.168.30.48:7: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.48:7: receiving response
ECHO_PROBE_SCRIPT:192.168.30.48:7: closing socket
ECHO_PROBE_SCRIPT:192.168.30.48:7: probe success
initializing variable 2
Counter: 9
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.48:21: opening socket
ECHO_PROBE_SCRIPT:192.168.30.48:21: sending resquest string
ECHO_PROBE_SCRIPT:192.168.30.48:21: receiving response
ECHO_PROBE_SCRIPT:192.168.30.48:21: closing socket
ECHO_PROBE_SCRIPT:192.168.30.48:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
initializing variable 2
Counter: 9
Script start
this is a csm echo request
ECHO_PROBE_SCRIPT:192.168.30.24:7: opening socket

Similar Messages

  • CSM TCL script or http checksum

    Hello,
    I need to do some HTTP keepalive based on the http page itself (no error code returned by the server).
    With the CSS we were able to do it because the css was doing a checksum of the http page. So when there was changes the service was considered to be down.
    I have not seen a similar option with the CSM so it is why I am looking for a tcl script that get the page and look for a regexp in it.
    I am having some trouble seeing the service up :( so I don't know if my script is good. I see that it is doing the http get on the server but it does not seem to succeed doing the regexp match...
    Here is my script :
    # !name = HTTP_TEST
    # get the IP address of the real server from a predefined global array csm_env
    set ip $csm_env(realIP)
    set port 80
    set url "GET /supervision/test.jsp"
    # Open a socket to the server. This creates a TCP connection to the real server
    set sock [socket $ip $port]
    fconfigure $sock -buffering none -eofchar {}
    # Send the get request as defined
    puts -nonewline $sock $url;
    # Wait for the response from the server and read that in variable line
    set line [ read $sock ]
    # Parse the response
    if { [ regexp "BD \+ SA OK.*\<BR\>Gateway OK.*\<BR\>Gateway2 OK" $line ] } {
    exit 5000
    } else {
    exit 5001
    And the regexp should be looking for :
    BD + SA OK
    <BR>Gateway OK
    <BR>Gateway2 OK
    any help is welcome !
    Thanks

    This URL should help you:
    http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_feature_guide09186a00801a75a7.html

  • Cannot generate IP using TCL script

    I'm trying to pull in a customized PCIe block from a .xci file using my TCL script with Vivado 2015.2 on Ubuntu 12.04.  I then want to generate all the IP output products and run through the entire design flow (to eventually generate a bitfile).  When I try to call create_fileset on my PCIe IP, I get the following error:
    ERROR: [Vivado 12-3563] The Nested sub-design '/home/coreyolson/workspace/build/EX850_GUPS/EX850_GUPS.srcs/sources_1/ip/pcie3_ultrascale_0/ip_0/pcie3_ultrascale_0_gt.xci' can only be generated by its parent sub-design.
    I'm attaching my vivado log file, which hopefully will provide some insight into the problem...

    I'm not well versed in TCL, It seems the prob in the SIP sessions. Can u enable PRACK on the Dial peer and the SIP profile associated SIP trunk and chk. U can enable by folowing the below steps.
    CUBE
    dial-peer level:
                                  dial-peer voice XXXX voip
                  voice-class sip rel1xx require 100rel
    CUCM
                   Device -> Device settings -> Sip profile -> Trunk Specific Configuration
                                  SIP Rel1XX Options Required Field : Send Prack if 1xx contains SDP
    Thx
    M

  • Using a (tcl) script as source of data for VI

    hi,
    novice here, under a deadline.
    we would like to display data coming from running a shell script. the data is a stream of lines, each with a datapoint as a floating point number.
    bash$ ./my.tcl
    12.5
    15.2
    18.3
    17.2
    14.3
    the first tutorial, with a waveform graph and a stop button is what the display should look like (we'll enhance it later).
    for input, though, instead of getting a simulated sine signal, we would like to read the output of the my.tcl script.
    we found one example, but it calls wish (the tcl interpreter), once and it ends. we need to read a stream continuously.
    all this under labview 8.5 for linux (under centos 4, if that matters).
    we want to get the basics going. so that is the basic question.
    later, once the basics are working, we would like to split what comes out of the script in channels.
    the script will spit this out, e.g.:
    port0: 10.2
    port0: 11.3
    port1: 11.2
    port0: 13.4
    port1: 15.2
    you get the idea. multiple channels will be bundled in the standard output and they will need to be demultiplexed. they may come in in bursts (e.g. three readings at a time from port 0, two from port one, ...etc.).
    we have some amount of control as to what the output of the script looks like.
    we just got started two days ago with labview, and it's cool. however, connecting it to read from the external world in the way that it exists now is what we have not been able to do yet.
    any help will be deeply appreciated, as we adopted this solution after dumping the atteempt to use tcl as the front end view, since we would like to do more sophisticated things down the road and labview is great for that.
    thanks in advance!
    carlos

    You need to do that with pipes.
    There is some code to do that (OGPipes) but it was never finished (as far as
    I know). I recently used it, but it has only support windows. Not much
    helpful for you...
    What I get from the Linux resources on the web, pipes are a lot easier to
    implement then under windows. I might need to do this in a few weeks myself,
    but don't have a Linux machine at the moment. Making a library wrapper in C
    is probably the easiest way, altough you should be able to call the Linux
    libraries for pipes directly from LabVIEW.
    Regards,
    Wiebe.

  • Using EEM and TCL scripts for voice

    HI all,
    I'd like to use eem to check Sip dial-peer status+interface BRI status, when sip dial-peer has no answer to invite and bri interface is down the LAN interface must be shutted down. Is it possible to avhieve it using eem? I didn't find anything for eem monitoring sip dial-peers...
    thanks
    Massimiliano

    EEM doesn't have any ability to control the data plane currently.  Therefore, there is no direct voice tie-in.  There is a way to do Tcl scripting of some voice operations (e.g. IVR scripts), but those do not relate to EEM.
    That said, if there are some show commands which provide you the data you need, you can create an EEM timer policy (i.e. one that runs periodically), parsers the show command output, and takes further action if the output contains certain patterns.  Depending on the version of IOS, this may require an EEM Tcl script, or you may be able to do it within an EEM applet.
    If you need further assistance, you will need to provide your IOS version, and the exact commands (and output) which would tell you if the SIP peer isn't getting an answer and the BRI interface is truly down (I'm imagining something like "show isdn status" for this one).
    Please support CSC Helps Haiti
    https://supportforums.cisco.com/docs/DOC-8895
    https://supportforums.cisco.com

  • Simultaneous tcl script probes on csm-s

    Hi there,
    is there anybody who kows how many simultaneous tcl script probes can run on the csm-s ?
    I know that i can only open 255 simultaneous sockets. when i have one connection(open socket) per script, there should be only 255 probes that can be run Simultaneously.
    is that right ?
    Thanks a lott.
    Bye Dirk

    gdufour-cat6k1#show mod csm 5 tech probe
    Software version: 4.1(5)
    ------------------ Health Monitor Statistics -----------------
    Probe templates: 0
    Suspects created: 0
    Open Sockets in System : 8 / 240
    Active Suspect(no ICMP): 0 / 200
    Active Script Suspect : 0 / 50
    Num events : 0
    This command gives you how many socket/script task are running and the limit.
    So, only 50 scripts.
    Gilles.

  • Router Crashs when using EEM(TCL script)

    I wrote a TCL script to deal with my  dual-link router, but the script running for some time will case the router crash.Could you help me for this?
    Is there some problem with my script ?Thank you!
    Routers :CISCO2821
    IOS vesion:12.4(15)T8

    This looks like CSCsv52332.  This bug is fixed in 12.4(15)T10.

  • Custom tcl scripts

    Hello,
    For one of my customer, I have to write two csm probes:
    - One that connects on tcp port 6200, sends the following message "test\\n" and verifies that the answer is "UP"
    - Another that checks if ICAP is working or not. To test this, I need to write a probe that makes an "OPTION" ICAP request.
    Is it something possible ? If yes, where can I find some guidelines.
    Thanks

    simply go to the CSM software download page and get the TCL scripts file (*.tcl)
    Edit the file and should have many examples to use. For your probe #1, you could reuse the echo_probe that sends a line and check the response from the server.
    For the 2nd probe, you should probably get more info on how the "option" request works and what response to expect.
    This is however definitely possible to do.
    Gilles

  • TCL scripting

    st1\:*{behavior:url(#ieooui) }
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    Network Scenario:
    We have a Client-Server enterprise network, and nature of servers is to broadcast some stats/info to all the clients.
    We are using two 6509-E at core with HSRP to provide the redundancy for servers. I have attached the network layout (not the real one) with some description with this thread. On both switches we have configured “ip helper-addresses” to forward the broadcast to multiple destinations(different VLANs). Every thing is working fine with respect to HSRP.
    Problem:
    Under normal circumstances, both ACTIVE and STANDBY hsrp switches generates broadcast which causing duplication of every broadcast packet and Client end receiving every packet twice. Cisco already claimed that standby switch will forward the broadcast. As an alternate TAC has advised to use the TCL script as a work around which we attempted to however no success at the end.
    Please let me know if some one can help me in modifying TCL script.
    ::cisco::eem::event_register_syslog occurs 1 pattern .*STANDBY.*STATECHANGE.* maxrun 90
    # EEM policy used to detect an HSRP state change. Once change is detected, analize the
    # type of change and modify the configuration about helper address.
    # The script looks for the DHCP server ip address in dhcp_server environment variable
    # and adds or removes the command 'ip helper-address dhcp_server' to the interface on
    # which HSRP status has changed.
    # April 2006, Cisco Europe & Emerging TME Team
    # Copyright (c) 2006 by cisco Systems, Inc.
    # All rights reserved.
    ### The script uses the following environment variables:
    #   $dhcp_server - ip address of the DCHP server in four octect dotted notation
    # 1. check if all the env variables we need exist and if not abort
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if {![info exists dhcp_server]} {
        set result "EEM Policy Error: variable dhcp_server has not been set"
        error $result $errorInfo
    # 2. Local procedure for CLI show commands
    # Pass a list of cli commands and it returns a list of outputs
    proc CLICmdProc {cmds} {
        if [catch {cli_open} result] {
            error $result $errorInfo
        } else {
            array set cli1 $result
        if [catch {cli_exec $cli1(fd) "enable"} result] {
            error $result $errorInfo
        foreach a_cmd $cmds {
            if [catch {cli_exec $cli1(fd) $a_cmd} result] {
                error $result $errorInfo
            } else {
                lappend cmd_output $result
        if [catch {cli_close $cli1(fd) $cli1(tty_id)} result] {
            error $result $errorInfo
        return $cmd_output
    # 3. Local procedure for CLI configuration commands
    # Pass a list of cli commands
    proc CLICfgProc {cmds} {
        if [catch {cli_open} result] {
            error $result $errorInfo
        } else {
            array set cli1 $result
        if [catch {cli_exec $cli1(fd) "enable"} result] {
            error $result $errorInfo
        if [catch {cli_exec $cli1(fd) "config terminal"} result] {
            error $result $errorInfo
        foreach a_cmd $cmds {
            if [catch {cli_exec $cli1(fd) $a_cmd} result] {
                error $result $errorInfo
            } else {
                set cmd_output $result
        if [catch {cli_exec $cli1(fd) "end"} result] {
            error $result $errorInfo
        if [catch {cli_exec $cli1(fd) "write mem"} result] {
            error $result $errorInfo
        if [catch {cli_close $cli1(fd) $cli1(tty_id)} result] {
            error $result $errorInfo
    # 4. query the information of latest triggered eem event
    array set arr_einfo [event_reqinfo]
    if {$_cerrno != 0} {
        set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
            $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
        error $result
    set msg $arr_einfo(msg)
    # 5. we save the interface which triggered the event in interface
    regexp {(Vlan[0-9]{1,4}).*-> ([A-Z,a-z]*$)} $msg result interface action
    if {$action == "Active"} {
                  lappend clicmd "interface $interface"
                  lappend clicmd "ip helper-address $dhcp_server"
    if {$action != "Active"} {
                  lappend clicmd "interface $interface"
                  lappend clicmd "no ip helper-address $dhcp_server"
    set cliout [CLICfgProc $clicmd]
    action_syslog msg "Updating the configuration of interface $interface"

    Try this version.  You will need to first set an environment variable, dhcp_servers to be a comma separated list of IP addresses (i.e. the helper addresses) to configure/unconfigure.  For example:
    event manager environment dhcp_servers 192.168.10.255,192.168.12.255,192.168.14.255

  • Creating a job that runs a Tcl script

    Hi,
    We currently have a scheduled job running a Tcl script on a 8.1.7 DB. My question is, can I still use the same setup in 10g DB (i.e. creating a job that runs Tcl script)? If I can, how am I gonna do it?
    Thanks,
    howie

    It depends on how you scheduled the job in 8.1.7 DB.
    By Cronjob? Yes you can do the same to connect to 10g
    By DBMS_JOB?. Yes you can do it in 10g and in addition, can improve it with DBMS_SCHEDULER
    Via OEM? Yes in can use Enterprise Manager to create a Job that runs the Script.

  • Setting the source-interface in a tcl script for email.

    So once again I am trying to figure this out and failing miserably. The only thin I can think of at the moment is that I need to tell it to source from a specific vrf interface. I've tried looking through possible enviornment variables. Hoping I could set it that way but have yet to find one. I have read varios settings for source-interface and attempted them. But fail every time with:
    vpn_failure.tcl: smtp_send_email: error connecting to mail server:
    EEM Version:
    sho event manager version
    Embedded Event Manager Version 4.00
    Component Versions:
    eem: (rel4)1.0.4
    eem-gold: (rel1)1.0.2
    eem-call-home: (rel2)1.0.0
    Below is the stock format for sending the email from the script. If someone could guide me in the correct way to set this up to source the interface that would be awesome.
    # create mail form
      action_syslog msg "Creating mail header for vpn_failure.tcl script..."
      set body [format "Mailservername: %s" "$_email_server"]
      set body [format "%s\nFrom: %s" "$body" "$_email_from"]
      set body [format "%s\nTo: %s" "$body" "$_email_to"]
      set _email_cc ""
      set body [format "%s\nCc: %s" "$body" ""]
      set body [format "%s\nSubject: %s\n" "$body" "VPN Failure Detected: Router $routername Crypto tunnel is DOWN. Peer $remote_peer"]
      set body [format "%s\n%s" "$body" "Report Summary:"]
      set body [format "%s\n%s" "$body" "   - syslog message"]
      set body [format "%s\n%s" "$body" "   - summary of interface(s) in an up/down state"]
      set body [format "%s\n%s" "$body" "   - show ip route $remote_peer"]
      set body [format "%s\n%s" "$body" "   - show crypto isakmp sa"]
      set body [format "%s\n%s" "$body" "   - show crypto session detail"]
      set body [format "%s\n%s" "$body" "   - show crypto engine connection active"]
      set body [format "%s\n%s" "$body" "   - show ip nhrp detail (DMVPN only)"]
      set body [format "%s\n%s" "$body" "   - show log"]
      set body [format "%s\n\n%s" "$body" "---------- syslog message ----------"]
      set body [format "%s\n%s" "$body" "$syslog_msg"]
      set body [format "%s\n\n%s" "$body" "---------- summary of interface(s) in an up/down state ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_interface_brief_up_down"]
      set body [format "%s\n\n%s" "$body" "---------- show ip route $remote_peer ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_route"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto isakmp sa ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_isakmp_sa"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto session detail ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_session_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto engine connection active ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_engine_connection_active"]
      set body [format "%s\n\n%s" "$body" "---------- show ip nhrp detail (DMVPN only) ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_nhrp_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show log ----------"]
      set body [format "%s\n\n%s" "$body" "$show_log"]
      if [catch {smtp_send_email $body} result] {
        action_syslog msg "smtp_send_email: $result"

    I got this far, saw the MAXRUN error, bumped that out and then turned on debugging. I am still not connecting to the mail server. So I don't think I am reaching the mail server yet. I don't think it is using the sourceinterface. In debugging everyting in the script works except for the mail portion.
    Jul 29 16:01:00.334: %HA_EM-6-LOG: vpn_failure.tcl: Creating mail header for vpn_failure.tcl script...
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: Process Forced Exit- MAXRUN timer expired.
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     while executing
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "action_syslog msg "smtp_send_email: $result""
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     invoked from within
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "$slave eval $Contents"
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     (procedure "eval_script" line 7)
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     invoked from within
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "eval_script slave $scriptname"
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     invoked from within
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "if {$security_level == 1} {       #untrusted script
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:      interp create -safe slave
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:      interp share {} stdin slave
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:      interp share {} stdout slave
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: ..."
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)
    Jul 29 16:02:36.465: %HA_EM-6-LOG: vpn_failure.tcl: Tcl policy execute failed:
    Jul 29 16:02:36.465: %HA_EM-6-LOG: vpn_failure.tcl: Process Forced Exit- MAXRUN timer expired.
    Debugging On:
    Jul 29 16:28:51.471: [fh_smtp_debug_cmd]
    Jul 29 16:28:51.472: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 2
    Jul 29 16:29:24.473: [fh_smtp_debug_cmd]
    Jul 29 16:29:24.473: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 3
    Jul 29 16:29:57.475: [fh_smtp_debug_cmd]
    Jul 29 16:29:57.475: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 4
    Jul 29 16:30:30.478: [fh_smtp_debug_cmd]
    Jul 29 16:30:30.479: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 5
    Jul 29 16:31:00.482: %HA_EM-6-LOG: vpn_failure.tcl: smtp_send_email: error connecting to mail server:
    cannot connect to all the candidate mail servers
    Jul 29 16:31:00.483: %HA_EM-6-LOG: vpn_failure.tcl: vpn_failure.tcl script completed
    event manager environment _email_server 10.79.1.126
    event manager environment _email_from [email protected]
    event manager environment _email_to [email protected]
    interface Port-channel1.101
    description MGMT-1
    encapsulation dot1Q 101
    vrf forwarding MGMT-1
    ip address 10.79.1.252 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    redundancy rii 101
    redundancy group 2 ip 10.79.1.254 exclusive decrement 10
    end
    #----------------------- send mail ----------------------
    # create mail form
      action_syslog msg "Creating mail header for vpn_failure.tcl script..."
      set body [format "Mailservername: %s" "$_email_server"]
      set body [format "%s\nFrom: %s" "$body" "$_email_from"]
      set body [format "%s\nTo: %s" "$body" "$_email_to"]
      set _email_cc ""
      set body [format "%s\nCc: %s" "$body" "[email protected]"]
      set body [format "%s\nSourceintf: %s" "$body" "port-channel1.101"]
      set body [format "%s\nSubject: %s\n" "$body" "VPN Failure Detected: Router $routername Crypto tunnel is DOWN. Peer $remote_peer"]
      set body [format "%s\n%s" "$body" "Report Summary:"]
      set body [format "%s\n%s" "$body" "   - syslog message"]
      set body [format "%s\n%s" "$body" "   - summary of interface(s) in an up/down state"]
      set body [format "%s\n%s" "$body" "   - show ip route $remote_peer"]
      set body [format "%s\n%s" "$body" "   - show crypto isakmp sa"]
      set body [format "%s\n%s" "$body" "   - show crypto session detail"]
      set body [format "%s\n%s" "$body" "   - show crypto engine connection active"]
      set body [format "%s\n%s" "$body" "   - show ip nhrp detail (DMVPN only)"]
      set body [format "%s\n%s" "$body" "   - show log"]
      set body [format "%s\n\n%s" "$body" "---------- syslog message ----------"]
      set body [format "%s\n%s" "$body" "$syslog_msg"]
      set body [format "%s\n\n%s" "$body" "---------- summary of interface(s) in an up/down state ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_interface_brief_up_down"]
      set body [format "%s\n\n%s" "$body" "---------- show ip route $remote_peer ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_route"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto isakmp sa ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_isakmp_sa"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto session detail ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_session_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto engine connection active ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_engine_connection_active"]
      set body [format "%s\n\n%s" "$body" "---------- show ip nhrp detail (DMVPN only) ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_nhrp_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show log ----------"]
      set body [format "%s\n\n%s" "$body" "$show_log"]
      if [catch {smtp_send_email $body} result] {
        action_syslog msg "smtp_send_email: $result"
      action_syslog msg "vpn_failure.tcl script completed"
    #------------------ end of send mail --------------------

  • Reading the Facility Callername from a tcl script

    I am looking for a way to read the Callingname in the facility message so that I can pass into
    set callInfo(displayInfo)
    Basically I'm trying to pass Callername to an ip phone through a TCL script on the gateway during callsetup. This normally gets dropped.
    Is there a way to parse these fields in the Facility message?
    Thanks ahead of time for any help.
    Oct 14 21:59:58.274: ISDN Se0/0/0:23 Q931: RX <- FACILITY pd = 8 callref = 0x03BB
    Facility i = 0x9F8B0100A117020101020100800F5452494F4E20574F524C44204E4554
    Protocol Profile = Networking Extensions
    0xA117020101020100800F5452494F4E20574F524C44204E4554
    Component = Invoke component
    Invoke Id = 1
    Operation = CallingName
    Name Presentation Allowed Extended
    Name = MY CALLINGNAME

    Well.. I'm having to alter an existing script that parsers the calls for fax service before they are being sent to callmanager.
    So far I think im in the right direction but I don't know how to use the "object get gtd" properly, if that's even the right approach. Im trying to parse
    GEN,y,y,0,JOE BLOW
    from the gtd debug below...
    Oct 15 16:32:26.543: CNG tone sent
    Oct 15 2009 11:32:26 CDT: %ISDN-6-CONNECT: Interface Serial0/0/0:0 is now connected to XXXXXXXXXX N/A
    Oct 15 16:32:27.231: ISDN Se0/0/0:23: Built a GTD of size 110 octets for ISDN message type 0x62
    Oct 15 16:32:27.231: tsp_ccrawmsg_encap: calling cdapi_find_tsm
    Oct 15 16:32:27.231: cdapi_find_tsm: Found Tunnelled Signaling Msg with GTD: PROT_PTYPE_GTD
    Oct 15 16:32:27.231: cdapi_find_tsm: Found a gtd msg of length 110:
    Oct 15 16:32:27.231: gtd msg = "FAC,
    PRN,isdn*,,NI***,
    GEN,y,y,0,JOE BLOW ----------------Caller NAME
    UFC,GEN,5,fachd,9f8b0100
    UFC,GEN,5,inpdu,020101020100"
    This is what I have so far...
    set DestNum [infotag get evt_dcdigits]
    set callInfo(destinationNum) $DestNum
    infotag set evt_facility_report gtd
    infotag get evt_gtd CallerID
    set CallerName [object get gtd CallerID FAC,4,GEN]
    set DestNum [infotag get evt_dcdigits]
    put "$CallerName"
    put "$DestNum"
    set callInfo(displayInfo) $CallerName
    set callInfo(destinationNum) $DestNum
    leg setup $DestNum callInfo leg_incoming

  • CallManager Express TCL Script issue

    Hi, I'm having issues trying to get an AA script working on a CME 4.0 system. What I want to do is quite simple, i just want to play a message to callers and that's it.
    When I dial the pilot, the call just drops and I get the following error when debugging "voip application script"
    Jul 25 17:16:22.470: //381//TCL :/tcl_PutsObjCmd: TCL AA: +++ B-ACD-SERVICE not registered, Starting B-ACD-SERVICE +++
    Jul 25 17:16:22.470: //381//AFW_:/AFW_FSM_Drive: Tcl_Eval to drive FSM inside Tcl modulespace. code=1 code=ERROR
    Jul 25 17:16:22.470: TCL script failure
    Result:
    Handoff Failed
    Jul 25 17:16:22.470: TCL script failure errorInfo:
    Handoff Failed
    while executing
    "handoff appl leg_incoming $serviceName -s $hString"
    (procedure "act_Setup" line 30)
    invoked from within
    "act_Setup"
    (procedure "act_Handoff_Activity" line 7)
    invoked from within
    "act_Handoff_Activity"
    Below is my config
    application
    service aa flash:app-b-acd-aa-2.1.0.0.tcl
    paramspace english index 1
    param number-of-hunt-grps 1
    param handoff-string aa
    paramspace english language en
    param max-time-vm-retry 3
    param aa-pilot 1050
    paramspace english location flash:
    param second-greeting-time 60
    param welcome-prompt _bacd_welcome.au
    param queue-manager-debugs 1
    param call-retry-timer 15
    param max-time-call-retry 200
    param voice-mail 8000
    param service-name aa
    dial-peer voice 1050 voip
    service aa
    destination-pattern 1050
    session target ipv4:172.27.27.10
    incoming called-number .
    dtmf-relay h245-alphanumeric
    codec g711ulaw
    no vad
    telephony-service
    load 7914 S00104000100
    load ATA ATA030100SCCP040211A
    load 7920 cmterm_7920.4.0-02-00
    load 7971 TERM70.6-0-3SR1S
    load 7970 TERM70.6-0-3SR1S
    load 7912 CP7912080001SCCP051117A
    max-ephones 240
    max-dn 480
    ip source-address 172.27.27.10 port 2000
    timeouts interdigit 5
    system message Galaxia - VSAT Activated
    sdspfarm units 1
    sdspfarm transcode sessions 2
    sdspfarm tag 1 mtp0018185bf860
    cnf-file perphone
    network-locale IT
    time-zone 23
    time-format 24
    date-format dd-mm-yy
    max-conferences 8 gain -6
    call-park system redirect
    call-forward pattern .T
    moh music-on-hold.au
    multicast moh 239.x.1.30 port 2123
    web admin system name admin password btin3t
    dn-webedit
    time-webedit
    transfer-system full-consult
    secondary-dialtone 9
    create cnf-files version-stamp 7960 Jul 25 2006 14:09:58
    We do not have CUE.
    Any help would be appreciated.
    Thanks
    Glyn

    In reference to this part of your config:
    If you are using a hunt group, you need the following param:
    param aa-hunt1
    I would also try using a loopback addres in your voip dial peer, rather than the H.323 physical IP addres of your router.
    here is the link with an example config:
    http://www.cisco.com/en/US/partner/products/sw/voicesw/ps4625/products_configuration_guide_chapter09186a00805f2305.html#wp1012136

  • Implementing CFNA from a TCL script

    Hello, I'm trying to create a parallel hunt group (with CFNA) in a TCL script.
    I can deliver the call to multiple DNs and if a handset is picked up the call is delivered correctly.
    However, if the call is not answered I want to then send the call to a voicemail DN.
    I have used set callInfo(alertTime) command to get the call back after the timeout and I get an event from ev_setup_done. However, I can't seem to perform another leg setup command to send the call to a VM DN.
    Is there something I need to do to cancel the previous leg setup ? Do I need to recover the original leg_imcoming? I'm fairly new at TCL so I would appreciate any help here.

    It does not seem to work. Is this supported in 4.1.1 version of XR software? Here is what I configured and error I got:
    sys_reqinfo_snmp_trapvar var vbinds oid 1.3.6.1.4.1.33333.2.0 string "send_custom_trap.tcl"
    sys_reqinfo_snmp_trapvar var vbinds oid 1.3.6.1.4.1.33333.3.0 string "This is a custom trap"
    sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.33333.1 generic_trapnum 6 specific_trapnum 1 trap_oid 1.3.6.1.4.1.33333.1.0.1 trap_var vbinds
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan: No trap variable "vbinds"
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan:     while executing
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan: "sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.33333.1 generic_trapnum 6 specific_trapnum 1 trap_oid 1.3.6.1.4.1.33333.1.0.1 trap_var vbinds
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan: "
    RP/0/RSP0/CPU0:Mar  5 14:54:08.104 : syslog_dev[93]: noscan:     (file "/dev/rdsfs/etc/eem_rdsfs/eem_counter_lookup_v1_0.tcl" line 100)

  • OMBPlus TCL-script in OWB Designer at startup?

    Is there a way to run a OMBPlus script in OWB Designer automatically at startup?
    What I would like is a small tcl script that just contains a procedure like:
    proc run_script {} {
    source "I://OMB//SCRIPTS//2009//DEPLOY//START_DEPLOY.tcl"
    Then the users can just access the OMBplus part of the screen and type
    OMB> run_script
    (This instead of typing the entire source command...)
    Is this possible? To automatically run a small script at startup?

    Hi,
    Is this possible? To automatically run a small script at startup?OMBPlus is a Tcl/Java based (Jacl) TCL interpreter and it support auto_load mechanism (with auto_path variable and tclIndexfile).
    And please note that this mechanism doesn't work if you start OWB from Windows Start menu (use OWBHOME\owb\bin\win32\owbclient.bat instead).
    1) place your small tcl script into directory (for example into c:\tcl_autostart and name of your script small_script.tcl)
    2) Modify setowbenv.bat file (in OWBHOME\owb\bin\win32 directory) - add line
    SET TCLLIBPATH="C:/tcl_autostart"3) create in c:\tcl_autostart directory file tclIndex (without any file extension!) with contents (the first line must be exact I specify, because TCL interpreter check it before processing tclIndex)
    # Tcl autoload index file, version 2.0
    set auto_index(run_script) \[list source \[file join $dir small_script.tcl\]\]Now start OMBPlus (with OMBPlus.bat) or OWB (with owbclient.bat) - and you have new command run_script
    Tested on OWB 10.2.0.3
    Regards,
    Oleg
    Edited by: Oleg on 29/1/2010 15:33 correct contents of tclIndex

Maybe you are looking for