TBCT TCL Script template

Version 1
    This document was generated from CDN thread

    Created by: Weihui Ted MENG on 27-04-2010 12:22:51 PM
    I am stuck in programing the Cisco voice gateway to support TBCT (ISDN Two B-Channel Transfer) using TCL scripting. I could not find a template from Cisco.com for the scripting and need a help from you guys to see whether any help be available for the template.

    Subject: RE: TBCT TCL Script template
    Replied by: Weihui Ted MENG on 27-04-2010 12:55:10 PM
    Hi ViJay,
     
    With the experience with the ACD IVR TCL scripting, I can find template from Cisco.com, and tune the script to what I want. However, I could not find the template to initilize the TBCT scripting. Can you shed some lights on the template?
     
    Also, is the TBCT TCL a must-to-have to enable the Cisco voice GW to enable the TBCT feature, considering the PRI has already subscribed the TBCT from CO?
     
    Thanks.

    Subject: RE: TBCT TCL Script template
    Replied by: Anusha Kannappan on 28-04-2010 12:25:34 PM
    Hi Weihui,
     
    By issuing the following command you can initialize the TBCT script
     
    call application voice application-name {location | av-pair}
    or 
    application
    service application-name location
     
    For more details you can go through the following link.
    http://www.ciscoios.biz/en/US/docs/ios/12_3/vvf_r/vrg_i1.html#wp1042282
     
    Thanks,
    Anusha

    Subject: RE: TBCT TCL Script template
    Replied by: Weihui Ted MENG on 28-04-2010 12:42:13 PM
    Anusha,
     
    Thanks for replying. I already had those IOS commands on the GW, but stuck in the TCL script, as I could not find a script template for TBCT particularly on cisco.com. Could you shed light on where I can find this script? I already checked the IVR programming guide 2.0, but still kind of being lost on the road not knowing how to write the script. I am truely network engineer and have weak skills on programming, though I know how to twick the ACD TCL scipt. So any help would be really appreciated. Thanks.

    Subject: RE: TBCT TCL Script template
    Replied by: Vijay Prasad Neelamegam on 27-04-2010 12:38:38 PM
    Hi Weihui,
     
    Are you need of API support or logic support? You can have a look at the TBCT transfer process in the following Link
     
    http://www.ciscopartner.biz/en/US/docs/ios/voice/tcl/developer/guide/tclivrv2_ch1.html
     
    Thanks
    Vijay

    Subject: RE: TBCT TCL Script template
    Replied by: Anusha Kannappan on 30-04-2010 09:07:47 AM
    Hi Weihui,
     
    In TBCT we can achieve the blind as well as the consultation call transfers. Please brief us the exact scenario you are trying for.
     
    Also our scripts are not free they are fee based. For more details related to this and to become a technology Parter you can check the following link
    http://developer.cisco.com/web/cdc/program-membership 
     
    Thanks,
    Anusha.

    Subject: RE: TBCT TCL Script template
    Replied by: Borislav Mateev on 15-05-2010 01:25:24 AM
    Here is a sample script, but it does not seem to work.
    Let me know if you get it to work.
     

    #---------------------------------
    # Example Script
    #---------------------------------
    ¿
    proc init { } {
    global param
    set param(interruptPrompt) true
    set param(abortKey) *
    set param(terminationKey) #
    }
    proc act_Setup { } {
    global dest
    global beep
    global xfr_mode
    set beep 0
    if { [infotag get leg_isdid] } {
    set dest [infotag get leg_dnis]
    leg proceeding leg_incoming
    leg connect leg_incoming
    set callInfo(mode) redirect-at-alert
    set callInfo(notifyEvents) "ev_transfer_status ev_alert ev_progress"
    set callInfo(newguid) true
    # Enable following if xfer mode to be configured by CLI
    #set xfr_mode [infotag get cfg_avpair mode]
    #puts "\nTCL: ***** >> act_Setup mode = $xfr_mode << ****"
    #set callInfo(mode) $xfr_mode
    leg setup $dest callInfo leg_incoming
    fsm setstate PLACECALL
    } else {
    leg setupack leg_incoming
    playtone leg_incoming tn_dial
    set param(dialPlan) true
    leg collectdigits leg_incoming param
    }
     
     
    }
    proc act_GotDest { } {
    global dest
     
    set status [infotag get evt_status]
     
    if { $status == "cd_004" } {
    set dest [infotag get evt_dcdigits]
    leg proceeding leg_incoming
    leg setup $dest callInfo leg_incoming
     
    } else {
    puts "\nCall [infotag get con_all] got event $status collecting destination"
    call close
    }
    }
     
    proc act_CallSetupDone { } {
    global beep
    set status [infotag get evt_status]
    if { $status == "ls_000"} {
    puts " call has been hairpinned "
    puts "CLI_3:END:FAIL "
     
    } elseif {$status == "ls_040" } {
    puts "call transfer sucessful status is $status "
    puts "CLI_3:ENDASSED "
    act_Cleanup
    } else {
    puts " transfer status is $status "
    }
    }
    proc act_Timer { } {
    global beep
    global incoming
    global outgoing
    set incoming [infotag get leg_incoming]
    set outgoing [infotag get leg_outgoing]
     
    if { $beep == 0 } {
    #insert a beep ...to the caller
    connection destroy con_all
    set beep 1
    } else {
    connection destroy con_all
    fsm setstate LASTWARN
    }
    }
    proc act_HandleDisconnect { } {
    set evtLegId [string trim [infotag get evt_legs]]
    set status [infotag get evt_status]
    puts "Disconnect status $status "
    #leg disconnect $evtLegId
    }
    ¿
    proc act_LastWarn { } {
    media play leg_incoming flash:out_of_time.au
    }
    proc act_Destroy { } {
    media play leg_incoming flash:beep.au
    }
    proc act_Beeped { } {
    global incoming
    global outgoing
    connection create $incoming $outgoing
    }
    proc act_ConnectedAgain { } {
    timer start leg_timer 10 leg_incoming
    }
    proc act_Ignore { } {
    # Dummy
    puts "Event Capture"
    }
    proc act_Cleanup { } {
    call close
    }
    init
    #----------------------------------
    # State Machine
    #----------------------------------
    set fsm(any_state,ev_disconnected) "act_Cleanup same_state"
    set fsm(CALL_INIT,ev_setup_indication) "act_Setup GETDEST"
    set fsm(GETDEST,ev_collectdigits_done) "act_GotDest PLACECALL"
    set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone CALLACTIVE"
    #set fsm(PLACECALL,ev_transfer_status) "act_CallSetupDone CALLACTIVE"
    set fsm(PLACECALL,ev_transfer_status) "act_CallSetupDone same_state"
    set fsm(PLACECALL,ev_disconnected) "act_HandleDisconnect same_state"
    ¿
    set fsm(CALLACTIVE,ev_leg_timer) "act_Timer INSERTBEEP"
    set fsm(INSERTBEEP,ev_destroy_done) "act_Destroy same_state"
    set fsm(INSERTBEEP,ev_media_done) "act_Beeped same_state"
    set fsm(INSERTBEEP,ev_create_done) "act_ConnectedAgain CALLACTIVE"
    set fsm(LASTWARN,ev_destroy_done) "act_LastWarn CALLDISCONNECT"
    set fsm(CALLACTIVE,ev_disconnected) "act_Cleanup CALLDISCONNECT"
    set fsm(CALLDISCONNECT,ev_disconnected) "act_Cleanup same_state"
    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
    ¿
    ¿
    ¿

    Subject: RE: TBCT TCL Script template
    Replied by: Yawming Chen on 15-05-2010 01:58:46 AM
    Can you please tell more about what is not working
    By the way, I think we should use redirect_at_alert not redirect-at-alert

    set callInfo(mode) REDIRECT_AT_ALERT
     
    Thanks,
     
    Yawming

    Subject: RE: TBCT TCL Script template
    Replied by: Borislav Mateev on 17-05-2010 06:56:02 PM
    According to: http://www.cisco.com/en/US/docs/ios/voice/ivr/configuration/guide/ivr_tbct.html
     
    Step 5 Configure the callsetup parameterspace mode:


    paramspace callsetup mode {redirect | redirect-at-alert |redirect-at-connect | redirect-rotary | rotary}

    ...and you hit the nail on the head....What is not working? The 2B channels are not released.

    Subject: RE: TBCT TCL Script template
    Replied by: Yawming Chen on 17-05-2010 07:20:57 PM
    The document is talking about IOS configuration.
    It's common that Tcl application taking the parameter from the IOS and change the name in Tcl script
     
    For example.
     
     if [infotag get cfg_avpair_exists welcome-prompt] {
              set welcomePrompt [string trim [infotag get cfg_avpair welcome-prompt]]
        } else {
              set welcomePrompt flash:en_bacd_welcome.au
        }
     
    Anyway, so far I haven't seen script  using redirect-at-xxx.
     
    Did you try it out ?
     
     
    Thanks,
     
    Yawming

    Subject: RE: TBCT TCL Script template
    Replied by: Edson Lopes Filho on 11-08-2010 03:04:48 PM
    Hi,
     
    Is this tbct script working right now? If so, could you share it with us?
     
    Best Regards!
     
    I am stuck in programing the Cisco voice gateway to support TBCT (ISDN Two B-Channel Transfer) using TCL scripting. I could not find a template from Cisco.com for the scripting and need a help from you guys to see whether any help be available for the template.


    Subject: RE: TBCT TCL Script template
    Replied by: Yaw-Ming Chen on 11-08-2010 03:38:41 PM
    Use Tcl to do TBCT should work but there are many different scenarios to implement TBCT so there is no standard TBCT script can fit all.
     
    You also can open a Cisco Developer Support SR to get help.
     
    Thanks !