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!

Scripting Question in Symposium

Status
Not open for further replies.

bookendb

IS-IT--Management
Jan 29, 2004
8
0
0
US
I need to take in 200 three character numbers, 600-799, into a variable. Then I need to make a decision, based on the numeric value, to route the call. What I want to do is set up a list of correspondng DN variables that the customer can update so they can change the destination of where symposium will route the call to. Some of these numbers will be routed internally and some will be routed externally. The numbers change from time to time and the request is in to have the ability to change the destiations within Symposium rather than have them need to adjust the DCFW of a Phantom TN.

Its possible to do with a lot of if and where statements, but I dont want the system to work so hard. I am trying to think of a way to filter out the tests to streamline it.

My question is, has anyone had Symposium do this kind of analysis and is there some scripting trick to avoid this kind of statement below. I would have to test 200 times. That seems like way too large of a number if If statements for the system to plow through. If there was a way to stitch together these variables and somehow concatenate them into the route call DN variable, that would be much less work.

Has anyone tested a number like this, you can see I have broken up the 10s and 1s place into separate values.

SECTION TEST_DXX
IF Test_YXY_cv = 00 AND Test_YYX_cv = 00 THEN ROUTE CALL D01_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 01 THEN ROUTE CALL D02_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 02 THEN ROUTE CALL D03_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 03 THEN ROUTE CALL D04_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 04 THEN ROUTE CALL D05_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 05 THEN ROUTE CALL D06_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 06 THEN ROUTE CALL D07_DN_gv
END
IF Test_YXY_cv = 00 AND Test_YYX_cv = 07 THEN ROUTE CALL D08_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 08 THEN ROUTE CALL D09_DN_gv
END IF
IF Test_YXY_cv = 00 AND Test_YYX_cv = 09 THEN ROUTE CALL D01_DN_gv
END IF
 
Not sure if this helps but I did something similar but with more digits (NPAs). I had a scenario in which callers from specific regions of the US were dialing into a common number. The script would look at the NPA within the caller's CLID and send calls to specific extensions. I created a global list variable for each state in the US and assigned the appropriate area codes to each NPA variable. After that I just the script dig through the global variables and check if the NPA was equal to any of them. If a match was found. I would do a route call. You can also create variables the end user can modify to adjust the destination where the call routes too. It would roughly be interpreted to your situation like this:

Why not try something similar:
CREATE GLOBAL LIST VARIABLES FOR THE 3 DIGIT NUMBERS
dn_RangeA_gv = 200..249
dn_RangeB_gv = 250..299
dn_RangeC_gv = 300..349
dn_RangeD_gv = 350..399
CREATE GLOBAL VARIABLES FOR DESTINATION DNs
dn_PersonA_gv = x2000
dn_PersonB_gv = x2005
dn_PersonC_gv = x2010
dn_PersonD_gv = x2015
CREATE CALL VARIABLE TO COLLECT DIGITS FROM CALLER
dn_CallerNum_cv

WRITE THE SCRIPT
/* Get callers digits */
collect 3 digits into dn_CallerNum_cv no type ahead interdigit timer 5 with terminating character #

/* Check digit against the variables and route calls */
if dn_CallerNum_cv = dn_RangeA_gv then
route call dn_PersonA_gv
end if
if dn_CallerNum_cv = dn_RangeB_gv then
route call dn_PersonB_gv
end if
if dn_CallerNum_cv = dn_RangeC_gv then
route call dn_PersonC_gv
end if
if dn_CallerNum_cv = dn_RangeD_gv then
route call dn_PersonD_gv
end if
/* treat call if digit range is unknown */
route call dn_PersonD_gv


 
It would be much more efficient to use a single Where-Equals command, than to use all of the IF-Then-Else commands.


The syntax is in the Scripting guide, and includes several examples that seem to fit your situation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top