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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script for bars 8

Status
Not open for further replies.

johnpoole

Programmer
May 26, 2004
19,375
US
Here is a short script that will add bars npa to a switch. the only thing that you need to know, one is the rli i have used is 2, either build a rli for that or modify the script to use your rlb. the other is to note the range i have included, you may want to modify that, i didn't add any deny statements but that is a single line at your descrection.. have fun, Knob over in the script forum has been very helpful, before he loaned a hand, this script was 30K of text and often drove people (me) crazy.

Code:
 proc main
 
   transmit "****^M"
   waitfor ">"
   transmit "ld 90^M"
   
   waitfor "REQ  "
   transmit "new^M"
   waitfor "CUST "
  
   transmit "0^M"
   waitfor "FEAT "
   transmit "net^M"
   waitfor "TRAN "
   transmit "ac1^M"
   waitfor "TYPE "
   transmit "npa^M"
   call theproc
 endproc       
proc theproc

	  
  	  integer iCount
  	  string sCount
  	  for iCount = 1200 upto 1999
  	  loop:
  	  waitfor "NPA  "
    	  itoa iCount sCount    
    	  transmit sCount  
    	  transmit "^M"
   	 call myproc 
   	  endfor 	  


 
        goto loop 
  	 
endproc

proc myproc
  	 waitfor "RLI  "
   	transmit "2^M"
   	waitfor "SDRR "
   	transmit "^M"
   	waitfor "ITEI "
   	transmit "^M"
   
   
   
 endproc

john poole
bellsouth business
columbia,sc
 
ok guys, someone brag on this script, i've been trying to debug this thing for 10 years. my old script for bars was a wait for npa repeated 700 times and was about 30 thousand lines long. this is the oen i've lost more sleep over then any one script i've ever tried, and of cource it can be modified for nxx in about two seconds

john poole
bellsouth business
columbia,sc
 
Thanks for the scipt John, very nice. As always I appreciate your sharing your goodies with us.
 
thanks, i was tickled to death when that one worked. the cleanest i've ever worked on

john poole
bellsouth business
columbia,sc
 
John, is there anything Nortel you don't know? I have seen you post on soo many things!


I for one really appreciate all of the help you provide on all kind of things Nortel.

Thanks!
 
thank you for all your help John !!!

Daniel
 
just like everyone else i am here to learn

john poole
bellsouth business
columbia,sc
 
thanks John, the "script for bars" works great. I have modified it to change my NPA's rather than to add them since most are already in the PBX. One problem I have encountered. I do not have every NPA from 1200 to 1999 programmed in my switch. Therefore, when an NPA is entered that does not exist in the PBX database, an ESN071 code is generated. Do you know of a way to have this script step past that and transmit the next numerically higher NPA?
 
After proc main
when target 0 "RLI" call myproc
remove the call myproc and in myproc remove the waitfor "RLI" and add return after the last transmit "^M" in myproc.
Not to bad John but there's more then 1 way to skin a cat. What about SPN entries for 911, 411, international and operator assisted?
 
Having difficulty following your changes. Can you please repost what the modified version would look like?
 
proc main
when target 0 "RLI" call myproc
transmit "****^M"
waitfor ">"
transmit "ld 90^M"

waitfor "REQ "
transmit "new^M"
waitfor "CUST "

transmit "0^M"
waitfor "FEAT "
transmit "net^M"
waitfor "TRAN "
transmit "ac1^M"
waitfor "TYPE "
transmit "npa^M"
call theproc
endproc
proc theproc


integer iCount
string sCount
for iCount = 1200 upto 1999
loop:
waitfor "NPA "
itoa iCount sCount
transmit sCount
transmit "^M"
endfor



goto loop

endproc

proc myproc
transmit "2^M"
waitfor "SDRR "
transmit "^M"
waitfor "ITEI "
transmit "^M"
return


endproc
 
