unable to play prompt to incoming leg after a connection destroy

Version 1
    This document was generated from CDN thread

    Created by: vinh nguyen on 16-06-2010 05:16:27 AM
    I was following closely to the sample script when i tried to do this. Basically just call "connection destroy con_all" then play ivr prompt to incoming leg. The problem here is that I wasn't able to hear any prompt. Does anyone know anything about this?
     
    Here's a simple scritp:
    #succesfully connected incoming leg(POTS) to an outgoing leg(VOIP)
    connection destroy con_all
    #wait for ev_destroy_done - then
    media play leg_incoming flash:beep.au
     
    Thanks.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 16-06-2010 05:32:56 AM
    Can you please show whole script (incluing state machine) ?
     
    Thanks,
     
    Yawming

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: vinh nguyen on 16-06-2010 06:49:30 AM
    proc init { } {
        global param
        global fcnt
        global account
        global pin
        global dest
        global rem_time
        set param(interruptPrompt) true
        set param(abortKey) *
        set param(terminationKey) #
    }
    proc act_greet { } {
        global recordInfo
        global fcnt
        global call_started
        leg setupack leg_incoming
        timer start leg_timer 60 main_timer
        set fcnt 0
        set call_started 0
        media play leg_incoming tftp://SRV/greeting1.au
       
    }
    proc act_search {} {
     set avList(h323-return-code) check_phone
     set ani [infotag get leg_ani]
     aaa authorize $ani "" "" "" leg_incoming -a avList -s test
    }
    proc act_Cleanup { } {
     global call_started
     global cdr
     global t_con
     if { $call_started == 1 } {
      set avList(h323-return-code) end_call
      aaa authorize $cdr $t_con "" "" leg_incoming -a avList -s test
     }
        call close
    }

    proc act_authorize { } {
         global fcnt
         global account
         set status [infotag get evt_status]
         if { $status == "ao_000" } {
     if { [infotag get aaa_avpair_exists h323-credit-amount] } {
      set amt [infotag get aaa_avpair h323-credit-amount]
      set account [infotag get aaa_avpair h323-return-code]
      media play leg_incoming tftp://SRV/youhave.au %a$amt
      fsm setstate ENTER_NUMBER
        }
     } else {
     if { $fcnt == 0 } {
      media play leg_incoming tftp://SRV/enter_pin.au
       } else {
      media play leg_incoming tftp://SRV/invalid_pin.au
     }
     set recordInfo(interruptPrompt) true
            set recordInfo(maxDigits) 9
     leg collectdigits leg_incoming recordInfo
     }
    }
    proc act_checkpin {} {
     global fcnt
     incr fcnt
     global pin
     if { $fcnt < 4 } {
     set status [infotag get evt_status]
     if {$status == "cd_001"} {
      set recordInfo(interruptPrompt) true
             set recordInfo(maxDigits) 9
      leg collectdigits leg_incoming recordInfo
      media play leg_incoming tftp://SRV/invalid_pin.au
        fsm setstate same_state
     } else {
      
      set avList(h323-return-code) check_pin
      set pin [infotag get evt_dcdigits]
      aaa authorize $pin $pin "" "" leg_incoming -a avList -s test
      
     }
     } else {
         media play leg_incoming tftp://SRV/invalid_pin.au
         fsm setstate DC
      } 
    }
    proc act_placecall {} {
     media play leg_incoming tftp://SRV/enter_number.au
     set recordInfo(interruptPrompt) true
     set recordInfo(terminationKey) #
     set pattern(1) "84.........$"
     #set pattern(1) "66........$"
     leg collectdigits leg_incoming recordInfo pattern
    }
    proc act_matchnumber {} {
     global account
     global pin
     global dest
     set status [infotag get evt_status]
     set ani [infotag get leg_ani]
     set dest [infotag get evt_dcdigits]
         #matched pattern
         if {$status == "cd_005"} {
      
       set avList(h323-return-code) minute_phone
       
       aaa authorize $account $dest "" "" leg_incoming -a avList -s test
     
         } else {
     #no dialplan matched
      media play leg_incoming tftp://SRV/nosupport.au
     fsm setstate DC
     }
    }
    proc act_CallSetupDone { } {
     global rem_time
     set status [infotag get evt_status]
     if { $status == "ao_000"} {
      if { [infotag get aaa_avpair_exists h323-credit-time] } {
       set rem_time [infotag get aaa_avpair h323-credit-time]
       media play leg_incoming tftp://SRV/youhave.au %t$rem_time
       if { $rem_time < 41 } {
        media play leg_incoming tftp://SRV/outoftime.au
        fsm setstate DC
       }
      }
      
     } else {
      media play leg_incoming tftp://SRV/option3.au
      fsm setstate DC
     }
    }
    proc act_Connect { } {
     global dest
     leg proceeding leg_incoming
     leg connect leg_incoming
     leg setup $dest callInfo leg_incoming
    }
    proc act_Timer { } {
     global rem_time
     global call_started
     global account
     global dest
     global t_con
     set dnis [infotag get leg_dnis]
     set ani [infotag get leg_ani]
     set status [infotag get evt_status]
          if { $status == "ls_000" } {
      
       set delay [expr $rem_time - 10]
       set t_con [timer left leg_timer main_timer]
       set t_con [expr 60 - $t_con]
       set delay [expr $delay - $t_con]
      
      timer stop leg_timer main_timer
      set avList(h323-return-code) start_call
      set avList(h323-credit-time) $dnis
      set avList(h323-credit-amount) $dest
      aaa authorize $account $ani "" "" leg_incoming -a avList -s test
      timer start leg_timer $delay leg_incoming
      set call_started 1
      
     } else {
      
      media play leg_incoming tftp://SRV/option3.au
      fsm setstate DC
      
     }
    }
    proc act_CDR { } {
     global cdr
     set status [infotag get evt_status]
     if { $status == "ao_000"} {
      set cdr [infotag get aaa_avpair h323-return-code]
     }
    }
    proc act_Warn { } {
     global incoming
     global outgoing
     set incoming [infotag get leg_incoming]
         set outgoing [infotag get leg_outgoing]
     connection destroy con_all

    }
    proc act_playWarn { } {
     media play leg_incoming tftp://SRV/youhave.au %t10
    }

    proc act_reConnect { } {
     global incoming
     global outgoing
     connection create $incoming $outgoing
     
    }
    proc act_ConnectedAgain { } {
     timer start leg_timer 7 leg_incoming
    }
    proc act_lastWarn { } {
     connection destroy con_all
     
    }
    proc act_playLastWarn { } {
     media play leg_incoming tftp://SRV/outoftime.au
    }
    init
    #----------------------------------
    #   State Machine
    #----------------------------------
      set TopFSM(any_state,ev_disconnected) "act_Cleanup same_state"
      set TopFSM(CALL_INIT,ev_setup_indication) "act_greet SEARCH"
      set TopFSM(SEARCH,ev_media_done) "act_search RESPONSE"
      set TopFSM(RESPONSE,ev_authorize_done) "act_authorize COLLECT_PIN"
      set TopFSM(COLLECT_PIN,ev_collectdigits_done) "act_checkpin RESPONSE"
      set TopFSM(ENTER_NUMBER,ev_media_done) "act_placecall MATCH_NUMBER"
      set TopFSM(MATCH_NUMBER,ev_collectdigits_done) "act_matchnumber CALL_ACTIVE"
      set TopFSM(CALL_ACTIVE,ev_authorize_done) "act_CallSetupDone CALL_CONNECT"
      set TopFSM(CALL_CONNECT,ev_media_done) "act_Connect CALL_MINUTE"
      set TopFSM(CALL_MINUTE,ev_setup_done) "act_Timer GET_CDR"
      set TopFSM(GET_CDR,ev_authorize_done) "act_CDR START_TIMER"
      set TopFSM(START_TIMER,ev_leg_timer) "act_Warn  PLAY_WARN"
      set TopFSM(PLAY_WARN,ev_destroy_done) "act_playWarn RECONNECT"
      set TopFSM(RECONNECT,ev_media_done) "act_reConnect RECONNECT_AGAIN"
      set TopFSM(RECONNECT_AGAIN,ev_create_done) "act_ConnectedAgain AFTER_WARN"
      set TopFSM(AFTER_WARN,ev_leg_timer) "act_lastWarn PLAY_LASTWARN"
      set TopFSM(PLAY_LASTWARN,ev_destroy_done) "act_playLastWarn DC"
      set TopFSM(DC,ev_media_done) "act_Cleanup same_state"
      fsm define TopFSM  CALL_INIT

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 16-06-2010 04:32:44 PM
    It looks OK.
     
    Please collectlog of
    debug voip app tcl
    deb voip app media neg
    deb voip app media state
     
    see if we can spot something
     
    otherwise you may want to open a Cisco Developer Support SR.
     
    Thanks!

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: vinh nguyen on 16-06-2010 07:34:58 PM
    any config that could cause this behavior? i was able to hear prompt before the call leg got connected. But after connection destroy, I couldn't hear any prompt on the call leg.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: vinh nguyen on 16-06-2010 08:25:56 PM
    I read somewhere that you can play IVR prompt on voip legs only if the codec are the same. In my case i got incoming leg from POTs connected to outgoing VOIP leg(g.729 codec).
     
    Is it possible that the incoming leg is somehow associated with DSP for code g729 and since the IVR prompt is using g711 codec, this could cause the issue?
     
    What software can I use to determine the codec being used? I used Aducity to produce some of my prompts.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: vinh nguyen on 17-06-2010 09:41:31 PM
    it is very strange as I was able to play prompt before legs got connected. But after connection destroy, I just cant hear any prompt being played.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 16-06-2010 07:40:21 PM
    My suggestion is that just use script to make a basic call to sure basic stuff is working before adding features.
     
    1. connect incoming play prompt - make sure it's ok
    2. connect to destination make sure 2 ways audio (skip aaa stuff)
    3. destroy connection play promt to in and out bound leg make sure either way are OK.
     
    Thanks !

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 16-06-2010 08:31:08 PM
    You can play promt to POTS leg no problem but make sure the audio format is G711
    Use windows media player you can see what format id audio file.
     
    Thanks !

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 17-06-2010 09:43:41 PM
    Did you simply you script and try ? If you did please psot you script.
     
    Thanks !

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 17-06-2010 09:44:27 PM
    Your audio file too if possible

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Sean Chan on 29-06-2010 02:49:51 PM
    I have the same issue with the audio after I updated the IOS.  The latest IOS that worked for me is 124-6.T11 anything after that version i do not hear the audio after a connection destroy.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Yawming Chen on 06-07-2010 05:32:30 PM
    Can you please post you script so we can test it out ?
     
    Thanks !

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 14-09-2010 07:01:07 AM
    Does anyone found a solution to this problem? I, too, the files are played only in the old version of the IOS. In debug shows that the desired PROMT played. Put a script that does not work on a new version of IOS

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 27-09-2010 10:09:42 AM
    Hi Mihail Zamyatin,

    we were able to play the prompt to incoming leg after connection destroy, please post your logs by enabling following debugs for further analysis and also running version of IOS Image

    Deb voip application tclcommands
    Deb voip application states
    Deb voip application script
    deb voip app media

    Thaanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 27-09-2010 09:25:57 AM
    Does anyone can solve this problem? Certainly not for free. Who are interested to tackle this problem, please write to rsi@enertel.ru

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 28-09-2010 02:25:58 AM
    Thank you for your reply. Here's what you asked for:
    steps were as follows:
    1. Dials numbers script 2266404
    2. Typed PIN
    3. Dialed my cell phone 9233541101 # (pound to indicate end of dialing)
    4. While calling on a cell, took the phone and after 1-2 seconds severed conversation.
    5. On side A had heard about the invitation to dial, and then terminates the connection.
     
    AS5350 router with two ports for E1. In
    the version of IOS c5350-jk9s-mz.124-6.T7.bin no problem, I hear a
    voice prompt after the destruction of compounds with a side of B. In the
    version of IOS c5350-jk9s-mz.124-24.T3.bin I did not hear any voice prompts after the destruction of compounds with side B. I enable  debug on both version IOS.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 28-09-2010 07:48:08 AM
    Hi Mihail Zamyatin,

    Thanks for providing logs, from the new version of logs we found that were couple of errors occured due to registration failed ,Please check and rectify them and also are there any configurations changes done to new version compared to older version

    Sep 23 10:11:16.835: //-1//SCRI:/ScriptList_BackgroundLoad: Registration failed for at least one script,
    Sep 23 10:11:16.835: //-1//SCRI:/ScriptList_BackgroundLoad:    going through 5 passes
    Sep 23 10:11:16.835: //-1//SCRI:/ScriptList_BackgroundLoad:  Registration pass 1
    Sep 23 10:11:16.835: //-1//SCRI:/AFW_M_Script_Register: Registering :remote_ip:,
    Sep 23 10:11:16.835: //-1//SCRI:/AFW_M_Script_Register:    url:tftp://10.248.0.160/en/remote_ip.tcl:
    Sep 23 10:11:16.835: //-1//AFW_:/AFW_TclModule_New: 
    Sep 23 10:11:16.835: //-1//AFW_:EE67BBD328000:/Tcl_Link: Linking script remote_ip
    Sep 23 10:11:16.839: //11//MSM :/ms_play_part: sent: 240, numInBuf: 1040 lastFill: 1280, numBytes: 224
    Sep 23 10:11:16.839: //-1//ACPK:EE67BBD328000:/AppCommon_SetSecurity: security = undefined
    Sep 23 10:11:16.839: //-1//ACPK:EE67BBD328000:/AppCommon_SetEventLog: event-log = unconfigured
    Sep 23 10:11:16.843: //-1//AFW_:EE67BBD328000:/Tcl_Link: Tcl_Eval Failed on top-level eval. code=1 code=ERROR
    Sep 23 10:11:16.843: TCL script failure
     Result:
        invalid command name "getVariable"
    Sep 23 10:11:16.843:  TCL script failure errorInfo:
       invalid command name "getVariable"
        while executing
    "getVariable callInfo callIPin"             
    Sep 23 10:11:16.843: //-1//AFW_:EE67BBD328000:/AFW_ExecEnv_SetScript: Num of packTable entries: 17
    Sep 23 10:11:16.843: //-1//AFW_:/AFW_ExecEnv_CallClose:  Exec Env state: 0
    Sep 23 10:11:16.843: //-1//SCRI:/cam_sa_stopped: Instance: [] ExecEnv: 0x67BBD328
    Sep 23 10:11:16.843: //-1//AFW_:HN000303E4:/AFW_M_TclModule_Free:  MOD[TclModule_67BC1114_0_197604] ( )
    Sep 23 10:11:16.847: //-1//SCRI:/AFW_M_Script_Register: Registering :remote_ip1:,
    Sep 23 10:11:16.847: //-1//SCRI:/AFW_M_Script_Register:    url:tftp://10.248.0.160/en/remote_ip.tcl:
    Sep 23 10:11:16.847: //-1//AFW_:/AFW_TclModule_New: 
    Sep 23 10:11:16.847: //-1//AFW_:EE67BBD410000:/Tcl_Link: Linking script remote_ip1
    Sep 23 10:11:16.851: //-1//ACPK:EE67BBD410000:/AppCommon_SetSecurity: security = undefined
    Sep 23 10:11:16.851: //-1//ACPK:EE67BBD410000:/AppCommon_SetEventLog: event-log = unconfigured
    Sep 23 10:11:16.851: //-1//AFW_:EE67BBD410000:/Tcl_Link: Tcl_Eval Failed on top-level eval. code=1 code=ERROR
    Sep 23 10:11:16.851: TCL script failure
     Result:
        invalid command name "getVariable"
    Sep 23 10:11:16.851:  TCL script failure errorInfo:
       invalid command name "getVariable"
        while executing
    "getVariable callInfo callIPin"             
    Sep 23 10:11:16.851: //-1//AFW_:EE67BBD410000:/AFW_ExecEnv_SetScript: Num of packTable entries: 17
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 29-09-2010 04:04:23 AM
    You can ignore this line since this script: url: tftp: / / 10.248.0.160/en/remote_ip.tcl not used by us. I canceled all loading the script on the new and the old IOS and the situation has not changed. Still
    in the old IOS I hear a voice prompt after the destruction connection with side
    B, and in new IOS i can not hear voice prompts after the destruction connection with side B.
     
    The script, which I wrote debug has the following configuration:


    dial-peer voice 33 pots
     service app_voice
     incoming called-number  2266404

     service app_voice tftp://10.248.0.247/en/voice.tcl
      param operator_number 73952958517
      paramspace english index 0
      param uid-len 1
      param max_no_info_dest_num_cnt 10
      param wait_before_dial 5
      paramspace english language en
      param problem_number 73952958517
      param pin-len 6
      param max_auto_dial_cnt 10
      paramspace english location tftp://10.248.0.247/en/voice/
      param max_count_connect_to_oper 1
      param max_no_info_card_num_cnt 10
      paramspace english prefix en
      param max_no_info_autodial_num_cnt 10
      param warning-time 300
      param max_auth_cnt 5
     
    I'm sorry for my english ..

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 30-09-2010 07:09:54 AM
    Hi Mihail Zamyatin,
     
    i have send your query to our DE Engineer, once i got the reply i will get back to you
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 30-09-2010 07:25:19 AM
    Thanks for the info

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 04-10-2010 05:31:50 AM
    Hi Mihail Zamyatin,
     
    Please configure terminal with following commands
    "logging buffered 10000000" 
     "no logging console" 
     
    enable following debugs and collect the output and send it to us for further analysis.
    undebug all
    debug voip app
    debug voip ccapi def
     
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 01-11-2010 10:20:35 AM
    Hi Mihail Zamyatin,
     
    Is your issue resolved, if not please send us the logs asap for futher analysis.
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 03-11-2010 02:40:40 AM
    Sorry for the late reply. I was away. The problem is still not resolved. I can do all that you wrote 05.11.2010

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 03-11-2010 05:16:09 AM
     
    thanks for the update!
     

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 05-11-2010 05:48:02 AM
    Hello, I wrote the message. Scenario described in the file.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 08-11-2010 06:31:27 AM
    Sorry. I'm on my carelessness, cut a large portion of the file. These commands are registered on the router.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 08-11-2010 04:56:28 AM
    Hi Mihail Zamyatin,
     
    Thanks for providing the logs with scenario,
    The attached logs are partial,Please provide us the complete logs by configuring the terminal with below commands.
     
    "logging buffered 10000000" 
     "no logging console" 
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 12-11-2010 05:09:56 AM
    Hi Mihail Zamyatin,
     
    sorry for late reply, our engineer analyzing the issue have one query is the incoming call from PSTN interface OR voip interface? If it is voip, which call signaing is bein gused H323 or SIP?
     
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 12-11-2010 07:55:26 AM
    I drew a simple diagram of communication. It is in the attachment.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 16-11-2010 10:02:28 AM
    Hi Mihail Zamyatin,
     
    Our engineer analyzed the issue and saying that,From the logs it appears everything is working as expected,GW seems to be playing the prompt correctly,If the Call is from PSTN side, there might be issue down-stream (T1/E1 trunks).
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 17-11-2010 04:13:48 AM
    Hello again, yes I have long seen in the logs that the script plays sound files correctly. But in fact we are on side A will not hear. What could be the problem with E1? After all, when the script is no longer "talk", I can make calls and this results in bilateral normal hearing. Forgive my persistence, but really want to solve the problem. Again described:
    1. We collect the access number (E1 ISDN PRI), hear the system prompt
    2. Pass the authorization on ANI or PIN
    3. Also hear the prompt to dial the number, can also check your balance (0 #)
    4. Dial
    the number B, say, after the conversation, the script stops playing
    audio files (although the logs show that all the plays).
    5 But, despite the fact that we do not hear sounds we are still able to dial another number B, and thus normally talk to.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 18-11-2010 06:58:54 AM
    Hi Mihail Zamyatin,

    Is there any way for Our engineer to dial-in to this GW and listen to this problem audio?, and also Please verify the audio file make sure it has correct audio data. Also make sure the audio file on the flash/memory is not corrupted.
     
    Thanks,
    Raghavendra
     

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 18-11-2010 07:56:23 AM
    Yes, I can arrange access. Version with a "bad" sound files looks unlikely, because These
    same files are played, before we talk with side B. Tell me please your
    Email, so that I could send you a PIN and access number.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 22-11-2010 05:30:53 AM
    Hi Mihail Zamyatin,
     
    I have one more suggestion,The prompt(en_enter_dest.au) you are playing is very very short (2 sec 300 ms). This might be too short for DSP to clean up old  jitter buffer and play the new media. Please try to replace the content of en_enter_dest.au to a longer prompt to see if that makes a difference. If it makes a difference, you can record <silence> at the beginning on the existing en_enter_dest.au prompt to take care of the problem.
     
    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 30-11-2010 11:15:30 AM
    Hello! followed your advice, I created the audio file length of 6 seconds. But unfortunately, it did not solve the problem.

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Mihail Zamyatin on 08-12-2010 07:13:58 AM
    Hello all. So the problem is solved as follows:
    I
    just encoded audio files, they are in *. au 8000Hz, 16-bit, mono 8-bit
    mu-Law, I converted to a *. wav 8000Hz, 16-bit, mono 8-bit A-Law. Thank you all!

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Juan Manuel Valladares on 13-06-2012 02:14:31 PM
    Hello!!
     
    If I wanna kill the call at 5 minutos, how can I do?

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Anusha Kannappan on 13-06-2012 10:27:03 PM
    Hi,

    #create a timer for 5 secs
    timer start named_timer 5 timer_1

    You can set timer as above when the call is active and once the timer expires, the script receives an ev_named_timer event then call a procedure that would destroy the connection and disconnect the leg

    Please go through the TCL IVR API programming guide from the following link to gain the basic knowledge for developing the scripts

    http://www.cisco.com/en/US/docs/ios/voice/tcl/developer/guide/tclivrv2.html

    Thanks,
    Anusha

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Juan Manuel Valladares on 14-06-2012 08:01:34 PM
    No there are nothing about kill the call, do you have any example about this?, help me please.... =(

    Look my TCL script, I found an example in other forum, but don't work it me...


    # Script Locked by: CiscoOfficial
    # Script Version: 2.0.2.8
    # Script Name: app_debitcard
    # Script Lock Date: Fri Aug  8 11:02:33 2003
    #        
    # Copyright (c) 2003 by Cisco Systems, Inc.
    # All rights reserved.
    #------------------------------------------------------------------
    #        
    # Description:
    #        
    # The debitcard application allows a user to to select the lanaguage
    # mode based on the langauges that are configured through the CLIs.
    # The application then prompts and collects the card number. The
    # card number consists of a uid and pin where uid-length and pin-length
    # are configured through through CLIs.
    # Authentication is done with the card number. If it passes authentication,
    # the application plays the amount available in the user's debitcard. It then
    # prompts and collects the destination number.
    # If authentication fails, the application allows user to retry and the number
    # of retries is configured through the CLI.
    # Authorization is done with the destination number. If authorization is
    # successful, the application plays a time duration which indicates the amount of
    # talk time in the user's debitcard account and places the call.
    # If authorization fails, the application allows users to retry.
    #        
    # The main routine is at the bottom.
    #        
    # Modifications (5/12):
    #        
    # - Added new playprompt usage
    # - Notify user if AAA server is dead
    # - Spanish lang support
    # - For account with zero credit, only allow them to make toll-free calls
    # - type ahead with Long Pound feature
    #        
    # Modifications (6/7)
    #        
    # - Play failure tone instead of a prompt when place_call fails
    # - Play a prompt when an invalid language is selected
    #
    # Modifications (6/24)
    # - Enable long pound detection only for debitcard application
    #
    # Modifications (6/25)
    # - Deleted while loop at the end of the script
    # - Script will loop back to start at beginning.
    #
    # Modifications (7/7)
    # - new verb setVariable
    # - Usage : setVariable language 1
    #           setvariable longpound true
    # - replaced all language prefixes (en_, sp_) with genric prefixes (prefix1, prefix2 etc)
    #
    # Modifications (7/13)
    # - Modified prompt playing sequence in select_language for primary and secondary
    #   languages
    #
    # Modifications (8/6)
    # - Allow 1 language support
    # - After long pound, skip the first authorization request, ie. creditamt is not
    #   played back to the user
    # - Play error prompts depending on return codes for Radius
    #
    # Modification CSCdu08506
    # - Fix for not playing message when caller is out of time
    # - Script should say it is disconnecting.
    # - Need to split connection destroy and media play
    #
    # Modification (4/30/2001)
    # - Fix for newguid generate
    # - new conf-id after longPound
    #
    # Modification (5/10/2001)
    # - Nirmala Shukla
    # - Modified script for longpound (Illayaraja) featurette.
    #   This featurette allows an application to terminate a pending call setup upon
    #  detecting a digit event, e.g., a long pound.  
    #
    # Modification (10/22/2001)
    # - CSCdv54414 long pound calls have same GUID
    # - CSCdv48808 long pound during ring does not work
    #
    # Modification (1/2/2002)
    # - CSCdw24067 fix to generate a new h323-conf-id for calls
    #              after called party hangup
    #
    # Modification (2/14/2002)
    # - CSCdv54436 Fix the problem application aborts when # or non
    #              numeric key is entered during language selection
    #
    # Modification (4/4/2002)
    # - CSCdx20442 Long pound functionality does not function fully.
    #   Remove comment for playtone in act_TerminateSetup
    #
    # Modification (9/25/2002)
    # - CSCdy74069 Script does not play more then two languages
    #   Fixed ability to play language selection based on
    #   total CLI configured languages
    #
    # Modification (11/08/2002)
    # - CSCdz04390 When placing a call on an AS5300, using the standard
    #   debit card application for IVR,a call will disconnect approximately
    #   2 seconds before the "credit-time" sent by the radius server expires. 
    #   Debugs show the credit time of 120 seconds, but the connect/disconnect
    #   times are only roughly 118 seconds apart.
    #
    #   Modification (01/23/2003)
    #   CSCdz88609 Included the language selection prompt files that were missing
    #
    # Modification (08/07/2004)
    # - CSCeb67481 does not generate new GUID when call setup fails (E238047)
    #
    #----------------------------------------------------------------


    proc init { } {
        global param1
        global beep
        global param2
        global param3
        global pound
       

        set beep 0
        set pound 0

        set param1(interruptPrompt) true
        set param1(abortKey) *
        set param1(terminationKey) #

       
        set param2(interruptPrompt) true
        set param2(abortKey) *
        set param2(terminationKey) #
        set param2(dialPlanTerm) true

        set param3(interruptPrompt) true
        set param3(abortKey) *
        set param3(terminationKey) #
    }

    proc init_ConfigVars { } {
        global accountLen
        global pinLen
        global retryCnt
        global operatorNum
        global warnTime
        global totalLang

        set accountLen [string trim [infotag get cfg_avpair uid-len]]
        set pinLen [string trim [infotag get cfg_avpair  pin-len]]
        set retryCnt [string trim [infotag get  cfg_avpair retry-count]]
        set operatorNum [string trim [infotag get cfg_avpair  redirect-number]]
        set warnTime [string trim [infotag get cfg_avpair  warning-time]]

        #Language related variables
        set totalLang [string trim [infotag get med_total_languages]]
    }

    proc init_perCallVars { } {
        global selectCnt
        global count
        global fcnt
        global ani
        global dontPlayAmount
        global destBusy
        global noTimeLimit
        global promptFlag
        global promptFlag2
        global noPlay
        global outgoingDisconnect
        global commandHandle
        global lastCallSetupFail

        set selectCnt 0
        set count 0
        set fcnt 0
        set dontPlayAmount 0
        set destBusy 0
        set noTimeLimit 0
        set promptFlag 0
        set promptFlag2 0
        set noPlay 0
        set outgoingDisconnect 0
        set lastCallSetupFail 0
        set commandHandle ""

        set ani [infotag get leg_ani]
       
    }

    proc act_Setup { } {
        global totalLang
        global param1
       
        init_perCallVars
        infotag set med_language 1

        leg setupack leg_incoming
        leg proceeding leg_incoming
        leg connect leg_incoming

        #Lang selection
        puts "\nTotalLanguages=$totalLang"
        if { $totalLang < 1 } {
    act_Cleanup
    return
        }
       
        if { $totalLang == 1 } {
    media play leg_incoming _candidato.au
    fsm setstate ONELANG
    return
        }

        set param1(maxDigits) 1
        leg collectdigits leg_incoming param1

        # Build language promp string based on totalLang

        for {set i 1} {$i <= $totalLang} {incr i} {
           append lang_prompt "%c[set i] " "_lang_sel[set i].au "
        }
        media play leg_incoming _candidato.au $lang_prompt
    }

    proc act_LangSelect { } {
        global param1
        global selectCnt
        global totalLang
        global retryCnt
      
        set status [infotag get evt_status]
        #Collect Success ...matched pattern
        if {$status == "cd_005"} {
              set input [infotag get evt_dcdigits]

    if {![regexp {^([0-9])$} $input d langId]} {
                     incr selectCnt
               if {$selectCnt < $retryCnt} {
              leg collectdigits leg_incoming param1

                     # Build language promp string based on totalLang

                     for {set i 1} {$i <= $totalLang} {incr i} {
                        append lang_prompt "%c[set i] " "_lang_sel[set i].au "
       }
                     media play leg_incoming %c1 _no_lang_sel.au $lang_prompt

              fsm setstate same_state
                    } else {
              media play leg_incoming %c1 _generic_final.au
              fsm setstate CALLDISCONNECT
            }
                    return
    }
    set status [infotag set med_language [infotag get evt_dcdigits] ]
           
    if { ($status == "language not supported") ||
          ($status == "language not specified in configuration") } {
        
         incr selectCnt
         if {$selectCnt < $retryCnt} {
      #Get the map and use it...not this way ???
     
      set param1(maxDigits) 1
      leg collectdigits leg_incoming param1
                   
                    # Build language promp string based on totalLang

                    for {set i 1} {$i <= $totalLang} {incr i} {
                       append lang_prompt "%c[set i] " "_lang_sel[set i].au "
      }
                    media play leg_incoming %c1 _wrong_lang_sel.au $lang_prompt

      fsm setstate same_state
      return
                } else {
      media play leg_incoming %c1 _generic_final.au
      fsm setstate CALLDISCONNECT
      return
                }
    }
    #Get the card No
    act_GetCard
        }
       
        #Collect timeout/Abort
        if { ($status == "cd_001") ||
      ($status == "cd_002")} {

    incr selectCnt
    if {$selectCnt < $retryCnt} {
         leg collectdigits leg_incoming param1

                # Build language promp string based on totalLang

                for {set i 1} {$i <= $totalLang} {incr i} {
                   append lang_prompt "%c[set i] " "_lang_sel[set i].au "
                }
                media play leg_incoming %c1 _no_lang_sel.au $lang_prompt
         fsm setstate same_state
            } else {
         media play leg_incoming %c1 _generic_final.au
         fsm setstate CALLDISCONNECT
            }
        }     
         
    }

    proc act_GetCard { } {

        global cardLen
        global accountLen
        global pinLen
        global count
        global param1
        global promptFlag

        set cardLen [expr $accountLen + $pinLen]


        set param1(maxDigits) $cardLen

        leg collectdigits leg_incoming param1
        if {$count == 0} {
    media play leg_incoming _enter_card_num.au
        } else {
    if {$promptFlag == 1 } {
         media play leg_incoming  _invalid_digits.au
    }
    if {$promptFlag == 2 } {
         media play leg_incoming _auth_fail.au
    }
    if {$promptFlag == 3} {
         media play leg_incoming _no_card_entered.au
    }
        }

    }

    proc act_GotCardNumber { } {
        global count
        global retryCnt
        global promptFlag
        global account
        global pin
        global accountLen
        global cardLen
        global ani

        set status [infotag get evt_status]

        # Do we need to calculate len ???
        if {$status == "cd_005"} {
    set number [infotag get evt_dcdigits]
    set numberLen [ string length $number ]
    if { $numberLen == $cardLen } {
                set account [ string range $number 0 [expr $accountLen -1]]
                set pin [ string range $number $accountLen [expr $cardLen -1]]
        
         #Do authorize
         aaa authorize $account $pin  $ani "" leg_incoming
            } else {
                incr count
                set promptFlag 1
                if {$count < $retryCnt} {
      act_GetCard
      fsm setstate same_state
                } else {
      media play leg_incoming _final.au
      fsm setstate CALLDISCONNECT
         }
            }
    return
        }
       
        #timeout
        if {$status == "cd_001"} {
    set number [infotag get evt_dcdigits]
    puts "\nNUMBER=$number"
    set numberLen [ string length $number ]
    if { $numberLen == 0 } {
         incr count
         set promptFlag 3
         if {$count < $retryCnt} {
      act_GetCard
      fsm setstate same_state
         } else {
      media play leg_incoming  _final.au
      fsm setstate CALLDISCONNECT
     
         }
         return
    }
    if { $numberLen == $cardLen } {
                set account [ string range $number 0 [expr $accountLen -1]]
                set pin [ string range $number $accountLen [expr $cardLen -1]]
        
         #Do authorize
         aaa authorize $account $pin  $ani "" leg_incoming
            } else {
                incr count
                set promptFlag 1
                if {$count < $retryCnt} {
      act_GetCard
      fsm setstate same_state
                } else {
      media play leg_incoming _final.au
      fsm setstate CALLDISCONNECT
         }
            }
    return
        }
       
        #Aborted
        if {$status == "cd_002"} {
    act_GetCard
    fsm setstate same_state
    return
        }
       
        #timeout/fail(disconnected)/invalid_no
        #shd we play a diff prompt for disconnected...what is disconnected???
        if {($status == "cd_001") ||
    ($status == "cd_007") ||
    ($status == "cd_006")} {
    incr count
            set promptFlag 3
            if {$count < $retryCnt} {
         act_GetCard
         fsm setstate same_state
            } else {
         media play leg_incoming  _final.au
         fsm setstate CALLDISCONNECT
    }
    return
        }
    }

    proc act_FirstAuthorized { } {
        global count
        global retryCnt
        global promptFlag
        global amt

        set status [infotag get evt_status]
       
        puts "\n aaa authorize Status=$status"
        if { $status == "ao_000" } {
            if { [infotag get aaa_avpair_exists h323-credit-amount] } {
         set amt [infotag get aaa_avpair h323-credit-amount]
    } else {
         media play leg_incoming _no_aaa.au
         fsm setstate CALLDISCONNECT
         return
    }

    act_GetDest
    return
        } else {
    if { [infotag get aaa_avpair_exists h323-return-code] } {
         set returnCode [infotag get aaa_avpair h323-return-code]
    } else {
         #No return code from radius
                media play leg_incoming _no_aaa.au
         fsm setstate CALLDISCONNECT
                return
    }

    incr count
            set promptFlag 2
            if { $count < $retryCnt } {
         act_GetCard
         fsm setstate CARDSELECTION
            } else {
         #First authorize failed
                media play leg_incoming _final.au

         fsm setstate CALLDISCONNECT
            }
            return 0

        }
        fsm setstate CALLDISCONNECT
    }

    proc act_TerminateSetup { } {
        global duration
        global commandHandle

        puts "\n\t\t**** act_TerminateSetup"

        if { [infotag get evt_digit] != "#" } {
    fsm setstate same_state
        } else {
            set duration [infotag get evt_digit_duration]

            if { $duration < 1000 } {
         fsm setstate same_state
    } else {
                # Longpound detected

                set returnCode [command terminate $commandHandle]
                puts "\n supress any tones that might be active \n"
                playtone leg_incoming "tn_none"

                if { $returnCode == 0 } {

            # continue to wait for the ev_setup_done

         } elseif { $returnCode == 1 } {

            # The call setup command is done, no event will be returned

            act_Just_GetDest
            fsm setstate GETDEST

        } elseif { $returnCode == 2 } {
            # Invalid command.  Maybe setup had not been initiated, attempt to
                   # wait for it.
               puts "\n\t\t**** Oops, command terminate command invalid!"
            fsm setstate PLACECALL
        }
    }
        }
    }

    proc act_GetDest { } {
        global fcnt
        global amt
        global promptFlag2
        global destBusy
        global param2
        global pound

        set param2(enableReporting) true
        set param2(ignoreInitialTermKey) true

        leg collectdigits leg_incoming param2

        if {$fcnt == 0} {
            if {$amt == 0} {
                media play leg_incoming _zero_bal.au
         fsm setstate CALLDISCONNECT
            } elseif {$amt > 999999.99} {
                media play leg_incoming _invalid_amt.au _dollars.au %s1000 _enter_dest.au
            } elseif {$destBusy == 1} {
         set destBusy 0
                media play leg_incoming _dest_busy.au
    } elseif {$pound == 1} {
                media play leg_incoming _disconnect.au _enter_dest.au
            } else {
         media play leg_incoming _you_have.au %a$amt %s1000 _enter_dest.au
            }
        } else {
             switch -regexp $promptFlag2 {
          {1} { media play leg_incoming _reenter_dest.au }
          {2} { media play leg_incoming _author_fail.au }
          {3} { media play leg_incoming _no_dest_entered.au }
      }
        }
    }

    proc act_GotDest { } {
        global fcnt
        global retryCnt
        global promptFlag2
        global destination
        global ani
        global account
        global pin
        global dontPlayAmount

        set status [infotag get evt_status]

        #matched dialplan
        if {$status == "cd_004"} {
    set destination [infotag get evt_dcdigits]
    aaa authorize $account $pin  $ani $destination leg_incoming
    return
        }

        #aborted
        if {$status == "cd_002"} {
    if {$dontPlayAmount == 1} {
         act_Just_GetDest
    } else {
         act_GetDest
    }
    fsm setstate same_state
    return
        }


        incr fcnt
        if {$fcnt < $retryCnt} {
    #timeout
    #shd we play a diff prompt for disconnected...what is disconnected???
    if {$status == "cd_001" } {
         set promptFlag2 1
    }
    #fail(disconnected)
    if {$status == "cd_007" } {
         set promptFlag2 3
    }
    #for all other cases like cd_006(invalid no)
    set promptFlag2 1
    if {$dontPlayAmount == 1} {
         act_Just_GetDest
    } else {
         act_GetDest
    }
    fsm setstate same_state
        } else {
    media play leg_incoming _dest_collect_fail.au
    fsm setstate CALLDISCONNECT
        }
       
       
    }

    proc act_SecondAuthorized { } {
        global account
        global destination
        global noTimeLimit
        global creditTime
        global warnTime
        global promptFlag2
        global fcnt
        global retryCnt
        global noPlay
        global commandHandle
       
        set callInfo(accountNum) $account

        if { [infotag get aaa_avpair_exists h323-return-code] } {
    set returnCode [infotag get aaa_avpair h323-return-code]
        } else {
    #No return code from radius
    media play leg_incoming _no_aaa.au
    fsm setstate CALLDISCONNECT
    return
        }
       
         if {$returnCode == 13} {
      # allow user to make toll-free calls
      set noTimeLimit 1
      leg setup $destination callInfo leg_incoming
             set commandHandle [infotag get last_command_handle]
      return
         }
         #this is same as above ???
         if {$returnCode == 52} {
      # Redirect to customer service using redirect number
      set noTimeLimit 1
      leg setup $destination callInfo leg_incoming
             set commandHandle [infotag get last_command_handle]
      return
         }

        set status [infotag get evt_status]
        puts "\n aaa authorize Status=$status"

        if { $status == "ao_000" } {
    if { [infotag get aaa_avpair_exists h323-credit-time] } {
         set creditTime [infotag get aaa_avpair h323-credit-time]
    } else {
         media play leg_incoming _no_aaa.au
         fsm setstate CALLDISCONNECT
         return
    }

    if {$creditTime == "uninitialized"} {
                media play leg_incoming _no_aaa.au
         fsm setstate CALLDISCONNECT
         return
            } elseif {$creditTime == "unlimited"} {
         set noTimeLimit 1
         # play mesg only if time left is  20 secs > warntime
            } elseif {[expr $creditTime - $warnTime] < 20} {
         set noPlay 1
         media play leg_incoming _you_have.au %t$creditTime
            } else {
         media play leg_incoming _you_have.au %t$creditTime
            }

        } else {
    #Authorization failed
    act_PlayReturnCode $returnCode
    if { $returnCode == 4 } {
         #special Case ???...no retry check also
         set noTimeLimit 1
         return
    } else {
         fsm setstate CALLDISCONNECT
         return
    }

    incr fcnt
            set promptFlag2 2
    if { $fcnt < $retryCnt } {
                act_GetDest
         fsm setstate GETDEST
        
            } else {
                #second authorize failed

                media play leg_incoming _final.au
         fsm setstate CALLDISCONNECT
            }
    fsm setstate CALLDISCONNECT
        }
    }

    proc act_PlayReturnCode {returnCode} {

        switch $returnCode {
    3  { media play leg_incoming _account_blocked.au }
    4  { media play leg_incoming  _zero_bal.au }
    5  { media play leg_incoming _card_expired.au }
            7  { media play leg_incoming _blocked.au }
            9  { media play leg_incoming _dest_blocked.au }
            12 { media play leg_incoming _not_enuf.au }
    default { media play leg_incoming _no_aaa.au }
        }
       
    }

    proc act_CallSetup { } {
        global destination
        global account
        global pound
        global commandHandle
        global outgoingDisconnect
        global lastCallSetupFail

        if { ($pound == 1) || ($outgoingDisconnect == 1) || ($lastCallSetupFail == 1) } {
             set callInfo(newguid) true
      set lastCallSetupFail 0
        }

        set callInfo(accountNum) $account
        leg setup $destination callInfo leg_incoming
        set commandHandle [infotag get last_command_handle]
    }

    proc act_CallSetupDone { } {
        global warnTime
        global creditTime
        global noPlay
        global noTimeLimit
        global param3
        global pound
        global outgoingDisconnect
        global lastCallSetupFail

        set status [infotag get evt_status]

        set param3(interruptPrompt) true
        set param3(enableReporting) true
       
        if {$status == "ls_000"} {
            set pound 0
            set outgoingDisconnect 0

    if { ($noTimeLimit == 1) } {
         #no timer
    } else {
         if {$creditTime < $warnTime} {
      if {$noPlay == 1} {
          timer start leg_timer  [expr $creditTime] leg_incoming
      } else {
          timer start leg_timer [expr $warnTime] leg_incoming
      }
      fsm setstate CALLLASTACTIVE

         } else {
      set delay [expr $creditTime - $warnTime]
      timer start leg_timer $delay leg_incoming
      fsm setstate CALLACTIVE
         }
    }
            return

        #call setup timeout/invalid no/Destination Busy/dest disconnect/
        #conference failed/

        } elseif { ($status == "ls_002") ||
          ($status == "ls_004") ||
          ($status == "ls_007") ||
          ($status == "ls_009") ||
          ($status == "ls_010") ||

        } {
           set lastCallSetupFail 1
           act_DestBusy
           return
        } else {
            # leg setupFail

            set tone [infotag get evt_status]
            playtone leg_incoming $tone
            timer start leg_timer 5 leg_incoming
            fsm setstate CALLDISCONNECT
        }
    }

    proc act_HandleOutgoing { } {
        global outgoingDisconnect

        if { [infotag get evt_legs] == [infotag get leg_outgoing] } {
    puts "\nOutgoing Disconnected"
    connection destroy con_all
    set outgoingDisconnect 1
    return
        }
        call close
        fsm setstate CALLDISCONNECT

    }


    proc act_LongPound { } {
        global duration
        global pound

        if { [infotag get evt_digit] != "#" } {
    fsm setstate same_state
    return
        }

        set duration [infotag get evt_digit_duration]
        if { $duration < 1000 } {
            fsm setstate same_state
    return
        } else {
            set pound 1
            connection destroy con_all
        }
    }

    proc act_Just_GetDest { } {
        global fcnt
        global promptFlag2
        global pound
        global destBusy
        global param2
        global outgoingDisconnect

        set param2(enableReporting) true
        set param2(ignoreInitialTermKey) true

        leg collectdigits leg_incoming param2
        if {$fcnt == 0} {
    if {$outgoingDisconnect == 1} {
         media play leg_incoming _disconnect.au %s1000 _enter_dest.au
    } elseif {$destBusy == 1} {
         set destBusy 0
         media play leg_incoming _dest_busy.au
    } elseif {$pound == 1} {
                  media play leg_incoming _disconnect.au _enter_dest.au
    } else {
         media play leg_incoming _enter_dest.au
    }
        } else {
            if {$promptFlag2 == 1} {
                media play leg_incoming _reenter_dest.au
            }
            if {$promptFlag2 == 2} {
                media play leg_incoming _author_fail.au
            }
            if {$promptFlag2 == 3} {
                media play leg_incoming _no_dest_entered.au
            }
        }
    }

    proc act_ConnDestroyed { } {
        global dontPlayAmount

        leg disconnect leg_outgoing
        set dontPlayAmount 1
        act_Just_GetDest
    }

    proc act_DestBusy { } {
        global destBusy
       
        #current debitcard implementation
        set destBusy 1
        act_Just_GetDest
        fsm setstate GETDEST
    }

    proc act_Timer { }
    {

    global DURATION
    set DURATION 20

    while{1}
    {
    set currenttime [infotag get leg_settlement_time leg_outgoing]
    if { $currenttime >= $DURATION }
    {
    connection destroy con_all
    }
    }



    proc act_CallWarnDestroy { } {
        global warnTime
        media play leg_incoming _you_have.au %t$warnTime
    }

    proc act_CallWarnMedia { } {
        global incoming
        global outgoing

        connection create $incoming $outgoing 
    }

    proc act_ConnectionDestroy { } {
        connection destroy con_all
    }

    proc act_LastActiveTimer { } {
        leg disconnect leg_outgoing
      
    }

    proc act_PlayDisconnect { } {
         media play leg_incoming _disconnect.au
    }

    proc act_Ignore { } {
    # Dummy
        puts "Event Capture"
    }

    proc act_Cleanup { } {
        call close
    }

    requiredversion 2.0
    init

    #Get Variables
    init_ConfigVars

    #----------------------------------
    #   State Machine
    #----------------------------------
      set fsm(any_state,ev_disconnected)           "act_Cleanup           same_state"
       
      set fsm(CALL_INIT,ev_setup_indication)       "act_Setup             LANGSELECTION"

      set fsm(ONELANG,ev_media_done)               "act_GetCard           CARDSELECTION"

      set fsm(LANGSELECTION,ev_collectdigits_done) "act_LangSelect        CARDSELECTION"

      set fsm(CARDSELECTION,ev_collectdigits_done) "act_GotCardNumber     AUTHORIZE"
     
      set fsm(AUTHORIZE,ev_authorize_done)         "act_FirstAuthorized   GETDEST"

      set fsm(GETDEST,ev_collectdigits_done)       "act_GotDest           SECONDAUTHORIZE"

      set fsm(SECONDAUTHORIZE,ev_authorize_done)   "act_SecondAuthorized  PLACECALL"

      set fsm(PLACECALL,ev_media_done)             "act_CallSetup         PLACECALL"
      set fsm(PLACECALL,ev_setup_done)             "act_CallSetupDone     CALLACTIVE"
      set fsm(PLACECALL,ev_digit_end)              "act_TerminateSetup    WAITFORSETUPDONE"

      set fsm(WAITFORSETUPDONE,ev_setup_done)       "act_Just_GetDest     GETDEST"

      set fsm(CALLACTIVE,ev_leg_timer)             "act_Timer             CALLDISCONNECTED"
      set fsm(CALLACTIVE,ev_digit_end)             "act_LongPound         CONNDESTROY"
      set fsm(CALLACTIVE,ev_disconnected)          "act_HandleOutgoing    CONNDESTROY"

      set fsm(CALLLASTACTIVE,ev_leg_timer)         "act_ConnectionDestroy PLAYDISCONNECT"
      set fsm(CALLLASTACTIVE,ev_digit_end)         "act_LongPound         CONNDESTROY"

      set fsm(PLAYDISCONNECT,ev_destroy_done)      "act_LastActiveTimer   CALLDISCONNECTPLAY"
      set fsm(CALLDISCONNECTPLAY,ev_disconnect_done) "act_PlayDisconnect  CALLDISCONNECT"

      set fsm(CALLWARN,ev_destroy_done)            "act_CallWarnDestroy   same_state"
      set fsm(CALLWARN,ev_media_done)              "act_CallWarnMedia     CALLLASTACTIVE"

      set fsm(CONNDESTROY,ev_destroy_done)         "act_ConnDestroyed     GETDEST"

      set fsm(CALLDISCONNECT,ev_media_done)        "act_Cleanup           same_state"
      set fsm(CALLDISCONNECT,ev_disconnect_done)   "act_Cleanup           same_state"
      set fsm(CALLDISCONNECT,ev_leg_timer)         "act_Cleanup           same_state"
     
      fsm define fsm CALL_INIT
    # Script Approval Signature: C/502c



    If you see the problem tell me please.... Thank you so much!

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 15-06-2012 01:33:14 AM
    Hi Juan,

    what is the issue you facing with the script, BTW since it is cisco official script you can raise TAC case if you face any problem with the script TAC team will help you.

    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Juan Manuel Valladares on 15-06-2012 11:39:45 AM
    I wanna kill a call (whatever) after 5 minutes elapsed time. Where I can contact the TAC team?

    If you see my TCL script in the previous page there's a part it say:

    proc act_timer{}
    {
    global DURATION
    set DURACTION 20 (Here's 5 minutes, I believe are milliseconds, I don't know why I wrote 20)
    .
    .
    .
    .
    }
    }
    }


    This is an example that I found in a forum, but I don't know why don't work it, or maybe is wrong...


    Thanks a lot of again for your help!!!

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: Raghavendra Gutty Veeranagappa on 18-06-2012 05:26:21 AM
    Hi Juan,

    you can raise TAC service request with below link.

    http://tools.cisco.com/ServiceRequestTool/create/launch.do

    Thanks,
    Raghavendra

    Subject: RE: unable to play prompt to incoming leg after a connection destroy
    Replied by: vinh nguyen on 11-07-2012 12:48:23 PM
    this is an issue with IOS version. i updated the IOS version, and now it worked. But now im faced with another issue .