Yaw-Ming Chen | Let's backup a little bit, All you liek to do is changing destination number to be incoming number +1, right ? In this case I don't sguuest using ani_filter.tcl. Yue need to modify it. The scirpt will be very simple, don't need any " param " configuration from IOS CLI
something like this :
proc act_Setup { } { global dest
if { [infotag get leg_isdid] } {
set ani [infotag get leg_ani] set dest [expr $ani + 1]
leg proceeding leg_incoming leg setup $dest callInfo leg_incoming fsm setstate PLACECALL
} else { puts "only for DID" call close }
}
proc act_CallSetupDone { } { set status [infotag get evt_status] puts "TCL: Status of leg setup is $status" if { $status == "ls_000"} {
handoff appl leg_all default
act_Cleanup } else { act_Cleanup } }
proc act_Cleanup { } { call close }
############# Initializing global varaiables #####################
#------------------ # State Machine #---------------------------------- set fsm(any_state,ev_disconnected) "act_Cleanup same_state" set fsm(CALL_INIT,ev_setup_indication) "act_Setup PLACCECALL"
set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone CALLACTIVE" set fsm(CALLACTIVE,ev_disconnected) "act_Cleanup CALLDISCONNECT" set fsm(CALLDISCONNECT,ev_disconnected) "act_Cleanup same_state" set fsm(CALLDISCONNECT,ev_disconnect_done) "act_Cleanup same_state" fsm define fsm CALL_INIT |
| Please sign in to flag this as inappropriate. |