not at work this week so i can be of little help, i do have scripts that remove 1800 1866 etc, then put them back in as spn's. the best thing to add is add the old standby, when target equals, then put in the npr codes, build a proc that bypasses, the codes. after a proc ends the script returns to the proc it left at the next line. when i've had to make major changes in npa's.. i usually come in after hours and out all of them, that same script, slightly modified will remove all npa's. the good thing about that is with the out command, trying to remove an npa that is not entered, the switch sends the code plus npa, waiting for the next npa to out.. so the script runs in about 3 minutes at 9600.. then the new commands reruns... another way is to use a wud file, define the elements, prt you npa's and just modify the ones in your switch.. that type of script takes the npa's from a txt style file... and a side note to mluckie the reason i post scripts is because i usually get them back, way better then the original idea.. scripting saves me hundreds of hours a year, but like most of us,i'm still learning

john poole
bellsouth business
columbia,sc
 
Sorry, I probably should have posted my modified version of John's script. So, here it is. When I run this script, if an NPA is transmitted that is not in the PBX's database (remember, I am doing a change, not an add) the PBX responds with "ESN071" and then returns me to the "NPA" prompt, waiting for me to send it a valid NPA that is in it's database. I need to somehow be able to increment the NPA counter and send the next numerically higher NPA. I've tried using [when target 0 "ESN071" call theproc] but then the NPA list starts from the beginning again (1200). Hopefully I am making sense and you have a solution.

proc main

transmit "****^M"
waitfor ">"
transmit "LD 90^M"
waitfor "REQ "
transmit "CHG^M"
waitfor "CUST "
transmit "0^M"
waitfor "FEAT "
transmit "NET^M"
waitfor "TRAN "
transmit "AC2^M"
waitfor "TYPE "
transmit "NPA^M"
call theproc

endproc


proc theproc

integer iCount
string sCount
for iCount = 1209 upto 1999
waitfor "NPA "
itoa iCount sCount
transmit sCount
transmit "^M"
when target 0 "ESN071" call theproc
call myproc
endfor

endproc

proc myproc

waitfor "RLI "
transmit "^M"
waitfor "SDRR "
transmit "^M"
waitfor "ITEI "
transmit "^M"

endproc
 
Then when command needs to be first. Then whenever RLI is asked for the sub routine will be called and will return to where it was at and continue. If the ESN071 appears the procedure will increment to the next NPA value and continue. It should look exactly like below.
proc main
when target 0 "RLI" call myproc
transmit "****^M"
waitfor ">"
transmit "LD 90^M"
waitfor "REQ "
transmit "CHG^M"
waitfor "CUST "
transmit "0^M"
waitfor "FEAT "
transmit "NET^M"
waitfor "TRAN "
transmit "AC2^M"
waitfor "TYPE "
transmit "NPA^M"
call theproc

endproc


proc theproc

integer iCount
string sCount
for iCount = 1209 upto 1999
waitfor "NPA "
itoa iCount sCount
transmit sCount
transmit "^M"
endfor
endproc

proc myproc
transmit "X^M" ; X is the RLI number that you are
waitfor "SDRR" ; using. there must be a valid RLI
transmit "^M" ; specified for X
waitfor "ITEI "
transmit "^M"
return
endproc
 
nice improvement,

john poole
bellsouth business
columbia,sc
 
Hey this is great!! Can I use it with CRT? the scripts there are in .vbs, does this easily convert to .vbs? Just save as a .vbs file?
 
These are great scripts, I have been doing it the old way(mail merge) for years. Thx
 
Does anyone have any phone programing scripts? I build my phone programing sripts the same way I did the BARS scripting, though mail merge and excel.
 
i've got a few, but with the copy command, pulling data off a wud file to modify the copied sets is still quicker. for a new install i do a merge, less headache all the way around. i'm not doing installs these days so i haven't build scripts with dll links to expidite that process

john poole
bellsouth business
columbia,sc
 
Nice script John. I am sure I will be using it, the next time I have a new switch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top