Rolm Phone mail Scripts - Page 2 - PBX Info :: Your Free PBX, PABX and Telephone Information Resource
Home | Register |    
 
Forums         |        Articles          |        Blogs         |      Software          |      Portals          |      Resource          |      Wiki      |    White Papers         
 
Go Back   PBX Info :: Your Free PBX, PABX and Telephone Information Resource > PBX SYSTEMS > Siemens / Rolm
   SEARCH  
     
User Name Password      
Save ?
Siemens / Rolm Ask Questions and Find Answers: MD110, HiCom, HiPath, 7000, 8000, and 9000 Series Systems

Tags: , , ,


Reply
 
LinkBack Thread Tools Display Modes
Old 01-05-2003, 05:54 PM   #11 (permalink)
icetea
Junior Member
 
icetea's Avatar
icetea has no status.

Activity Longevity
0/20 20/20
Today Posts
0/0 sssssss86
Location: Radford Va.
Rep Power: 7icetea is on a distinguished road
Gender:
Country:
Send a message via Yahoo to icetea
CORPORATE DIRECTORY

Ok here is what I've got so far. It has six error's that I haven't figured out yet. Hoping someone out there can help. This script is writen for Rolm/Siemens PhoneMail ver 6.4 it is used to change the phatom number of a phone. The first is the script the second is the txt file that is used.


File 1
proc main
string sLine ;Line read from text file
integer iLen ;Integer to hold length of read string
string sExtOne ;First extension from line read from text file
string sExtTwo ;Second extension

if fopen 0 "test1.txt" READ ;Open text file
while not feof 0 ;While there is data to be read from the text file
fgets 0 sLine ;Get line of data
strlen sLine iLen ;Find length of line
if iLen == 0 ;If zero, then we have read a blank line and are at the end
exitwhile ;Exit while loop
endif
strtok sExtOne sLine "," ;Get data before the comma
strreplace sExtOne "`"" "" ;Delete quotes from the string
sExtTwo = sLine
strreplace sExtTwo "`"" "" ;Delete quotes from remaining data
strreplace sExtTwo "," "" ;Get rid of extra comma
strreplace sExtTwo ";" "" ;Get rid of extra semi-colon too
endwhile
endif
fclose 0
endproc

integer flag=0
string sEnter = "^M"
string Fname = "TESTING1.txt" ; File name to be opened.
integer nJumps
string sLine
string sTok1
when Target 0 "Extension [" call Press_Enter
when Target 1 "Name (last first) :" call Press_Enter
when Target 2 "Class Number :" call Press_Enter
When Target 3 "Extension 1" Call Press_Enter
When Target 4 "Extension 2"

; set txpace=100

setjmp 0 nJumps ; This is a Jump Mark Point
fgets 0 sLine ; Get line from file.
strtok sTok1 sLine " " 1 ; Assigns Text in First Field (From Text File) to Variable sTok1.
strreplace sLine " " ""
waitfor "Subscriber Name or Extension: " 10
transmit sTok1 ; Sends the Text Value (Assigned to Variable sTok1) to the PhoneMail System.
transmit "^M"
if waitfor "Function: "
transmit "PROFILE^M"
waitfor "Action: "
transmit "MODIFY^M"
waitfor "Subscriber Name or Extension: "
transmit sTok1 ; Sends the Text Value (Assigned to Variable sTok1) to the PhoneMail System.
transmit "^M"
else
; do nothing? let Target handle it?
endif
endwhile
setjmp 1 nJumps
fclose 0 ; Close file opened for read.
; Logout Procedure ----------
waitfor "Subscriber Name or Extension: "
transmit ";^M"
waitfor "Function: "
transmit "logo^M"
waitfor "Action: "
transmit "logo^M"

