MyFlight
Technical User
- Feb 4, 2002
- 193
Does anyone have any sample scripts for changing Stations in an Avaya?
I have written a script change/add Coverage Remote Entries. (Thanks to knob & comtechau)
However I still need to changes the Coverage Path and change the Station.
Here is the Script I wrote to add coverage paths 1 to 1000 (or 1001 to 1100) depending on teh Number entered.
proc main
integer iVar, iLen ; Number of entries in dialing class
string sLine, sTok1, sTok2, sTok3, sTok4, sTok5, sRemote
string sAvayaFile = "Avaya ChaSta.csv"
string sImportPath = "C:\Temp Data Files\Raw Data\"
string sNewPath = "Temp Data Files\Reconfigured Data\"
string sCapPath = "C:\Program Files\Symantec\ProComm Plus\Capture\"
string sSpace = " "
string sPage ="PAGE"
string sRemCmd = "change coverage remote"
clear ; start with clean screen
capture on ; Open up the capture file.
chdir sImportPath
isfile sAvayaFile ivar ; Verifies that File does Exist.
if SUCCESS
fopen 1 sAvayaFile READWRITE TEXT ; Opens Text File
pause 2
; usermsg "This Script uses a File Called Avaya ChaSta.csv with 4 Colums"
; usermsg "The columns are Extension, Cov Path, Cov Rem Num, Rem Entry Num"
usermsg "The Coverage Remote start at entry Number 001"
chdir sNewPath
sdlginput "Remote Path" "Remote:" sRemote
set modem connection current
pause 2
strcat sRemCmd sSpace
strcat sRemCmd sRemote
transmit sRemCmd
mspause 250
transmit "^M"
waitfor "01:" FOREVER
if SUCCESS
while not feof 1
; First Column has a 4-Digit Number
; Second Column has a 3-Digit Number
; Third Colum has a 3-Digit Number
; Fourth Column has a 7-Digit Number
fgets 1 sLine
strlen sLine iLen
strtok sTok1 sLine "," 1 ;Extension Number
strtok sTok2 sLine "," 1 ;Coverage Path
strtok sTok3 sLine "," 1 ;Coverage Remote Entry Number
strtok sTok4 sLine "," 1 ;Remote Number
strtok sTok5 sLine "," 1 ;Page break Identifier
; usermsg "sTok1`"%s`" FOUND." sTok1
; usermsg "sTok4`"%s`" FOUND." sTok4
strcmp sTok5 sPage
if SUCCESS
strcat sTok4 "^M"
transmit sTok4
mspause 125
transmit "^[OV"
else
strcat sTok4 "^M"
transmit sTok4
mspause 125
endif
endwhile
transmit "^[OR"
clear
else
; Command aborted
transmit "^[OP"
clear
endif
waitfor "Command successfully completed"
endif
capture off ;close capture file
endproc
proc NextPage
transmit "^[OV"
endproc
Any and all suggestions will be welcome.
I have written a script change/add Coverage Remote Entries. (Thanks to knob & comtechau)
However I still need to changes the Coverage Path and change the Station.
Here is the Script I wrote to add coverage paths 1 to 1000 (or 1001 to 1100) depending on teh Number entered.
proc main
integer iVar, iLen ; Number of entries in dialing class
string sLine, sTok1, sTok2, sTok3, sTok4, sTok5, sRemote
string sAvayaFile = "Avaya ChaSta.csv"
string sImportPath = "C:\Temp Data Files\Raw Data\"
string sNewPath = "Temp Data Files\Reconfigured Data\"
string sCapPath = "C:\Program Files\Symantec\ProComm Plus\Capture\"
string sSpace = " "
string sPage ="PAGE"
string sRemCmd = "change coverage remote"
clear ; start with clean screen
capture on ; Open up the capture file.
chdir sImportPath
isfile sAvayaFile ivar ; Verifies that File does Exist.
if SUCCESS
fopen 1 sAvayaFile READWRITE TEXT ; Opens Text File
pause 2
; usermsg "This Script uses a File Called Avaya ChaSta.csv with 4 Colums"
; usermsg "The columns are Extension, Cov Path, Cov Rem Num, Rem Entry Num"
usermsg "The Coverage Remote start at entry Number 001"
chdir sNewPath
sdlginput "Remote Path" "Remote:" sRemote
set modem connection current
pause 2
strcat sRemCmd sSpace
strcat sRemCmd sRemote
transmit sRemCmd
mspause 250
transmit "^M"
waitfor "01:" FOREVER
if SUCCESS
while not feof 1
; First Column has a 4-Digit Number
; Second Column has a 3-Digit Number
; Third Colum has a 3-Digit Number
; Fourth Column has a 7-Digit Number
fgets 1 sLine
strlen sLine iLen
strtok sTok1 sLine "," 1 ;Extension Number
strtok sTok2 sLine "," 1 ;Coverage Path
strtok sTok3 sLine "," 1 ;Coverage Remote Entry Number
strtok sTok4 sLine "," 1 ;Remote Number
strtok sTok5 sLine "," 1 ;Page break Identifier
; usermsg "sTok1`"%s`" FOUND." sTok1
; usermsg "sTok4`"%s`" FOUND." sTok4
strcmp sTok5 sPage
if SUCCESS
strcat sTok4 "^M"
transmit sTok4
mspause 125
transmit "^[OV"
else
strcat sTok4 "^M"
transmit sTok4
mspause 125
endif
endwhile
transmit "^[OR"
clear
else
; Command aborted
transmit "^[OP"
clear
endif
waitfor "Command successfully completed"
endif
capture off ;close capture file
endproc
proc NextPage
transmit "^[OV"
endproc
Any and all suggestions will be welcome.