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

Looking to gracefully busy multiple members of a trunk group

Status
Not open for further replies.

TMurdach

IS-IT--Management
Apr 18, 2003
61
US
I am composing a script that will be used to busy multiple members of a trunk group on an Avaya Definity. The script will prompt for the trunk group number first, then it will prompt for the 1st member to busy. Finally it will prompt for the number of members to busy (sequentially).

I am unclear on how to take the input and perform the command the repeated number of times starting with the member entered in the prompt.

The command looks as such:

BUSY TRUNK 001/025 (001 is the trunk group number, 025 is the member)

So, to busy the entire DS1 the command would need to be repeated 23 times.

BUSY TRUNK 001/026
BUSY TRUNK 001/027

Etc..

I would the script to ask for the trunk group number and the initial member, then how many members in sequence to busy.

Thank you for any assistance!
 
Here is what I started with. I need help with the counter/looping part...

Code:
proc main

string trunk1
integer member1
integer number1

sdlginput "Trunk Group" "Trunk Group" trunk1
if failure
   goto stopnow
endif

sdlginput "First Member" "First Member" member1
if failure
   goto stopnow
endif

sdlginput "Number To Busy" "Number To Busy" number1
if failure
   goto stopnow
endif

?????????????

   transmit "busy trunk "
   transmit trunk1  ; trunk group number
   transmit "/"
   transmit member1 ; trunk group member
   transmit "^M"
   waitfor "^[[KCommand: "
   transmit "^[OP"
   
stopnow:
endproc
 
My user input boxes will not work for integers... Ouch!
 
i would start with a recorded script from an actual session.

you dont have to start your trunk1 off as an integer. make it a string. just use ATOI to do the math with later. i will look for a script that i have that increments like you are asking and post it later.

but in the meantime here is one that i use in a 5ess switch to delete trunks, that you can look at.

PROC MAIN

STRING TGNUM1
STRING NUMDISC
STRING MEM1
STRING MEMNUM1
STRING QTY1
STRING MEMQTY1
INTEGER ANSWER

TRANSMIT "RCV:APPTEXT!"
WAITFOR ": " FOREVER

SDLGINPUT "TN" "ENTER TRUNK GROUP:" TGNUM1
STRLEN TGNUM1 ANSWER
STRFMT NUMDISC "TGN=%.10s!" TGNUM1

SDLGINPUT "TN" "ENTER QTY TO DELETE:" QTY1
STRLEN QTY1 ANSWER
STRFMT MEMQTY1 "TRKMEMQTY=%.10s!" QTY1

ANSWER = 1
WHILE ANSWER > 0

SDLGINPUT "TN" "ENTER MEMBER TO START DELETE:" MEM1
STRLEN MEM1 ANSWER
STRFMT MEMNUM1 "MEMBNBR=%.10s!" MEM1

TRANSMIT "FORM=5v5&OUT!"
WAITFOR ": " FOREVER
TRANSMIT NUMDISC
WAITFOR ": " FOREVER
TRANSMIT MEMNUM1
WAITFOR ": " FOREVER
TRANSMIT MEMQTY1
WAITFOR ": " FOREVER
TRANSMIT "OUT!"
WAITFOR ": " FOREVER

ENDWHILE

ENDPROC



 
here is one that uses an incrementing subroutine, and performs a function on a did group, after getting the strings for the trunk group, and the starting and ending number from a dialog box. you should be able to adapt it pretty easily ....

PROC MAIN

STRING STARTNUM
STRING ENDNUM
STRING DIDNUMADD
STRING RAX1
STRING LCC1
STRING RTI1
STRING RMK1
STRING TRIG1
STRING RAXDID
STRING LCCDID
STRING RTIDID
STRING RMKDID
STRING TRIGDID
STRING STATUS
STRING MODE
STRING MODE2
INTEGER NUM1
INTEGER NUM2