else
errormsg "Couldn't open file `"%s`"." Fname

endif

proc Announce
;pause 1
transmit "T T T^M"
endproc
proc Exit_MailBox
;pause 1
transmit ";^M"
endproc
proc Press_Enter
;pause 1
transmit "^M"
endproc

File 2

"2871","11871","","","","","TEST ONEONE",;"
"2840","11840","","","","","TEST TWOOne",";"
"2841","11841","","","","","TEST Two",";"
"2842","11842","","","","","TEST Three",";"
"5756","16756","","","","","TEST FOUR",";"
icetea is offline   sendpm.gif Reply With Quote
Old 01-09-2003, 12:33 AM   #12 (permalink)
icetea
Junior Member
 
icetea's Avatar
icetea has no status.

Activity Longevity
0/20 20/20
Today Posts
0/0 sssssss86
Location: Radford Va.
Rep Power: 7icetea is on a distinguished road
Gender:
Country:
Send a message via Yahoo to icetea
Upgrade Opt. 11c 25.30 to 25.40

Here is the finnished script if anyone wants it.

string FnameRead = "c:\temp\TEST1.txt" ; File name to be opened.

proc main
string sLine ;Line read from text file
integer iLen ;Integer to hold length of read string
string sExtOne ;First extension from line read from text file
string sExtTwo ;Second extension

transmit "pro^M"
waitfor "Action: "
transmit "mod^M"
if fopen 0 "test1.txt" READ ;Open text file
while not feof 0 ;While there is data to be read from the text file
fgets 0 sLine ;Get line of data
strlen sLine iLen ;Find length of line
if iLen == 0 ;If zero, then we have read a blank line and are at the end
exitwhile ;Exit while loop
endif
strtok sExtOne sLine "," ;Get data before the comma
strreplace sExtOne "`"" "" ;Delete quotes from the string
sExtTwo = sLine
strreplace sExtTwo "`"" "" ;Delete quotes from remaining data
strreplace sExtTwo "," "" ;Get rid of extra comma
strreplace sExtTwo ";" "" ;Get rid of extra semi-colon too

waitfor "Subscriber Name or Extension: "
transmit sExtOne
transmit "^M"
waitfor "Name (last first) : "
transmit "^M"
waitfor "Class Number : "
transmit "^M"
waitfor "Extension [1]"
transmit sExtOne
transmit "^M"
waitfor "Would you like to disable network access for this subscriber?[Y/N]"
transmit "n^M"
waitfor "Extension [2]"
transmit sExtTwo
transmit "^M"
waitfor "Extension [3] "
transmit ";^M"
endwhile
endif
fclose 0
endproc


TEST1.txt

"2871","11871","";"
"2840","11840","";"
"2841","11841","";"
"2842","11842","";"
"5756","16756","";"
icetea is offline   sendpm.gif Reply With Quote
Old 01-14-2003, 08:20 PM   #13 (permalink)
icetea
Junior Member
 
icetea's Avatar
icetea has no status.

Activity Longevity
0/20 20/20
Today Posts
0/0 sssssss86
Location: Radford Va.
Rep Power: 7icetea is on a distinguished road
Gender:
Country:
Send a message via Yahoo to icetea
home wiring - Star or not start

:casstet: Any I need help when I run this script it gives me the following error

Error 5: Invalid identifier

Here is the scipt

string FnameRead = "c:\temp\TEST1.txt" ; File name to be opened.

proc main
string sLine ;Line read from text file
integer iLen ;Integer to hold length of read
string
string sExtOne ;First extension from line read
from text file
string sExtTwo ;Second extension

transmit "pro^M"
waitfor "Action: "
transmit "mod^M"
if fopen 0 "test1.txt" READ ;Open text file
while not feof 0 ;While there is data to be read
from the text file
fgets 0 sLine ;Get line of data
strlen sLine iLen ;Find length of line
if iLen == 0 ;If zero, then we have read a
blank line and are at the end
exitwhile ;Exit while loop
endif
strtok sExtOne sLine "," ;Get data before the comma
strreplace sExtOne "`"" "" ;Delete quotes from the string
sExtTwo = sLine
strreplace sExtTwo "`"" "" ;Delete quotes from remaining data
strreplace sExtTwo "," "" ;Get rid of extra comma
strreplace sExtTwo ";" "" ;Get rid of extra semi-colon too

waitfor "Subscriber Name or Extension: "
transmit sExtOne
transmit "^M"
waitfor "Name (last first) : "
transmit "^M"
waitfor "Class Number : (Previous = 311): "
transmit "^M"
waitfor "Extension [1]"
transmit sExtOne
transmit "^M"
waitfor "Would you like to disable network access for this
subscriber?[Y/N]"
transmit "n^M"
waitfor "Extension [2]"
transmit sExtTwo
transmit "^M"
waitfor "Extension [3] "
transmit ";^M"
endwhile
endif
fclose 0
endproc



Here is the text file

"2871","11871","
"2840","11840","
"2841","11841","
"2842","11842","
"5756","16756","
icetea is offline   sendpm.gif Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
VoIP Phone Systems Buyer's Guide rixride VOIP Talk 3 02-17-2006 01:44 PM
....VoIP Phone Advantages & Drawbacks.... FreedomFireCom VOIP Talk 0 01-21-2005 02:51 PM


All times are GMT -5. The time now is 09:13 PM.

Tags   |   Advertise    |    Media Partners   |    Admin   |   About us   |   Contact Us   |   RSS   

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
Copyright PBXINFO LLC 2006