#
# =================================================
# Description
DESCRIPTION("Example ADSI Banking Application");
#
# =================================================
# Prompt Directory
#
# =================================================
# Entry Point(s)
ENTRY_POINT(s,s);
ENTRY_POINT(start,s);
#
# =================================================
# Variables
LOCAL STRING parms,
STRING pin,
STRING rc,
STRING surname,
STRING test_parms;
#
# =================================================
# Actions
s: AnswerCall()
edge EDGE_AC_COMPLETED: build_parms
edge EDGE_AC_NOT_RINGING: end
;
build_parms: "build parameters ENTER-SK=** BACK-SK=0 VIEW-SK=1"
InvokeStateTable("DIRECT", ADSI_Parameters, build_list,
parms,
"**",
"0",
"1",
"",
"",
"",
"",
"",
"",
"")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
connect: "display initial welcome screen. Request acct. no."
InvokeStateTable("DIRECT", ADSI, voice_mode,
"../ca/ADSI_dir/adsicb.sdc",
"connect",
parms)
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
"get Account number"
InvokeStateTable("DIRECT", ADSI_Get_Text, get,
surname,
"20",
"30")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
"build parameters for PIN request"
InvokeStateTable("DIRECT", ADSI_Parameters, build_list,
parms,
"**",
"0",
"1",
"Welcome Sir",
"",
"",
"",
"",
"",
"")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
"display PIN screen"
InvokeStateTable("DIRECT", ADSI, voice_mode,
"../ca/ADSI_dir/adsicb.sdc",
"pin",
parms)
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
"get PIN; a real application would now check security"
InvokeStateTable("DIRECT", ADSI_Get_Text, get,
pin,
"4",
"1")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
menu: "display menu screen"
InvokeStateTable("DIRECT", ADSI, voice_mode,
"../ca/ADSI_dir/adsicb.sdc",
"menu",
"")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
get_choice: "0=end 1=statement "
GetKey(VAR_UNDEFINED, "60", "1")
edge EDGE_DTMF_0: end
edge EDGE_DTMF_1: statement
edge EDGE_DTMF_8: get_choice
edge EDGE_DTMF_9: get_choice
edge EDGE_DTMF_A: get_choice
edge EDGE_DTMF_B: get_choice
edge EDGE_DTMF_C: get_choice
edge EDGE_DTMF_D: get_choice
edge EDGE_DTMF_ASTERISK: get_choice
edge EDGE_DTMF_HASH: get_choice
edge EDGE_TIMEOUT: get_choice
edge EDGE_LAST_TIMEOUT: get_choice
edge EDGE_HUP: end
;
statement: "build statement parameters"
InvokeStateTable("DIRECT", ADSI_Parameters, build_list,
parms,
"**",
"0",
"1",
"",
"",
"",
"",
"",
"",
"")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
"show statement"
InvokeStateTable("DIRECT", ADSI, voice_mode,
"../ca/ADSI_dir/adsicb.sdc",
"statement",
parms)
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
"keys got menu except DTMF1 drop to details "
GetKey(VAR_UNDEFINED, "60", "1")
edge EDGE_DTMF_0: menu
edge EDGE_DTMF_2: menu
edge EDGE_DTMF_3: menu
edge EDGE_DTMF_4: menu
edge EDGE_DTMF_5: menu
edge EDGE_DTMF_6: menu
edge EDGE_DTMF_7: menu
edge EDGE_DTMF_8: menu
edge EDGE_DTMF_9: menu
edge EDGE_DTMF_A: menu
edge EDGE_DTMF_B: menu
edge EDGE_DTMF_C: menu
edge EDGE_DTMF_D: menu
edge EDGE_DTMF_ASTERISK: menu
edge EDGE_DTMF_HASH: menu
edge EDGE_TIMEOUT: menu
edge EDGE_LAST_TIMEOUT: menu
edge EDGE_HUP: end
;
"show details"
InvokeStateTable("DIRECT", ADSI, voice_mode,
"../ca/ADSI_dir/adsicb.sdc",
"details",
"")
edge EDGE_RESULT_1: end
edge EDGE_RESULT_2: end
edge EDGE_RESULT_3: end
edge EDGE_RESULT_4: end
edge EDGE_RESULT_5: end
edge EDGE_RESULT_6: end
edge EDGE_RESULT_7: end
edge EDGE_RESULT_8: end
edge EDGE_RESULT_9: end
edge EDGE_STATE_TABLE_NOT_INVOKED: end
;
GetKey(VAR_UNDEFINED, "60", "1")
edge EDGE_DTMF_0: statement
edge EDGE_DTMF_1: statement
edge EDGE_DTMF_2: statement
edge EDGE_DTMF_3: statement
edge EDGE_DTMF_4: statement
edge EDGE_DTMF_5: statement
edge EDGE_DTMF_6: statement
edge EDGE_DTMF_7: statement
edge EDGE_DTMF_8: statement
edge EDGE_DTMF_9: statement
edge EDGE_DTMF_A: statement
edge EDGE_DTMF_B: statement
edge EDGE_DTMF_C: statement
edge EDGE_DTMF_D: statement
edge EDGE_DTMF_ASTERISK: statement
edge EDGE_DTMF_HASH: statement
edge EDGE_TIMEOUT: statement
edge EDGE_LAST_TIMEOUT: statement
edge EDGE_HUP: end
;
end: CloseEverything()
;