Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I am new to TCL scripting, i need a script to make a call to (*4346). I dont know how to do this




this is the code i have now, pls help me to correct it.

proc init { } {

global param
puts "Started..."
set param(initialDigitTimeout) 10
set param(interruptPrompt) true
set param(abortKey) *
set param(terminationKey) #

}





proc act_Authorized { } {

global ani
global dnis
global beep
global ctr

set ctr 0
set beep 0




puts "Out going call..."

set dnis "*4346"
leg setup $dnis callInfo leg_incoming


}


proc act_CallSetupDone { } {
global beep

call close
#}
}


proc act_Cleanup { } {

set evt_name [infotag get evt_event]
call close
}

init

#----------------------------------
# State Machine
#----------------------------------

set fsm(any_state,ev_disconnected) "act_Cleanup same_state"

set fsm(CALL_INIT,ev_setup_indication) "act_Authorized PLACECALL"

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

`
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900