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

Similar Messages

  • TCL script from CallManager

    Hello. Does anybody know about the ability of CallManager to run applications on gateway? (for example, tcl scripts).
    Thank You for any advice

    Hi marchine,
    I've ccm doing H.323 with Gateway. I want to run default AA script on Gateway.
    1) Will the default AA script which comes for CME work with CCM also?
    2) How would Gateway know about the extension numbers. Will it simply forward the digits to CCM based on VOIP dial-peer?
    Thanks,
    inner_silence

  • EEM TCL script configuration issue

    Hi Experts,
    I need help with an EEM TCL script for the CRS platform that generates a SYSLOG message after the CPU reaches a threshold value and then stays over the threshold value for 15 minutes, I've already tryied several thing and the last TCL script that I tested generated the SYSLOG message when the CPU reaches the threshold but I can't seem to find any way to make it wait the 15 min over the threshold and then generate the message.
    My current script looks like this:
    ::cisco::eem::event_register_wdsysmon timewin 900 sub1 cpu_tot op ge val 70
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set event_details [event_reqinfo]
    action_syslog msg "sub1 is $event_details(sub1)"
    action_syslog msg "High CPU threshold value over 70%"
    puts ok
    I've tryied using the 'period' option for the 'cpu_tot' variable but the TCL script was'nt recognized and couldn't be registered, and I'm using the 'timewin' option here but it seems to be wrong as it says it's the time it has for multiple sub-events to ocurr in order for the script to execute.
    timewin
    (Optional) Time window within which all of the subevents have to occur in order for an event to be generated and is specified in SSSSSSSSSS[.MMM] format. SSSSSSSSSS format must be an integer representing seconds between 0 and 4294967295 inclusive. MMM format must be an integer representing milliseconds between 0 and 999).
    Also, the 'period' option I believe wouldn't have worked because I understand that it referrs to the time period that the script will take to monitor the CPU:
    •1. cpu_tot [op gt|ge|eq|ne|lt|le] [val ?] [period ?]
    op
    (Optional) Comparison operator that is used to compare the collected total system CPU usage sample percentage with the specified percentage value. If true, an event is raised.
    val
    (Optional) Percentage value in which the average CPU usage during the sample period is compared.
    period
    (Optional) Time period for averaging the collection of samples and is specified in SSSSSSSSSS[.MMM] format. SSSSSSSSSS format must be an integer representing seconds between 0 and 4294967295, inclusive. MMM format must be an integer representing milliseconds between 0 and 999. If this argument is not specified, the most recent sample is used.
    As I said, I couldn't try this because the script send an error when I tried to register using the following line:
    ::cisco::eem::event_register_wdsysmon sub1 cpu_tot op ge val 70 period 900
    This is the error message that appeared:
    RP/0/RP0/CPU0:CRS(config)#event manager policy test.tcl username cisco
    RP/0/RP0/CPU0:CRS(config)#commit
    Thu Aug 29 12:35:43.569 CDT
    % Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed' from this session to view the errors
    RP/0/RP0/CPU0:CRS(config)#sh conf fail
    Thu Aug 29 12:35:52.427 CDT
    !! SEMANTIC ERRORS: This configuration was rejected by
    !! the system due to semantic errors. The individual
    !! errors with each failed configuration command can be
    !! found below.
    event manager policy test.tcl username cisco persist-time 3600
    !!% Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy test.tcl
    end
    Anyway, to make this work I understand that I need nested TCL scripts that do the following:
    •1. Monitor the CPU and when it reaches the threshold install another TCL policy that counts down 15 min.
    •2. If the second TCL policy reaches zero then it should generate the SYSLOG message.
    •3. Monitor the CPU while this is running and if it falls below the threshold it should stop the second TCL policy.
    I don't know how I can acomplish this so if anyone can help me with this or show me another way to do this I would really appreciate it.
    Thanks in advance for all your help!

    Neither option is likely to do what you want.  The timewin is for correlating multiple events, and period is the polling interval.  What you want is to create a timer when the CPU is first detected as being high, countdown 15 minutes, then alert you.  You can do this with a nested EEM policy.  For example, you can add the following to your existing policy:
    proc get_pol_dir { fd } {
        set res {}
        set output [cli_exec $fd "show event manager directory user policy"]
        set output [string trim $output]
        regsub -all "\r\n" $output "\n" result
        set lines [split $result "\n"]
        foreach line $lines {
            if { $line == "" } {
                continue
            if { ! [regexp {\s} $line] && ! [regexp {#$} $line] } {
                set res $line
                break
        if { $res == {} } {
            return -code error "The user policy directory has not been configured"
        return $res
    if { [catch {cli_open} result] } {
        error $result $errorInfo
    array set cli $result
    set output [cli_exec $cli(fd) "show event manager policy registered | inc tm_alert_high_cpu.tcl"]
    if { [regexp {tm_alert_high_cpu.tcl} $output] } {
        exit 0
    set poldir [get_pol_dir $cli(fd)]
    set polname "${poldir}/tm_alert_high_cpu.tcl"
    set fd [open $polname "w"]
    puts $fd "::cisco::eem::event_register_timer countdown time 900"
    puts $fd "namespace import ::cisco::eem::*"
    puts $fd "namespace import ::cisco::lib::*"
    puts $fd "action_syslog msg \"CPU has been over 70% for 15 minutes\""
    close $fd
    cli_exec $cli(fd) "config t"
    cli_exec $cli(fd) "event manager policy tm_lert_high_cpu.tcl username eem"
    cli_exec $cli(fd) "commit"
    cli_exec $cli(fd) "end"
    catch {cli_close $cli(fd) $cli(tty_id)}
    Additionally, you'll want another permanently configured policy that checks for a low CPU threshold.  Something like:
    ::cisco::eem::event_register_wdsysmon sub1 cpu_tot op le val 10
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if { [catch {cli_open} result] } {
        error $result $errorInfo
    array set cli $result
    cli_exec $cli(fd) "config t"
    cli_exec $cli(fd) "no event manager policy tm_alert_high_cpu.tcl"
    cli_exec $cli(fd) "commit"
    cli_exec $cli(fd) "end"
    catch {cli_close $cli(fd) $cli(tty_id)}

  • 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

  • The states of tcl script is loaded

    I develop a tcl script and upload to a router 2811.after loading this script,this script's states is loaded.i think that this script's states is registered is correct.
    please help me fix this issue.thanks

    Developing and testing tcl scripts is not easy.
    If you want professional help doing that, contact me at the address present in my profile.

  • Runnig TCL script manually?

    We are running a TCL script via a cron job with no issue, every 2 minutes and it working like a bomb.
    When i try run the script manually via the event manager run xxx.tcl it say that it is not registered?
    When i check the sh event manamger policy registed it says it is?
    Any ideas?
    Regards
    Noel

    You don't need kron or Tcl for this.  You can use the built-in config archive feature of IOS:
    http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gtrollbk.html#wp1100253
    If you do want to go the scheduled route with EEM, start a new thread for your issue.

  • IOS-XR reachability-check TCL script

    Hi there,
    I'm currently playing with TCL scripts to prepare for my CCIE lab exam. The main purpose I'm gonna use them is to
    check the reachability within ISP IGP domain and/or L3VPN domain.
    Currently I'm facing the following issue: I'm unable to specify the source address used to run ping:
    % tclsh
    foreach address {
    2010::2
    2010::3
    2010::4
    2010::5
    2010::6
    2010::7
    } { ping $address source lo0
    % % Invalid parameter(s)
    child process exited abnormally
    Can somebody kindly help me out to modify the script so that ping is sourced from conifgured interface?
    Thanks in advance

    try this. Note, you have to set your source address:
    set loop0 2010::1
    foreach address {
    2010::2
    2010::3
    2010::4
    2010::5
    2010::6
    2010::7
    } { ping6 -S $loop0 $address
    Regards,
    /A

  • Running a TCL script through EEM every 60 seconds

    I have a script written in the TCLSH of IOS, I can test this script from the shell using the following commands
    LAB-RTR#tclsh
    LAB-RTR(tcl)#source flash:test.tcl
     NO CALLS
    Is there a way I can run this test.tcl script every 60 seconds on the router.
    SCRIPT test.tcl
    proc get_ints {} {
    set syslog [open "syslog:" w+]
    #puts "BEFORE\n"
    set check ""
    set int_out [ exec "show voice call status\n" ]
    #puts "INTOUT $int_out\n"
    set mylist [regexp -nocase -line -inline {(^([0-9]*|No) active calls? found)} $int_out]
    #puts "MYLIST $mylist\n"
    foreach int $mylist {
     #puts "INT $int\n"
     if {$int == "No"} {
      puts " NO CALLS\n";
      puts $syslog "NO CALLS"
     } elseif {[string is integer -strict $int]} {
      puts "$int CALLS\n";
      puts $syslog "$int CALLS"
     } else {
      #puts "GARBAGE\n";
    close $syslog
    #puts ""
    puts [eval get_ints]

    Hey Joseph, Thanks for all your help. I have one last question, so now that I am running my script every 60 seconds if there is an issue I send multiple traps to our monitoring system. Is there any way you can keep track if the trap was already sent I will not send another trap again.
    One way I can think of is using a loopback interface. But I would prefer not shutting down the loopback interface just to keep track of what my script is doing.
    IF issue {
       IF Loop1 is up {
                don't send trap
        } ELSE {
                bring Loop1 up
                Send Trap
     } ELSE (No issue) {
       shutdown Loop1

  • Running a *.tcl script via an Expert

    I'm trying to build a metadata promotion wizard/expert which will promote metadata from our Dev repository to our QA repository
    In order to acheive this, we have created an exp_imp.tcl script which exports a collection from our Dev repository and imports it into QA our QA repository - this works fine if I run it via OMBPlus.bat. However, I would like to incorporate this within an OWB Expert - the problem we are experiencing is that the OMB+ task within the expert doesn't allow us to connect to a different repository (QA repos) without first disconnecting from the current repository (Dev repos) - if we do disconnect the expert will run through to completion, however, the expert window then hangs (presumably, because of the earlier disconnection)
    Any help with this would be much appreciated.

    Hi skifarm,
    It sounds like this message may be more related to the TCL script than to LabVIEW.  Could you put a simple command very early in the script that gives some output, to help you determine whether it's a LabVIEW issue?  If the command provides the output, then it's probably not a LabVIEW issue.  If it doesn't get that far, then that somewhat narrows it down.
    Regards,
    James R.
    National Instruments

  • Validation TcL Script (Ping/Trace)

    I am looking for a script that I can use to help simplify my validation steps when I am doing some work on my devices. I typcially have anywhere from 2 - 10 IP addresses that I need to validate against (typically less than 5 though). My common steps are to ping each of my IP addresses and then I run a traceroute to those IP's to validate they are first reachable and then second I need to validate the path that is being taken is correct before my work and then after my work. So far I have come acrosss a TcL script that I could use for Ping, but not for trace. Ideally it would be nice if I could runa single line command with each IP address and then when I press enter the script will do the rest.
    a sample of what I would like to do is type:
    Script name: validate
    R1(tcl)#validate x.x.x.x y.y.y.y z.z.z.z
    The Ping script I found is below. I don't quite like it because it is not dynamic enough for what I am looking for, and I cannot seem to make this work for trace.
    R1#tclsh
    R1(tcl)#foreach address {
    +>(tcl)#172.12.23.2
    +>(tcl)#172.12.23.3
    +>(tcl)#172.12.23.4
    +>(tcl)#172.12.23.6
    +>(tcl)#172.12.23.7
    +>(tcl)#} { ping $address
    +>(tcl)#}
    Thank you,
    Toby

    I am learning TCL too and feel I can assist in some of this for you.
    The reason why you get an invalid argument is because you are using argv which only accepts arguments when you are calling a tcl script to run from a command line and you add arguments at the end to feed into the script dynamically.
    eg if you save a script called pingtest.tcl into the routers flash, then after the .tcl are your arguments that argv will soak in
    in otherwors "Command line arguments are stored in the list named 'argv"
    pingtest.tcl 192.168.1.1 192.168.1.2 192.168.1.3 etc etc
    I would recommend for now just turning it into a proc which you can use in the interactive tcl shell on the router. After you do that then you can branch off into saving it into flash or whatever.
    To turn it into a procedure you can forget about the argv stuff and just put the ip address directly into the proc argument.
    This means that when you call your proc name it will execute the procedure body using the argument in the proc.
    have a go at this. To make it neater you can create a placeholder variable for all the IP's you want to validate.
    What this will do is, if the ping is succesfull then it will go on to execute the traceroute.
    however if the ping fails then no traceroute is executed and it goes on to the next IP in the list.
    eg -
    set ip "192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 192.168.11.5 192.168.12.5 192.168.1.5 192.168.1.6 184.32.33.1 192.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10"
    Copy this into your routers interactive shell
    set ip "192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 192.168.11.5 192.168.12.5 192.168.1.5 192.168.1.6 184.32.33.1 192.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10"
    proc validate {x} {
    set counter 1
    puts "###########################"
    puts "# Running Ping Validation #"
    puts "###########################\n\n"
    foreach ip_address $x {
    set pings [exec ping $ip_address]
    if {[regexp {!!!!} $pings]} {
    puts "Analysing Ping $counter to IP - $ip_address"
    puts "Ping to $ip_address - \[SUCCESSFULL\]\n\n"
    puts "*****Validating path to $ip_address via traceroute*****"
    traceroute $ip_address
    puts \n
    puts "\[COMPLETED\]\n\n"
    puts -----------------------------------------------------------
    puts \n\n
    } else {
    puts "Analysing Ping $counter to IP - $ip_address"
    puts "Ping to $ip_address - \[FAIL\]\n\n"
    puts -----------------------------------------------------------
    incr counter
    validate $ip
    END
    -also its worth to note the tcl traceroute command is finiky, if you use exec it most likely wont work and just hang until all 30 hops are done. (potentially ios version dependant as I have read a couple of Josephs posts on similar issues with it)
    It would be easy to convert back into argv. Just replace to foreach ip_address $argv and get rid of the procedure.

  • ACE TCL Script to retrieve Cookie

    I am in need to to do a post instead of a Get with a probe. So I have configured a TCL script to perform this. The issue I have is that I also need to parse the Cookie instead of the http1. response. Any ideas? Or does anyone have a variable indetifiers for TCL scripting that Cisco uses?
    Thank you,
    Tim

    HI Thulin,
    Health probe scripts have access to many configured items through a predefined TCL array. The most common use of this array is to find the current real server IP addresses of the suspect during any particular launch of the script.
    Whenever the ACE executes a script probe, a special array called scriptprobe_env is passed to the script. This array holds important parameters that may be used by the script.
    Member name Content
    realIP
    Suspect IP address
    realPort
    Suspect IP port
    intervalTimeout
    Configured probe interval in seconds
    openTimeout
    Configured socket open timeout for this probe (tbd)
    recvTimeout
    Configured socket receive timeout for this probe
    failedTimeout
    Configure failed timeout
    retries
    Configured retry count
    healthStatus
    Current suspect health status
    contextID
    The ID for the context running this script
    failedRetries
    Consecutive successful retries on a failed server before marking it as passed
    isRouted
    Boolean to determine if this IP address is a routed address
    pid
    Process identifier of the TCL process
    runID
    Pointer to the event structure (em_event_t)
    Kindly refer to the following url to get more info regarding your tcl variables:
    http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/v3.00_A1/configuration/slb/guide/script.html#wp1082112
    http://www.cisco.com/univercd/cc/td/doc/solution/dc_ap11i.pdf
    http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/mod_icn/ace/ace_301/slbgd/script.pdf
    Regards,
    Sachin Garg

  • 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.

  • Firefox is having "Script" issues (Not Responding) und possibly Flash issues?

    Okay, downloaded Firefox for the first time in like a year yesterday. It was working beautifully, oh, how I've missed it. I hate using Google Chrome with a fiery burning passion.
    However, though it was working perfectly yesterday, I have not downloaded anything or got any plug-ins/extensions, whatever.
    Today, however, I can go to www.google.com (on firefox), but if I try to go to my banks website, or imvu.com, or something like that, all the sudden Firefox decides to hang. It freezes und I get that annoying "(Not Responding)" at the top. I have to close out of the browser entirely, open it up und forgo the session restore.
    Some websites are okay, however, it seems many of them aren't.
    I get a script error message, so far the one for imvu.com that popped up was "lookout.bluecava" or something like that. Asked if I wanted to wait for script to respond or if I wanted to stop it. Either way, it ends with me closing out und starting back at google.
    Right now, to ask this question, I had to re-download google chrome, und log in from that browser since Firefox doesn't even want to support it's own support forum! Crazy stuff, right?
    Anyway, since it's having a "script" issue, I went to java, made sure I had the updated java installed on my computer, then I made sure that I had the updated java plug-in. Und I even downloaded the 64bit java for it as well, both the 7u45 or whatever.
    So, my java on my comp und firefox browser are seemingly up to date, und the Add-On thing for Firefox to check if plugins are up to date says they all of them are up to date.
    Still having the issue. The moment I go to imvu or another site that has that issue, it freezes within 10 seconds und that's all she wrote.
    So, I'm really not wanting to go back to Google Chrome for another year, I miss the hell out of Firefox.
    To Add: The issue I am having right now with Firefox is the same issue I had a year ago, when I had to uninstall firefox und go with Chrome in the first place.
    But, since it was acting normal yesterday when I installed it, I figured that it was fixed. Wrong in less than 24 hours.
    Before I submitted this, I decided to hop back onto Firefox und try something.
    I disabled the Shockwave Flash und the Shockwave Director plugins. Now, Firefox is working again.
    Sooooooooooooooooooooooooooooooooo.
    It asks me if I want to install the "flash" plugins needed to view some content on the page (I used imvu.com to try it out after disabling the shockwave), but still runs.
    So, what do I need to do for flash? Or better yet, what's going on with it?
    I downloaded the flash yesterday within half an hour of starting Firefox up after downloading it. Und it worked just fine for hours.
    I shut the comp down, packed it up, went home, come back to work, hop on the net und BAM. All the sudden Shockwave is having issues with Firefox when nothing was done to instigate it? Doesn't make sense.
    Other info:
    Windows 7 Home Premium on HP laptop.

    I will give Firefox 24.1 a try und see if shockwave flash actually works without making it hang und resulting in need of force close.

  • 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 --------------------

Maybe you are looking for

  • Microsoft Transporter for Lotus Domino

    Hi, Is there any way that the Microsoft Transporter for Lotus Domino can migrate the Domino nsf files to a PST file? Although there is the Exchange and Sharepoint infrastructure in place, those servers are not directly available to myself and therefo

  • Dynamic programming user interface question...

    Hi forum: I´m creating radiobuttons dinamically, i saw the next reference, and it´s good but that´s examples suppose that i have a simple type charged with some data enumerated, and also my data are dinamyc beacuse i get it from a XML file. http://he

  • How to add From date & To date in PLD

    Dear Experts, How can i add From Date & To Date in Manage Previous External Reconsilation PDL? I am using inbuild SAP PDL.. In Manage Previous External Reconsilation-Selection Criteria I am selecting  GL Acc & Date From & Date To. Date From & Date To

  • Is Adobe CS5.5 working fine with Yosemite ?

    Hi, I've read some and other things in different forums so I don't know what to think. I'd like to know if anyone here updated from Mavericks to Yosemite and is using Adobe CS5.5 (Photoshop - I know about the Java thing - Illustrator, Indesign, Acrob

  • I lost my iPad and I can't lock it remotely !

    This morning I lost my iPad and I try to lock it remotely via iCloud but I can't lock it.When I click Lost mode in iCloud it just asks my contact number and personal message.There is no option for lock. for your information, i tried to track my ipad,