Call transfer with TCL script

Version 1
    This document was generated from CDN thread

    Created by: Siarhei Tupikau on 29-06-2011 11:23:10 AM
    I have my custom TCL script running on a voice gateway with CME. Most of the time it is working fine, but sometimes, like one time a day something strange happens. After the call has been transferred from one user to the other, the destination voice port for ephone-dn is getting EFXS_W_SETUP_ACK_ONHOOK VPM state and stops working.
    I do transfer in the following way:
    proc act_DestroyDone { } {
        global cntID
        global tDest
        puts -nonewline " TranDestroyDone"
        set callInfo(transferConsultID) $cntID
        set callInfo(notifyEvents) "ev_alert ev_proceeding ev_progress ev_transfer_status"
        #set callInfo(mode) redirect_rotary
        if {[llength [infotag get leg_incoming]] > 0} {
            if {[string length $tDest] == 3} {
                if {[string index $tDest 0] == 3} {
                    puts "Transfer to $tDest!"
                    leg setup $tDest callInfo leg_incoming
                } else {
                    puts "Transfer to $tDest!"
                    leg setup $tDest callInfo leg_incoming
            } else {
                puts "Transfer to $tDest!"
                leg setup $tDest callInfo leg_incoming
            leg disconnect leg_outgoing
    proc act_TransferRequest { } {
        global cntID
        global tDest
        global trBy

        puts -nonewline " TransferRequest!"
        set tDest [infotag get evt_transfer_info transferDest]
        set cntID [infotag get evt_transfer_info consultID]
        set trBy [infotag get evt_transfer_info transferBy]
        puts $tDest
        puts $cntID
        puts $trBy

        puts "con_all=[llength [infotag get con_all]]"
        if {[llength [infotag get con_all]] > 0} {
            puts "destroyAll!"
            connection destroy con_all
      set fsm(any_state,ev_destroy_done) "act_DestroyDone same_state"
      set fsm(any_state,ev_transfer_request) "act_TransferRequest same_state"
    What do I do wrong that causes the problem to happen?

    Subject: RE: Call transfer with TCL script
    Replied by: Yaw-Ming Chen on 29-06-2011 01:28:47 PM
    You may need to provide the entire script so it's more clear.
    Also the log of
    deb voip app
    deb voip ccapi inout
    if you don't like to post your script here you can send it to