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 Evaluation

Status
Not open for further replies.

TBarrnes

MIS
Jul 12, 2004
408
US
Can someone evaluate this script and tell me if it has any flaws in it?


Script*/


IF OUT OF SERVICE HPF_Skillset THEN
Execute HPF_General
ELSE
QUEUE TO SKILLSET HPF_Skillset
WAIT 2
GIVE MUSIC moh_gv
END IF


SECTION wait_loop
WAIT 2
IF NOT QUEUED THEN
IF OUT OF SERVICE HPF_Skillset THEN
Execute HPF_General
ELSE
QUEUE TO SKILLSET HPF_Skillset
WAIT 2
END IF
END IF


SECTION wait_Two_loop

GIVE RAN ran_1

WAIT wait_30_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE HPF_Skillset THEN
Execute HPF_General
ELSE
QUEUE TO SKILLSET HPF_Skillset
WAIT 2
END IF
END IF

GIVE CONTROLLED BROADCAST ANNOUNCEMENT 6500
PLAY PROMPT VOICE SEGMENT outage_vs

WAIT wait_30_gv

OPEN VOICE SESSION

PLAY PROMPT VOICE SEGMENT vm_vs

COLLECT 1 DIGITS INTO vm_choice_cv INTER DIGIT TIMER 2

END VOICE SESSION



WHERE vm_choice_cv EQUALS

VALUE 1: ROUTE CALL 3333

DEFAULT: EXECUTE wait_two_loop

END WHERE

EXECUTE wait_two_loop

Section HPF_General

IF OUT OF SERVICE General_HPF_sk THEN
Route call 3333
ELSE
QUEUE TO SKILLSET General_HPF_sk
WAIT 2
GIVE MUSIC moh_gv
END IF



SECTION wait_HPF_loop
WAIT 2
IF NOT QUEUED THEN
IF OUT OF SERVICE General_HPF_sk THEN
Route call 3333
ELSE
QUEUE TO SKILLSET General_HPF_sk
WAIT 2
END IF
END IF



SECTION wait_Two_HPF_loop

GIVE RAN ran_1

WAIT wait_30_gv
IF NOT QUEUED THEN
IF OUT OF SERVICE General_HPF_sk THEN
Route call 3333
ELSE
QUEUE TO SKILLSET General_HPF_sk
WAIT 2
END IF
END IF

GIVE CONTROLLED BROADCAST ANNOUNCEMENT 6500
PLAY PROMPT VOICE SEGMENT outage_vs

WAIT wait_30_gv


EXECUTE wait_two_HPF_loop

 
This is a bit more than a quick evaluation. You should be paying someone for this service, but maybe there is someone who has the time and is willing....
 
I'm trying to learn scripting myself so I don't have to pay the vendor $150 an hour. That's the whole point of visiting and posting on a technical forum. Why are PBX questions legitimate over in the Meridian forum? One could argue that you should have to pay people to look at your TNB's and tell you what COS's need to be included.....yet you don't.
There's no reason why a thread should be taboo simply because it threatens another vendor's bottom line.
 
Excellent point, and for that retort, and that retort alone, I will answer. On the broadcast announcements, unless you have multiple access dn's, I would leave off the 6500. This way, if you upgrade from Mail to CP, or setup a new CP down the road (with a new Access DN), you don't have to edit every single script. If you are concerned about stating the dn, use a variable instead.

On all of your section naming, it gets more than a bit confusing. We tend to use section names like SEC_ONE, SEC_TWO, etc. I got lost a couple of times trying to follow the progression of wait_loop, wait_loop_two, wait_loop_too....

Also, I tend to use the actual amount of wait time behind my wait statements. Rather than WAIT 30_gv, why not just say WAIT 30? I guess if the wait is a moving target it is easier with variables, but most of our wait steps are purposeful and done the same each time.

Overall, it "looks" clean, no obvious signs of issues. Remember, you can validate the script (as you must) so that will give you something of a sanity check. Just chime back in here when it doesn't validate, or if a particular section doesn't do what you expect.


Couple of suggestions:
 
Thanks for the response. I tend to be a little touch about learning issues because way back when I got my start on the Nortel PBX I offered to work for free for a local vendor just to learn and he basically told me to get lost. As a result I wasn't hired for a local job opportunity that came up shortly after.
I eventually ended up saving the money to drive down to Texas for MAC training. An employer finally gave me a chance and as luck would have it, I perform much of the work in house that the original vendor who told me to get lost used to do. And the company saves oodles of money.
 
In my scripts where I am collecting digits, I usually have a line assigning a value to the variable before going in to collect digits.

this may be fluff, but that's the way mine have been working for years.

Also, as a general rule, I usually tab over a bit from the first line in a cluster and comment out what that particular portion of the script accomplishes. Makes for easier reading when you are doing a quick scan or trying to show a call center manager what the call flow is doing.

I also usually end my scripts with a worse case, default treatment - in the off chance the call 'hiccups' out of the section it was supposed to go to.

You have both RAN and Controlled Broadcast treatments - that is fine, but it just adds more administration on your part - two sources of treatments to maintain.

finally, I'd consider making more use of loops so you don't have to repeat the same commands so much. Not a big deal - just a different spin on accomplishing the same thing. Looks good for a hacker. ;-)
Good luck
 
jasidaja has made a very important point. You must make sure that the default value in the call variable vm_choice_cv is anything except 1, else if the caller fails to press anything at all then the default value in the call variable will be used and the call will route to 3333. This may be what you intended of course.
 
I'm glad others have stepped in to help. This was much longer than the usual request. If you break down your script into parts and what you trying to achieve, it will help others understand you issues better.

I didn't mean to be short with you. I learn as much (or more) than I give here. You just caught me after a long day.

Also, remember that there are script samples from Nortel in the scripting guide and the default script export file. They are overly commented for my taste, but are good for reference scripts.
 
Thanks for the info! This forum has helped a lot of people from all skill levels.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top