van Report post Posted 12/01/2005 09:41 AM Hi I'm new to using Script Designer. I've looked at a few of the example scripts and I must say, it seems simple but powerful. Very nice. Where I need help is with a script that is supposed to chek if the callers CLI complies to a certain rule. Basically I want to check the first three digits of the caller's CLI to see if they match up to accepted numbers. Accepted numbers start with 072, 082, 073, 083, 074, 084 and 076. At the moment what happens in the script is this: Caller phones in and a welcome messag is played. A VBScript runs to determine my companies web services status - I've skipped this part for now. The caller's CLI is checked to see if it matches some criteria (as mentioned above). If there is no match the caller is prompted to enter their mobile phone number. I'm using an Evaluate Expression module to check $RV_CIDNUMBER. This is what I have: firstThreeDigits = left($RV_CIDNUMBER, 3) if firstThreeDigits = "072" or firstThreeDigits = "072" or firstThreeDigits = "073" or firstThreeDigits = "083" or firstThreeDigits = "074" or firstThreeDigits = "084" or firstThreeDigits = "076" then outcome = True else outcome = False end if In the Evalute Expression window's 'Assign result to....' field I have specified outcome. Now after you have laughed at my feeble attempt or alternatively scratched your head in confusion, could you please help? Like I said, this is my first attempt, so I might very well be going about this the wrong way. All I know is it isn't working and I don't know how to make it work. Share this post Link to post
van Report post Posted 12/01/2005 10:38 AM AHA! I've fixed the problem. Instead of using a Validate Expression module I used a Run VB Script module. I'd still like to know what the limitations are to using the Validate Expression and what it's intended use is. I get the feeling that I was expecting too much from it. Here's what I've done: set vg = CreateObject("VoiceGuide.CommandLink") ddd = left("$RV_CIDNUMBER", 3) if ddd <> "072" and ddd <> "082" and ddd <> "073" and ddd <> "083" and ddd <> "074" and ddd <> "084" and ddd <> "076" then sResult = "verify_failed" else sResult = "verify_passed" vg.RvSet $RV_LINEID, "CallerID", "$RV_ENTEREDNUMBER" end if vg.Run_ResultReturn $RV_LINEID, sResult set vg = Nothing Share this post Link to post
SupportTeam Report post Posted 12/01/2005 11:26 AM In the Evaluate Expression module have you tried using: Left("$RV_CIDNUMBER", 3) and then specify paths like this: on {072} goto [Match] on {082} goto [Match] on {073} goto [Match] on {083} goto [Match] on {074} goto [Match] on {084} goto [Match] on {076} goto [Match] on {Success} goto [NotMatched] on {Fail} goto [NotMatched] Have a look at the trace log as well when running the script - debug info there usually helps to clarify what's happening. Share this post Link to post
van Report post Posted 12/02/2005 07:17 AM Oh, wow. Thats straight forward and simple. Thanx Share this post Link to post