set sock [socket -async 127.0.0.1 33000]
vwait connected
puts $sock "A Test Line"
proc act_Setup { } {
puts "\n DEBUGGING: Start act_Setup"
init_perCallVars
set ani [infotag get leg_ani]
set dnis [infotag get leg_dnis]
if { $dnis == "0555005211" } {
puts "\n DEBUGGING: Welcome Play"
leg setupack leg_incoming
leg proceeding leg_incoming
leg connect leg_incoming
media play leg_incoming flash:welcome.au
fsm setstate RECORD
}
aaa authenticate $ani $dnis
puts "\n DEBUGGING: Stop act_Setup"
}
.....
proc act_Record { } {
global param
global filename
set filename [infotag get leg_guid]
puts "\n DEBUGGING: Filename for record - $filename"
media record leg_incoming -p codec=5 -p maxDuration=15000 -m %b flash:$filename
fsm setstate RECORD_PLAY
}
proc act_RecordPlay {} {
global param
global filename
puts "\n DEBUGGING: Play Record"
puts "\n DEBUGGING: Filename for play - $filename"
media play leg_incoming flash:$filename
fsm setstate CALLACTIVE
}
....
set fsm(CALL_INIT,ev_setup_indication) "act_Setup AUTHENTICATE"
set fsm(RECORD,ev_media_done) "act_Record RECORD_PLAY"
set fsm(RECORD_PLAY,ev_recorder) "act_RecordPlay CALLACTIVE"