I need to learn very specific things about the TCL scripting to expand my business. TCL makes the 5300 a very powerful system, but to harness its power, I need to be able to do basic scripting.
The first thing I have tried to do is to take one of the builtin Cisco scripts and simply copy it to the ftp server and use it from there. I am having a difficult time doing this and getting an error when I load the script.
PGC.LAX.c5300.1#sh call application voice summary
name description
session Basic app to do DID, or supply dialtone.
fax_hop_on Script to talk to a fax redialer
clid_authen Authenticate with (ani, dnis)
clid_authen_collect Authenticate with (ani, dnis), collect if that fails
clid_authen_npw Authenticate with (ani, NULL)
clid_authen_col_npw Authenticate with (ani, NULL), collect if that fails
clid_col_npw_3 Authenticate with (ani, NULL), and 3 tries collecting
clid_col_npw_npw Authenticate with (ani, NULL) and 3 tries without pw
DEFAULT Default system session application
lib_off_app Libretto Offramp
fax_on_vfc_onramp_ap Fax onramp for VFC
TCL Script Version 2.0 supported.
TCL Script Version 1.1 supported.
Voice Browser Version 1.0 for VoiceXML 1.0 supported.
PGC.LAX.c5300.1#show call application voice clid_authen
This is the script I copy/paste to file ftp://10.77.226.203/travis/travistest.tcl
You may view the script by going to ftp://65.77.226.203/travis/travistest.tcl
You will see that it is an exact copy of clid_authen.
----- REST OF SCRIPT OMMITED IN POST, complete script in TCL file on FTP server --------
Now, once I have an exact copy of clid_authen on the FTP server, I try to load it.
But, when I load it, I get a "missing close-brace" error. I have looked at the file many times,
and I do not see a missing close-brace. And, the file is an EXACT copy of clid_authen.
Do you know what is going wrong here ?
PGC.LAX.c5300.1#conf t
PGC.LAX.c5300.1(config)#call application voice TRAVISTEST ftp://10.77.226.203/travis/travistest.tcl
Cannot run script ftp://10.77.226.203/travis/travistest.tcl, unloading
Putting TRAVISTEST on script retry queue.
PGC.LAX.c5300.1(config)#
Jun 18 16:31:47.010: TclFreeUnusedInterp:
Jun 18 16:34:03.076: hifs ifs file read succeeded. size=1024, url=ftp://10.77.22
6.203/travis/travistest.tcl
Jun 18 16:34:03.080: TCL script failure
Result:
missing close-brace
Jun 18 16:34:03.080: LanguageIVR TCL script failure errorInfo:
missing close-brace
while executing
"proc act_Authenticated { } ..."
Jun 18 16:34:03.080: TCL script failure
Result:
missing close-brace
Jun 18 16:34:03.080: LanguageIVR TCL script failure errorInfo:
missing close-brace
while executing
"proc act_Authenticated { } ..."
PGC.LAX.c5300.1(config)#
The first thing I have tried to do is to take one of the builtin Cisco scripts and simply copy it to the ftp server and use it from there. I am having a difficult time doing this and getting an error when I load the script.
PGC.LAX.c5300.1#sh call application voice summary
name description
session Basic app to do DID, or supply dialtone.
fax_hop_on Script to talk to a fax redialer
clid_authen Authenticate with (ani, dnis)
clid_authen_collect Authenticate with (ani, dnis), collect if that fails
clid_authen_npw Authenticate with (ani, NULL)
clid_authen_col_npw Authenticate with (ani, NULL), collect if that fails
clid_col_npw_3 Authenticate with (ani, NULL), and 3 tries collecting
clid_col_npw_npw Authenticate with (ani, NULL) and 3 tries without pw
DEFAULT Default system session application
lib_off_app Libretto Offramp
fax_on_vfc_onramp_ap Fax onramp for VFC
TCL Script Version 2.0 supported.
TCL Script Version 1.1 supported.
Voice Browser Version 1.0 for VoiceXML 1.0 supported.
PGC.LAX.c5300.1#show call application voice clid_authen
This is the script I copy/paste to file ftp://10.77.226.203/travis/travistest.tcl
You may view the script by going to ftp://65.77.226.203/travis/travistest.tcl
You will see that it is an exact copy of clid_authen.
Code:
# app_clid_authen.tcl
#----------------------------------
# September 1998, David Ramsthaler
#
# Copyright (c) 1998, 1999, 2000 by cisco Systems, Inc.
# All rights reserved.
#------------------
# Mimic the clid_authen script in the SP1.0 release.
#
# It authenticates using (ani, dnis) for (account, password). If
# that fails, play a message and end the call.
#
# If authentication passes, it collects the destination number and
# places the call.
#
# The main routine is at the bottom. Start reading the script there.
#
proc init { } {
global param
set param(interruptPrompt) true
set param(abortKey) *
set param(terminationKey) #
set param(dialPlan) true
}
----- REST OF SCRIPT OMMITED IN POST, complete script in TCL file on FTP server --------
Now, once I have an exact copy of clid_authen on the FTP server, I try to load it.
But, when I load it, I get a "missing close-brace" error. I have looked at the file many times,
and I do not see a missing close-brace. And, the file is an EXACT copy of clid_authen.
Do you know what is going wrong here ?
PGC.LAX.c5300.1#conf t
PGC.LAX.c5300.1(config)#call application voice TRAVISTEST ftp://10.77.226.203/travis/travistest.tcl
Cannot run script ftp://10.77.226.203/travis/travistest.tcl, unloading
Putting TRAVISTEST on script retry queue.
PGC.LAX.c5300.1(config)#
Jun 18 16:31:47.010: TclFreeUnusedInterp:
Jun 18 16:34:03.076: hifs ifs file read succeeded. size=1024, url=ftp://10.77.22
6.203/travis/travistest.tcl
Jun 18 16:34:03.080: TCL script failure
Result:
missing close-brace
Jun 18 16:34:03.080: LanguageIVR TCL script failure errorInfo:
missing close-brace
while executing
"proc act_Authenticated { } ..."
Jun 18 16:34:03.080: TCL script failure
Result:
missing close-brace
Jun 18 16:34:03.080: LanguageIVR TCL script failure errorInfo:
missing close-brace
while executing
"proc act_Authenticated { } ..."
PGC.LAX.c5300.1(config)#