MyFlight
Technical User
- Feb 4, 2002
- 193
I hope that someone can point me in the right direction.
I am trying to access a ROLM voicemail system and capture header information.
I need to capture the following information to string values for later (MULTIPLE) uses:
Site Name (From Dialing Directory)
Company Name (From DIaling Directory)
PhoneMial Version (From Screen) "ROLM PhoneMail Version 6.3"
PhoneMail Site ID (From Screen) "ROLM PhoneMail Site Id: XXXXX37816"
PhoneMail Release (From Screen) " PhoneMail release 6.3.3.1"
for SINGLE NODE SYSTEMS
Current Node Number (From Screen) "PhoneMail is active with 16 Channels" No Node info is shown on One Node Systems
Total Number of Nodes (From Screen) "PhoneMail is active with 16 Channels" No Node info is shown on One Node Systems
Number of Channels (From Screen) "PhoneMail is active with 16 Channels" 16 is the Number I NEED
for MULTI NODE SYSTEMS
Current Node Number (From Screen) "PhoneMail (Node 2 of 6) is active with 16 Channels" 2 is the Number I NEED
Total Number of Nodes (From Screen) "PhoneMail (Node 2 of 6) is active with 16 Channels" 6 is the Number I NEED
Number of Channels (From Screen) "PhoneMail (Node 2 of 6) is active with 16 Channels" 16 is the Number I NEED
I have written a script file to capture most of
the information. However, it does NOT work all of the time.
Could someone take a look at my script and offer some suggestions.
Steps Taken
First when I dial into the system I have to wait until the terminal gets to the "LOGIN:" Prompt (i.e. waitquiet 5)
Next I need to Login to the PhoneMial System ("Log-SA.wax").
Third after the Login is complete (i.e. the "Function: Prompt appears) one of the 2 EXAMPLES below will be on the screen.
EXAMPLE 1
Login: SYSADMIN
Password:
ROLM PhoneMail Version 6.3
(C) Copyright 1989-1997 Siemens Business Communication Systems.
All Rights Reserved.
ROLM PhoneMail Site Id: XXXXX37816
PhoneMail release 6.3.5.
CPU Type of local node is 80386 33MHz.
PhoneMail is active with 16 Channels
Function: ;
Fri Feb 11, 2005 7:52 AM
EXAMPLE 2
Login: SYSADMIN
Password:
ROLM PhoneMail Version 6.3
(C) Copyright 1989-1997 Siemens Business Communication Systems.
All Rights Reserved.
ROLM PhoneMail Site Id: XXXXX28206
PhoneMail release 6.3.3.1
CPU Type of local node is 80386 33MHz.
PhoneMail (Node 2 of 6) is active with 16 Channels
Function:
My Current Script File
#define SaveDir "C:\Temp Completed Reports\"
proc main
string thestring, StartNode, StopNode, Channel, SiteID, Release, sSiteName
string sSemiColon = ""
string cMulti = "Node"
string EndNode, sNode
integer iNode, iStopNode
string fName = "Completed "
string fEnd = ".txt"
string SiteCMR
strcpy sSiteName $DialSelect
set dialentry access DATA $DIALSELECT
fetch dialentry company SiteCMR
strcat fName fEnd
chdir SaveDir
fopen 2 fName APPEND TEXT
pause 2
iNode = 0
waitquiet 5
execute "Log-SA.wax"
waitfor "Function:" FOREVER
locate 21, 0 Move the cursor
termreads thestring 52 Read 52 characters
if strfind thestring cMulti
substr StartNode thestring 17 1
substr StopNode thestring 23 1
substr Channel thestring 41 2
else
StartNode = "1"
StopNode = "1"
substr Channel thestring 25 2
locate 18, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr Release thestring 19 9
locate 15, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr SiteID thestring 25 10
fwrite 2 sSiteName 25
fwrite 2 sSemiColon 1
fwrite 2 SiteCMR 9
fwrite 2 sSemiColon 1
fwrite 2 SiteID 10
fwrite 2 sSemiColon 1
finsblock 2 10
fwrite 2 sSemiColon 1
fwrite 2 Release 10
fwrite 2 sSemiColon 1
fwrite 2 sNode 2
finsblock 2 4
finsblock 2 4
fwrite 2 sSemiColon 1
fwrite 2 Channel 4
fwrite 2 sSemiColon 1
call SingleLogoff
exit
endif
locate 18, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr Release thestring 19 9
locate 15, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr SiteID thestring 25 10
fwrite 2 sSiteName 25
fwrite 2 sSemiColon 1
fwrite 2 SiteCMR 9
fwrite 2 sSemiColon 1
fwrite 2 SiteID 10
fwrite 2 sSemiColon 1
finsblock 2 10
fwrite 2 sSemiColon 1
fwrite 2 Release 10
fwrite 2 sSemiColon 1
atoi StopNode iStopNode
EndNode = "C 0"
if iStopNode > 1
while iNode < iStopNode
iNode ++
itoa iNode sNode
strupdt EndNode sNode 2 1
Transmit "LOG^M"
waitfor "Action:"
Transmit EndNode
Transmit "^M"
waitfor "Function:" FOREVER
locate 21, 0 Move the cursor
termreads thestring 52 Read 52 characters
if strfind thestring cMulti
substr StartNode thestring 17 1
substr StopNode thestring 23 1
substr Channel thestring 41 2
fwrite 2 sNode 2
finsblock 2 4
fwrite 2 sSemiColon 1
fwrite 2 Channel 4
fwrite 2 sSemiColon 1
else
substr StartNode thestring 17 1
substr StopNode thestring 23 1
substr Channel thestring 41 2
fwrite 2 sNode 2
finsblock 2 4
fwrite 2 sSemiColon 1
fwrite 2 Channel 4
fwrite 2 sSemiColon 1
endif
endwhile
call MultiLogoff
endif
endproc
proc SingleLogoff
pause 1
transmit "^M"
waitfor "Function: " FOREVER
transmit "LOG^M"
waitfor "Action: "
transmit "LOG^M"
fwrite 2 "`r`n" 1
fclose 2
hangup
capture OFF
endproc
proc MultiLogoff
pause 1
transmit "^M"
waitfor "Function: " FOREVER
transmit "LOG^M"
waitfor "Action: " FOREVER
transmit "LOG^M"
waitfor "Login:"
fwrite 2 "`r`n" 1
fclose 2
hangup
capture OFF
endproc
I am trying to access a ROLM voicemail system and capture header information.
I need to capture the following information to string values for later (MULTIPLE) uses:
Site Name (From Dialing Directory)
Company Name (From DIaling Directory)
PhoneMial Version (From Screen) "ROLM PhoneMail Version 6.3"
PhoneMail Site ID (From Screen) "ROLM PhoneMail Site Id: XXXXX37816"
PhoneMail Release (From Screen) " PhoneMail release 6.3.3.1"
for SINGLE NODE SYSTEMS
Current Node Number (From Screen) "PhoneMail is active with 16 Channels" No Node info is shown on One Node Systems
Total Number of Nodes (From Screen) "PhoneMail is active with 16 Channels" No Node info is shown on One Node Systems
Number of Channels (From Screen) "PhoneMail is active with 16 Channels" 16 is the Number I NEED
for MULTI NODE SYSTEMS
Current Node Number (From Screen) "PhoneMail (Node 2 of 6) is active with 16 Channels" 2 is the Number I NEED
Total Number of Nodes (From Screen) "PhoneMail (Node 2 of 6) is active with 16 Channels" 6 is the Number I NEED
Number of Channels (From Screen) "PhoneMail (Node 2 of 6) is active with 16 Channels" 16 is the Number I NEED
I have written a script file to capture most of
the information. However, it does NOT work all of the time.
Could someone take a look at my script and offer some suggestions.
Steps Taken
First when I dial into the system I have to wait until the terminal gets to the "LOGIN:" Prompt (i.e. waitquiet 5)
Next I need to Login to the PhoneMial System ("Log-SA.wax").
Third after the Login is complete (i.e. the "Function: Prompt appears) one of the 2 EXAMPLES below will be on the screen.
EXAMPLE 1
Login: SYSADMIN
Password:
ROLM PhoneMail Version 6.3
(C) Copyright 1989-1997 Siemens Business Communication Systems.
All Rights Reserved.
ROLM PhoneMail Site Id: XXXXX37816
PhoneMail release 6.3.5.
CPU Type of local node is 80386 33MHz.
PhoneMail is active with 16 Channels
Function: ;
Fri Feb 11, 2005 7:52 AM
EXAMPLE 2
Login: SYSADMIN
Password:
ROLM PhoneMail Version 6.3
(C) Copyright 1989-1997 Siemens Business Communication Systems.
All Rights Reserved.
ROLM PhoneMail Site Id: XXXXX28206
PhoneMail release 6.3.3.1
CPU Type of local node is 80386 33MHz.
PhoneMail (Node 2 of 6) is active with 16 Channels
Function:
My Current Script File
#define SaveDir "C:\Temp Completed Reports\"
proc main
string thestring, StartNode, StopNode, Channel, SiteID, Release, sSiteName
string sSemiColon = ""
string cMulti = "Node"
string EndNode, sNode
integer iNode, iStopNode
string fName = "Completed "
string fEnd = ".txt"
string SiteCMR
strcpy sSiteName $DialSelect
set dialentry access DATA $DIALSELECT
fetch dialentry company SiteCMR
strcat fName fEnd
chdir SaveDir
fopen 2 fName APPEND TEXT
pause 2
iNode = 0
waitquiet 5
execute "Log-SA.wax"
waitfor "Function:" FOREVER
locate 21, 0 Move the cursor
termreads thestring 52 Read 52 characters
if strfind thestring cMulti
substr StartNode thestring 17 1
substr StopNode thestring 23 1
substr Channel thestring 41 2
else
StartNode = "1"
StopNode = "1"
substr Channel thestring 25 2
locate 18, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr Release thestring 19 9
locate 15, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr SiteID thestring 25 10
fwrite 2 sSiteName 25
fwrite 2 sSemiColon 1
fwrite 2 SiteCMR 9
fwrite 2 sSemiColon 1
fwrite 2 SiteID 10
fwrite 2 sSemiColon 1
finsblock 2 10
fwrite 2 sSemiColon 1
fwrite 2 Release 10
fwrite 2 sSemiColon 1
fwrite 2 sNode 2
finsblock 2 4
finsblock 2 4
fwrite 2 sSemiColon 1
fwrite 2 Channel 4
fwrite 2 sSemiColon 1
call SingleLogoff
exit
endif
locate 18, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr Release thestring 19 9
locate 15, 0 Move the cursor
termreads thestring 52 Read 52 characters
substr SiteID thestring 25 10
fwrite 2 sSiteName 25
fwrite 2 sSemiColon 1
fwrite 2 SiteCMR 9
fwrite 2 sSemiColon 1
fwrite 2 SiteID 10
fwrite 2 sSemiColon 1
finsblock 2 10
fwrite 2 sSemiColon 1
fwrite 2 Release 10
fwrite 2 sSemiColon 1
atoi StopNode iStopNode
EndNode = "C 0"
if iStopNode > 1
while iNode < iStopNode
iNode ++
itoa iNode sNode
strupdt EndNode sNode 2 1
Transmit "LOG^M"
waitfor "Action:"
Transmit EndNode
Transmit "^M"
waitfor "Function:" FOREVER
locate 21, 0 Move the cursor
termreads thestring 52 Read 52 characters
if strfind thestring cMulti
substr StartNode thestring 17 1
substr StopNode thestring 23 1
substr Channel thestring 41 2
fwrite 2 sNode 2
finsblock 2 4
fwrite 2 sSemiColon 1
fwrite 2 Channel 4
fwrite 2 sSemiColon 1
else
substr StartNode thestring 17 1
substr StopNode thestring 23 1
substr Channel thestring 41 2
fwrite 2 sNode 2
finsblock 2 4
fwrite 2 sSemiColon 1
fwrite 2 Channel 4
fwrite 2 sSemiColon 1
endif
endwhile
call MultiLogoff
endif
endproc
proc SingleLogoff
pause 1
transmit "^M"
waitfor "Function: " FOREVER
transmit "LOG^M"
waitfor "Action: "
transmit "LOG^M"
fwrite 2 "`r`n" 1
fclose 2
hangup
capture OFF
endproc
proc MultiLogoff
pause 1
transmit "^M"
waitfor "Function: " FOREVER
transmit "LOG^M"
waitfor "Action: " FOREVER
transmit "LOG^M"
waitfor "Login:"
fwrite 2 "`r`n" 1
fclose 2
hangup
capture OFF
endproc