TCL Script to force call disconnect

Version 1

    Subject: RE: TCL Script to force call disconnect
    Replied by: Raghavendra Gutty Veeranagappa on 19-08-2011 08:15:32 AM
    Hi Michel,

    once the call is active you can start  timer for certain duration, after timer expired you can destroy the connection using connection destroy command.

    for more information refer the documentation section for samples and you can also view the video in video tutorials to get stated with TCL-IVR.

    http://developer.cisco.com/web/vgapi/docs

    http://developer.cisco.com/web/vgapi/vid;jsessionid=65C28B6ED6625CEDE5E7EEF9770F07F7.liferay-portal2


    Thanks,
    Raghavendra
    This document was generated from CDN thread

    Created by: Michel Nasr on 19-08-2011 07:13:54 AM
    Hello,
     
    I need to know if there is a method using a TCL script that force a call disconnect after a certain duration.

    If yes, kindly provide me with the needed/required steps.
     
    Many thanks

    Subject: RE: TCL Script to force call disconnect
    Replied by: Michel Nasr on 22-08-2011 08:38:42 AM
    Dear Raghavendra,

    Thank you for your video and document, they were really helpful.

    However, i seem to have something missing, here's my script:

    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_Cleanup { }
    {
    call close
    }

    init
    #----------------------------------
    # State Machine
    #----------------------------------
    set fsm(any_state,ev_disconnected) "act_Cleanup,same_state"
    set fsm(CALLACTIVE,ev_leg_timer) "act_Timer,CALLDISCONNECTED"
    set fsm(CALLACTIVE,ev_disconnected) "act_Cleanup,CALLDISCONNECTED"
    set fsm(CALLDISCONNECTED,ev_disconnected) "act_Cleanup,same_state"
    set fsm(CALLDISCONNECTED,ev_disconnect_done) "act_Cleanup,same_state"



    I have loaded the script into the router, applied it under a dial-peer, but i get a "configured" state:

    Script Name : tcltest
           URL  : tftp://1.1.1.1/tcltest.tcl
           Type : Service
           State: Loaded
           Life : Configured
           Exec Instances: 0

    Script Code Begin:
    --------------------------------
    ....

    Shouldn't it be registered as per your video ?
    Please let me know what i have done wrong, and how to fix it.

    Thanks a lot for your assistance,
    Michel

    Subject: RE: TCL Script to force call disconnect
    Replied by: Raghavendra Gutty Veeranagappa on 22-08-2011 09:26:09 AM
    Hi Michel,

    yes if the script is with out error then it should be in registered state , please check sh log for error.

    BTW is this is your complete because there is no leg setup used for connection , fsm state not defined .

    please go through the document once to create sample tcl scripts.

    Thanks,
    Raghavendra

    Subject: RE: TCL Script to force call disconnect
    Replied by: Juan Manuel Valladares on 25-06-2012 01:44:27 PM
    Hi!
     
    Did you make the script???
     
    it works?
     
    Can you help me? I wanna do the same, tell me how did you do.
     
    Send me your example please...
     
    Thanks a lot... =)

    Subject: TCL Script to force call disconnect
    Replied by: Hassan Alsafi on 24-07-2012 05:46:03 PM
       Dears ,
     
               We have Call Manager 6.1 . We need to disconnect calls after 10 min or 5 min .
     
           Please can you show me the way to do it or how to make TCL script for disconnect calls
     
           or the thired partner we can contact them .
     
     
    Best Regards ,

    Subject: TCL Script to force call disconnect
    Replied by: Hassan Alsafi on 24-07-2012 07:50:34 PM
     
      Dear Yaw-Ming Chen,
     
            Please can you show me  the steps to do it in the router voice gateway
      or any other solution or the contact  to the thierd partner .
     
     Thank you for your assisting .
     

       Best Regards ,

    Subject: RE: TCL Script to force call disconnect
    Replied by: Yaw-Ming Chen on 24-07-2012 06:17:50 PM
    Not quite sure what you mean "We have Call Manager 6.1 . We need to disconnect calls after 10 min or 5 min ".
    But Tcl is used for Cisco voice gateway or CME. Tcl is not for the Call Manager.