"Fossies" - the Fresh Open Source Software Archive

Member "bayonne-1.2.16/data/script/btssetup.scx" (25 Apr 2003, 3211 Bytes) of package /linux/misc/old/bayonne-1.2.16.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 %% Copyright (C) 2003 Open Source Telecom Corporation.
    2 %%
    3 %% This program is free software; you can redistribute it and/or modify
    4 %% it under the terms of the GNU General Public License as published by
    5 %% the Free Software Foundation; either version 2 of the License, or
    6 %% (at your option) any later version.
    7 %%
    8 %% This program is distributed in the hope that it will be useful,
    9 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
   10 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11 %% GNU General Public License for more details.
   12 %%
   13 %% You should have received a copy of the GNU General Public License
   14 %% along with this program; if not, write to the Free Software
   15 %% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   16 
   17 	size %mypassword 4
   18 	say.cache "welcome to the o s t telephone system"
   19 		altplay bts:welcome
   20 	say.nocache "you are using extension number %session.extension"
   21 		altspeak bts:using &number %session.extension
   22 	say.cache "i will guide you through setting up your telephone for the first time"
   23 		altplay bts:first
   24 	cleardigits ::setupname
   25 
   26 #	.private
   27 
   28 ::setupname
   29 	erase prefix=names %session.extension
   30 	say.cache "Would you like to record your name for this extension"
   31 	say.cache "Press 1 to confirm or 2 to skip"
   32 		altplay bts:record
   33 
   34 ^1
   35 	redirect ::setupnamerec
   36 
   37 ^2
   38 	redirect ::setuppw
   39 
   40 ^dtmf
   41 	say.cache "You have entered an invalid option"
   42 		altplay bts:invalid
   43 	goto ::setup
   44 
   45 ::setupnamerec
   46 	erase prefix=names %session.extension
   47         say.cache "Please record your name at the beep.  When you are done, press pound."
   48 		altplay bts:beep
   49         tone beep
   50         record prefix=names %session.extension maxTime=10s exit="#"
   51         cleardigits ::setupnamesave
   52 
   53 ::setupnamesave
   54 	say.cache "you have recorded your name as"
   55 		altplay bts:recorded
   56 	play prefix=names %session.extension
   57 	say.cache "If you would like to save this name, please press one.  If you would like to re-record yourname, press 2."
   58 		altplay bts:save
   59 	sleep 30s
   60 	goto ::setupnamesave
   61 
   62 ^1
   63 	redirect ::setuppw
   64 
   65 ^2
   66 	redirect ::setupnamerec
   67 
   68 ^dtmf
   69 	say.cache "you have entered an invalid option"
   70 		altplay bts:invalid
   71 	goto ::setupnamesave
   72 
   73 ::setuppw
   74 	say.cache "We will now set your voice mail and remote access password."
   75 	say.cache "Using the digits zero through nine on your telephone, please enter up to 4 digits for the password you would like to use now"
   76 		altplay bts:password
   77 	collect var=&mypassword count=4 timeout=5s exit="*#"
   78 	slog "password is %mypassword"
   79 	if -empty %mypassword
   80 	then
   81 		say.cache "You have failed to enter your password."
   82 			altplay bts:failed
   83 		goto ::setuppw
   84 	endif
   85 	cleardigits ::setuppwsave
   86 
   87 ::setuppwsave
   88 	say.cache "Your new password will be saved as"
   89 		altplay bts:newpassword
   90 	foreach %digit %mypassword.each		
   91 		speak %digit
   92 		sleep 100ms
   93 	loop	
   94 	say.cache "If this is correct, press 1.  To change your password, press 2"
   95 		altplay bts:savepassword
   96 	
   97 ^1
   98 	password %mypassword
   99 	slog "ERROR %script.error"
  100 	saveinfo
  101 	say.cache "Your telephone is now ready for use.  Thank you."
  102 		altplay bts:done
  103 	return.exit
  104 
  105 ^2
  106 	redirect ::setuppw
  107 
  108 ^dtmf
  109 	say.cache "You have entered an invalid option"
  110 		altplay bts:invalid
  111 	goto ::setuppwsave
  112 
  113