ERRORLOOP:
SDLGINPUT "ENTER" "STARTING NUMBER (NO AREA CODE i.e.6981000)" STARTNUM
SDLGINPUT "ENTER" "ENDING NUMBER (i.e.6981099)" ENDNUM
SDLGINPUT "ENTER" "NEW DIDs, OR CHG EXISTING, OR OUT? (NEW/CHG/OUT):" STATUS
SDLGINPUT "RAX" "ROUTING AREA EXCHANGE (USUALLY 1):" RAX1
SDLGINPUT "LCC" "LINE CLASS CODE (RTI/DID - USU RTI):" LCC1
SDLGINPUT "RTI" "ROUTING INDEX (i.e. 162):" RTI1
SDLGINPUT "RMK" "CUSTOMER NAME:" RMK1
SDLGINPUT "TRIG1" "TRIGGER IT TO BELLS SWITCH: (Y/N)" TRIG1
STRFMT TRIGDID "SET=`"NONCONDTRIG`"&`"%s`"!" TRIG1
STRFMT RMKDID "SET=`"RMK`"&`"%s`"!" RMK1
STRFMT RTIDID "SET=`"RTI`"&`"%s`"!" RTI1
STRFMT LCCDID "SET=`"LCC`"&`"%s`"!" LCC1
STRFMT RAXDID "SET=`"RAX`"&`"%s`"!" RAX1
STRFMT MODE2 "%s!" STATUS

ATOI STARTNUM NUM1 ; CONVERT TO INTEGER
ATOI ENDNUM NUM2

TRANSMIT "RCV:APPTEXT!"
WAITFOR ": " FOREVER

TRANSMIT "NVERBOSE!"
WAITFOR ": " FOREVER

MAINLOOP:
;============== BEGIN INSERTION SUBROUTINE HERE==
STRFMT DIDNUMADD "TN=%.10s!" STARTNUM
STRFMT MODE "FORM=1V5&%s!" STATUS
TRANSMIT MODE
WAITFOR ": " FOREVER
TRANSMIT DIDNUMADD
WAITFOR ": " FOREVER
TRANSMIT RAXDID
WAITFOR ": " FOREVER
TRANSMIT LCCDID
WAITFOR ": " FOREVER
TRANSMIT RTIDID
WAITFOR ": " FOREVER
TRANSMIT "SET=`"TSTCODE`"&`"NONE`"!"
WAITFOR ": " FOREVER
TRANSMIT RMKDID
WAITFOR ": " FOREVER
TRANSMIT "SET=`"TRC`"&`"N`"!"
WAITFOR ": " FOREVER
TRANSMIT TRIGDID
WAITFOR ": " FOREVER
TRANSMIT MODE2
WAITFOR ": " FOREVER

STATMSG "BUILDING LINE (318) %s UPTO (318) %s " STARTNUM ENDNUM
MSPAUSE 250 ; PAUSES A QRTR OF A SEC

;===END INSERTION SUBROUTINE HERE ===============

ATOI STARTNUM NUM1 ; CONVERT TO INTEGER
ATOI ENDNUM NUM2

IF NUM2<NUM1
USERMSG "FIRST NUMBER MUST BE LESS THAN ENDING NUMBER"
GOTO ERRORLOOP
ELSE
ENDIF

NUM1++ ; ADDS 1

ITOA NUM1 STARTNUM ; CONVERT TO STRING
ITOA NUM2 ENDNUM
;itoa num3 totalnum

IF NUM1==NUM2+1 ; CK TO SEE IF COMPLETE
transmit "END^M"
USERMSG "COMPLETED"
HALT
ELSE
GOTO MAINLOOP
ENDIF

ENDPROC

 
Thanks for the example scripts. From your scripts here is what I came up with... and it works beautifully

This script is a useful way for anybody with an Avaya S8700 to gracefully busy sequential members of a trunk group.

Code:
proc main

string trunk1
string member1
string member2
integer number1
integer number2
string converted1

sdlginput "Trunk Group" "Trunk Group" trunk1
if failure
   goto stopnow
endif

sdlginput "First Member" "First Member" member1
if failure
   goto stopnow
endif

sdlginput "Last Member" "Last Member" member2
if failure
   goto stopnow
endif

atoi member1 number1
atoi member2 number2

while number2 >= number1
itoa number1 converted1

   transmit "campon trunk "
   transmit trunk1
   transmit "/"
   transmit converted1
   transmit "^M"
   waitfor "^[[KCommand: "
   transmit "^[OP"
   
number1++
endwhile

stopnow:
endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top