Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nortel Programming Script for Set Programming

Status
Not open for further replies.

orspres

Technical User
Sep 16, 2004
20
0
0
US
Does anyone have a ProComm script for set installation on an Nortel PBX? I was awarded a 2000 port system and am looking for a script to input the physical devices.

thanks in advance

Lou O.
 


create an excel spreadsheet that is .csv (comma delimited) and pay attention to the fields below. This will pull the info from the spreadsheet and build them as needed. This is for a 3904 set but the script can easily be changed for your PBX. make sure you change the tgar and ncos to your system as well.

;DESC OLDTN NEWTN TYPE ACD POSID DN NAME
;A061 148 0 4 0 172 0 4 0 3905 3500 551514 431514 CSR


proc main

string xdesc, xoldtn, xnewtn, xtype, xacd, xdn, xpos, xname ; variables to be extracted from input string from file.
string FName ; Declaration of File name to be opened.
string LineBuffer ; Declaration of variable LineBuffer for Line to be read from file.
string nloop = "True"
string LChar = "F"
integer nItem = 0, Len = 2 ; nItem - next comma delimited field in LineBuffer
statmsg "Enter the name of the source file that has DESC, OLDTN, NEWTN, TYPE, ACD, POSID, DN, and NAME defined."
sdlginput "Source File for 3905 Sets" "Enter File Name :" FName
if isfile FName ; Make sure file exists.
fopen 0 FName READ ; Open file for read.
while not feof 0
fgets 0 linebuffer
while not feof 0 ; Loop while not end of file.
statclear
statmsg "Processing file input"
strextract xdesc LineBuffer "," nItem ; Extract description from input string
if not nullstr xdesc ; See if we're at the end of list.
nItem++
;usermsg xdesc ; Increment our item pointer.
endif
strextract xoldtn LineBuffer "," nItem ; Extract tn from input string
if not nullstr xoldtn ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xoldtn
endif

strextract xnewtn LineBuffer "," nItem ; Extract tn from input string
if not nullstr xnewtn ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xnewtn
endif

strextract xtype LineBuffer "," nItem ; Extract tn from input string
if not nullstr xtype ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xtype
endif

strextract xacd LineBuffer "," nItem ; Extract acd from input string
if not nullstr xacd ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xacd
endif
strextract xpos LineBuffer "," nItem ; Extract DN from input string
if not nullstr xpos ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xpos
endif

strextract xdn LineBuffer "," nItem ; Extract position ID from input string
if not nullstr xdn ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xdn

endif

strextract xname LineBuffer "," nItem ; Extract position ID from input string
if not nullstr xname ; See if we're at the end of list.
nItem++ ; Increment our item pointer.
;usermsg xname

endif


;3905 code
if strcmp nloop "True"
transmit "ld 20^M"
endif

waitfor "REQ:"
transmit "new^M"

waitfor "TYPE: "
transmit xtype
transmit "^M"

waitfor "TN "
transmit xnewtn
transmit "^M"

waitfor "DES "
transmit xdesc
transmit "^M"

waitfor "CUST "
transmit "0^M"

waitfor "KBA"
transmit "^M"

waitfor "DBA"
transmit "^M"

waitfor "FDN "
transmit "6245^M"

waitfor "TGAR "
transmit "1^M"

waitfor "LDN "
transmit "^M"

waitfor "NCOS "
transmit "1^M"

waitfor "RNPG "
transmit "^M"

waitfor "SSU "
transmit "^M"

waitfor "SGRP "
transmit "^M"

waitfor "CLS "
transmit "MCTA LNA IRA OLA TDD CDMA CFXA CNDA DNDA DPUA FNA HFA HTA SFA MWA ^M"

waitfor "RCO "
transmit "^M"

waitfor "HUNT "
transmit "6245^M"

waitfor "LHK "
transmit "0^M"

waitfor "LNRS "
transmit "^M"

waitfor "SCI "
transmit "^M"

waitfor "LPK "
transmit "1^M"

waitfor "PLEV "
transmit "2^M"

waitfor "AST "
transmit "^M"

waitfor "IAPG "
transmit "^M"

waitfor "MLWU_LANG "
transmit "^M"

waitfor "MLNG "
transmit "^M"

waitfor "DNDR "
transmit "^M"

waitfor "KEY "
transmit "0 scr "
transmit xdn
transmit " 0"
transmit "^M"

waitfor "CPND"
transmit "^M"
waitfor "VMB"
transmit "^M"

waitfor "KEY"
transmit "5 mik^M"

waitfor "KEY "
transmit "3 ao6^M"

waitfor "KEY"
transmit "4 trn^M"

waitfor "KEY "
transmit "1 TRC^M"

waitfor "KEY "
transmit "^M"

nloop = "False"
NItem = 0

fgets 0 linebuffer

endwhile
endwhile

waitfor "REQ:"
transmit "****^M"
fclose 0 ; Close file opened for read.
statclear

else
errormsg "Couldn't open file `"%s`"." FName
statclear
endif


endproc

JohnThePhoneGuy

"If I can't fix it, it's not broke!
 
John,

thank you - quick question if I already have the database on an excel file can I just use it if it is a csv file? If it is not I know I can convert it to a csv file
 
Yes you can use that, just do the "save as" and make it comma delimited at that time. YOu might have to realign the fields in your existing spreadsheet to fit the script though. When you run it, you might have to tweak for your PBX, some prompts might be different, you can go in and edit with procomm.

JohnThePhoneGuy

"If I can't fix it, it's not broke!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top