TCL脚本拨打电话 [英] TCL script to make a call
问题描述
我是TCL脚本的新手,我需要一个脚本来拨打电话(* 4346)。我不知道该怎么做
这是我现在的代码,请帮助我纠正它。
proc init {} {
全球参数
put开始...
set param(initialDigitTimeout)10
set param(interruptPrompt)true
set param(abortKey)*
set param(terminationKey)#
}
proc act_Authorized {} {
global ani
global dnis
全球蜂鸣声
全球ctr
set ctr 0 >
设置发出哔哔声0
puts外出通话......
设置dnis* 4346
腿部设置$ dnis callInfo leg_incoming
}
proc act_CallSetupDone {} {
全球蜂鸣声
致电关闭
#}
}
proc act_Cleanup {} {
set evt_name [infotag get evt_event]
致电关闭
}
init
#----------------------------------
#State Machine
#----------------------------------
设置fsm(any_state,ev_disconnected)act_Cleanup same_state
设置fsm(CALL_INIT,ev_setup_indication)act_Authorized PLACECALL
设置fsm(CALLDISCONNECT,ev_disconnected)act_Cleanup same_state
设置fsm(CALLDISCONNECT,ev_media_done)act_Cleanup same_state
set fsm(CALLDISCONNECT,ev_disconnect_done)act_Cleanup same_state
设置fsm(CALLDISCONNECT,ev_leg_timer)act_Cleanup same_state
fsm定义fsm CALL_INIT
`
dnis callInfo leg _incoming
}
proc act_CallSetupDone {} {
全球哔声
致电关闭
#}
}
proc act_Cleanup {} {
set evt_name [ infotag get evt_event]
致电关闭
}
init
#----------------------------------
#状态机
#----------------------------------
设置fsm(any_state,ev_disconnected)act_Cleanup same_state
设置fsm(CALL_INIT,ev_setup_indication)act_Authorized PLACECALL< br $>
设置fsm(CALLDISCONNECT,ev_disconnected)act_Cleanup same_state
设置fsm(CALLDISCONNECT,ev_media_done)act_Cleanup same_state
设置fsm(CALLDISCONNECT,ev_disconnect_done)act_Cleanup same_state
s et fsm(CALLDISCONNECT,ev_leg_timer)act_Cleanup same_state
fsm define fsm CALL_INIT
`
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
`
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
`
这篇关于TCL脚本拨打电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!