Version=4.5 DisplayType= StartModule=Welcome RunAtHangup= StartWithoutAnswer=0 [Welcome] Type=Play DispSize=69 Txt=Play the main welcome message, Replay=0,0 strTtsText= On {0} Goto [Transfer call] On {Timeout 1} Goto [retrysetCC] Position=160,19 [GetCC] Type=Get Numbers DispSize=69 Txt=Ask caller to enter the card number PlayFile1=wav\Card.wav, wav\Beep1.wav Replay=0,0 GetNbrLenEnforce=1 GetNbrLenMax=16 Confirm=OFF On {Success} Goto [checkCClen] On {Fail} Goto [checkCClen] Position=800,289 [checkCClen] Type=Evaluate DispSize=69 Txt=if len of entered number is 16 then do more tests... Expression=len("$RV[GetCC]") = 16 ExprNewRV= ExprStoreRV=0 On {False} Goto [retryincCC] On {True} Goto [checksumCC] Position=801,378 [retrysetCC] Type=Evaluate DispSize=69 Txt=Initialise the retrycount to 0 Expression=0 ExprNewRV=retrycount ExprStoreRV=0 On {True} Goto [GetCC] On {False} Goto [GetCC] Position=801,199 [retryincCC] Type=Evaluate DispSize=69 Txt=Increment the CC entry retry count Expression=$RV[retrycount]+1 ExprNewRV=retrycount ExprStoreRV=0 On {0} Goto [err3.vox CC] On {1} Goto [err3.vox CC] On {2} Goto [err3.vox CC] On {3} Goto [err8.vox CC] Position=845,695 [err8.vox CC] Type=Play DispSize=69 Txt=too many retries, play an error message and then hang up. PlayFile1=wav\Err8.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [HangupCC] Position=1039,782 [err3.vox CC] Type=Play DispSize=69 Txt=Play a sound file, then await a response... PlayFile1=wav\Err3.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [GetCC] Position=768,802 [checksumCC] Type=Run VB Script DispSize=69 Txt=Run a VB Script to check the validity of the credit card number. VbsWait=1 VbScript=Dim a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, chk, chk1, chk2\ Dim a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1\ Dim a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2\ Dim a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3\ Dim a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4\ dim rem0, rem1, rem2\ \ a=mid("$RV[GetCC]", 1, 1)\ b=mid("$RV[GetCC]", 2, 1)\ c=mid("$RV[GetCC]", 3, 1)\ d=mid("$RV[GetCC]", 4, 1)\ e=mid("$RV[GetCC]", 5, 1)\ f=mid("$RV[GetCC]", 6, 1)\ g=mid("$RV[GetCC]", 7, 1)\ h=mid("$RV[GetCC]", 8, 1)\ i=mid("$RV[GetCC]", 9, 1)\ j=mid("$RV[GetCC]", 10, 1)\ k=mid("$RV[GetCC]", 11, 1)\ l=mid("$RV[GetCC]", 12, 1)\ m=mid("$RV[GetCC]", 13, 1)\ n=mid("$RV[GetCC]", 14, 1)\ o = mid("$RV[GetCC]", 15, 1)\ p=mid("$RV[GetCC]", 16, 1)\ \ a1=a*2+100\ a2=mid(a1,2,1)\ a3=mid(a1,3,1)\ a4=cint(a2)+cint(a3)\ \ c1=c*2+100\ c2=mid(c1,2,1)\ c3=mid(c1,3,1)\ c4=cint(c2)+cint(c3)\ \ e1=e*2+100\ e2=mid(e1,2,1)\ e3=mid(e1,3,1)\ e4=cint(e2)+cint(e3)\ \ g1=g*2+100\ g2=mid(g1,2,1)\ g3=mid(g1,3,1)\ g4=cint(g2)+cint(g3)\ \ i1=i*2+100\ i2=mid(i1,2,1)\ i3=mid(i1,3,1)\ i4=cint(i2)+cint(i3)\ \ k1=k*2+100\ k2=mid(k1,2,1)\ k3=mid(k1,3,1)\ k4=cint(k2)+cint(k3)\ \ m1=m*2+100\ m2=mid(m1,2,1)\ m3=mid(m1,3,1)\ m4=cint(m2)+cint(m3)\ \ o1=o*2+100\ o2=mid(o1,2,1)\ o3=mid(o1,3,1)\ o4=cint(o2)+cint(o3)\ \ chk=cint(a4)+cint(b)+cint(c4)+cint(d)+cint(e4)+cint(f)+cint(g4)+cint(h)+cint(i4)+cint(j)+cint(k4)+cint(l)+cint(m4)+cint(n)+cint(o4)+100\ \ chk2=cstr(chk)\ \ rem0=mid(chk2,3,1)\ rem1=rem0+cint(p)+10\ rem2=mid(cstr(rem1),2,1)\ \ if (cint(rem2)=0) then\ WriteResultFile("SUCCESS ")\ else\ WriteResultFile("FAIL")\ end if\ \ function WriteResultFile(strResult)\ const ForReading=1, ForWriting=2, ForAppending=8\ Dim filename, fso, ts, outdata, outdata2, outdata3 \ \ filename = "VGRUNRESULT_$RV_DEVICEID.TXT"\ set fso = CreateObject("Scripting.FileSystemObject")\ set ts = fso.OpenTextFile(filename, ForWriting, True)\ ts.WriteLine(strResult)\ ts.Close\ WriteResultFile = 0\ end function\ \ \ VbsHoldPlay= On {Fail} Goto [err4.vox] On {Success} Goto [retrysetExp] Position=962,487 [err4.vox] Type=Play DispSize=24 Txt=incorrect CC... PlayFile1=wav\Err4.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [RetryCC inc2] Position=965,571 [retrysetExp] Type=Evaluate DispSize=24 Txt=retrycount=0 Expression=0 ExprNewRV=retrycount ExprStoreRV=0 On {True} Goto [GetExp1] On {False} Goto [GetExp1] Position=1314,154 [GetExp1] Type=Get Numbers DispSize=69 Txt=Ask caller to enter the expiry date PlayFile1=wav\Exp.wav, wav\Beep1.wav Replay=0,0 GetNbrLenEnforce=1 GetNbrLenMax=4 Confirm=OFF On {Success} Goto [SetGetExp1] On {Fail} Goto [SetGetExp1] Position=1316,240 [checkExpLen] Type=Evaluate DispSize=69 Txt=if len=4 then do more tests... Expression=len("$RV[GetExp]") = 4 ExprNewRV= ExprStoreRV=0 On {True} Goto [check Exp] On {False} Goto [retryincExp] Position=1316,425 [retryincExp] Type=Evaluate DispSize=69 Txt=Incremet the retry counter for entering the Expiry date... Expression=$RV[retrycount]+1 ExprNewRV=retrycount ExprStoreRV=0 On {0} Goto [GetExp2] On {1} Goto [GetExp2] On {2} Goto [GetExp2] On {3} Goto [err8.vox Exp] Position=1363,644 [err8.vox Exp] Type=Play DispSize=69 Txt=too many retries, play an error message and then hang up. PlayFile1=wav\Err8.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [HangupExp] Position=1467,764 [check Exp] Type=Run VB Script DispSize=69 Txt=Run VB Script to check the validity of the entered Expiry date VbsWait=1 VbScript=expdate="$RV[GetExp]"\ mm=mid(expdate,1,2)\ yy=mid(expdate,3,2)\ \ expdateint = clng(yy & mm)\ \ if (yy >50) then\ expdateint=expdateint+190000\ else\ expdateint=expdateint+200000\ end if\ \ mmNow=Month(Now)\ yyyyNow = Year(Now)\ mmNowstr = cstr(mmNow)\ if len(mmNowstr)=1 then\ mmNowstr = "0" & mmNowstr\ end if\ \ sysdatestr = cstr(yyyyNow) & mmNowstr\ sysdate = clng(sysdatestr)\ \ if ((expdateint(sysdate+501))) then\ WriteResultFile("FAIL")\ else\ WriteResultFile("SUCCESS")\ end if\ \ function WriteResultFile(strResult)\ const ForReading=1, ForWriting=2, ForAppending=8\ Dim filename, fso, ts, outdata, outdata2, outdata3 \ \ filename = "VGRUNRESULT_$RV_DEVICEID.TXT"\ set fso = CreateObject("Scripting.FileSystemObject")\ set ts = fso.OpenTextFile(filename, ForWriting, True)\ ts.WriteLine(strResult)\ ts.Close\ WriteResultFile = 0\ end function\ \ \ \ VbsHoldPlay= On {Fail} Goto [retryincExp] On {Success} Goto [retrysetAmt] Position=1479,531 [GetAmt] Type=Get Numbers DispSize=69 Txt=Ask caller to enter the amount they wish to pay PlayFile1=wav\Amt.wav, wav\Beep1.wav Replay=0,0 GetNbrLenEnforce=1 GetNbrLenMax=7 Confirm=OFF On {Success} Goto [checkAmtLen] On {Fail} Goto [retryincAmt] On {Timeout 4} Goto [checkAmtLen] Position=1999,246 [retrysetAmt] Type=Evaluate DispSize=69 Txt=retrycount=0 Expression=0 ExprNewRV=retrycount ExprStoreRV=0 On {True} Goto [GetAmt] On {False} Goto [GetAmt] Position=1725,131 [checkAmtSize1] Type=Evaluate DispSize=69 Txt=$RV[GetAmt] > 100000 Expression=$RV[GetAmt] > 100000 ExprNewRV= ExprStoreRV=0 On {False} Goto [checkAmtSize2] On {True} Goto [AmtTooBig] Position=1998,442 [AmtTooBig] Type=Play DispSize=69 Txt=err7.vox PlayFile1=wav\err7.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [AmtTooBig2] Position=1730,258 [checkAmtSize2] Type=Evaluate DispSize=69 Txt=$RV[GetAmt] < 100 Expression=$RV[GetAmt] < 100 ExprNewRV= ExprStoreRV=0 On {True} Goto [clearGetAmt] On {False} Goto [SayAmt] Position=2006,557 [retryincAmt] Type=Evaluate DispSize=24 Txt= Expression=$RV[retrycount]+1 ExprNewRV=retrycount ExprStoreRV=0 On {0} Goto [TryAgainAmt] On {1} Goto [TryAgainAmt] On {2} Goto [TryAgainAmt] On {3} Goto [err8.vox Amt] Position=2174,757 [TryAgainAmt] Type=Play DispSize=69 Txt=err9.vox PlayFile1=wav\Err9.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [GetAmt] Position=1984,860 [err8.vox Amt] Type=Play DispSize=69 Txt=too many retries, play an error message and then hang up. PlayFile1=wav\Err8.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [HangupAmt] Position=2178,859 [SayAmt] Type=Say Numbers DispSize=69 Txt=conf3.vox .... conf2.vox PlayFile1=wav\Conf3.wav PlayFile2=$RV[GetAmt] PlayFile3=wav\Conf2.wav Replay=0,0 SayNbrType=Amount Cents On {1} Goto [DoReceipt] On {9} Goto [ClearGetAmt2] Position=2368,44 [AmtTooBig2] Type=Play DispSize=69 Txt=err7b.vox PlayFile1=wav\Err7a.wav Replay=0,0 strTtsText= On {1} Goto [GetAmt] Position=1745,360 [SayReceipt] Type=Say Numbers DispSize=69 Txt=rec.vox...rec2.vox PlayFile1=wav\Rec.wav PlayFile2=$RV[receipt] PlayFile3=wav\Rec2.wav Replay=0,0 SayNbrType=Digits On {9} Goto [SayReceipt] On {Timeout 5} Goto [Play Goodbye] Position=2388,358 [DoReceipt] Type=Run VB Script DispSize=69 Txt=Generate the Receipt number... VbsWait=1 VbScript=yyyy = Year(Now)\ mm=Month(Now)\ dd=Day(Now)\ rechh = Hour(Now)\ recmm = Minute(Now)\ recss = Second(Now)\ \ if len(mm)=1 then\ mm="0" & mm\ end if\ if len(dd)=1 then\ dd="0" & dd\ end if\ if len(rechh)=1 then\ rechh="0" & rechh\ end if\ if len(recmm)=1 then\ recmm="0" & recmm\ end if\ if len(recss)=1 then\ recss="0" & recss\ end if\ \ rec = yyyy & mm & dd & rechh & recss & recmm\ \ strReceipt = "[receipt]{" & rec & "}"\ iRet = WriteResultFile(strReceipt)\ \ function WriteResultFile(strResult)\ const ForReading=1, ForWriting=2, ForAppending=8\ Dim filename, fso, ts, outdata, outdata2, outdata3 \ filename = "VGRUNRESULT_$RV_DEVICEID.TXT"\ set fso = CreateObject("Scripting.FileSystemObject")\ set ts = fso.OpenTextFile(filename, ForWriting, True)\ ts.WriteLine(strResult)\ ts.Close\ end function VbsHoldPlay= On {Success} Goto [SayReceipt] Position=2385,240 [The End] Type=Hangup the Call DispSize=69 Txt=Hangup the call. Position=2393,563 [HangupCC] Type=Hangup the Call DispSize=69 Txt=Hangup the call. Position=1035,898 [HangupExp] Type=Hangup the Call DispSize=69 Txt=Hangup the call. Position=1470,856 [HangupAmt] Type=Hangup the Call DispSize=69 Txt=Hangup the call. Position=2182,951 [GetExp2] Type=Get Numbers DispSize=69 Txt=Err5.wav PlayFile1=wav\Err5.wav, wav\Beep1.wav Replay=0,0 GetNbrLenEnforce=1 GetNbrLenMax=4 Confirm=OFF On {Success} Goto [SetGetExp2] On {Fail} Goto [SetGetExp2] Position=1264,766 [SetGetExp1] Type=Evaluate DispSize=24 Txt=Evaluate the Result Variable specified, and select the path which matches the current value of the Result Variable Expression="$RV[GetExp1]" ExprNewRV=GetExp ExprStoreRV=0 On {True} Goto [checkExpLen] On {False} Goto [checkExpLen] Position=1317,332 [SetGetExp2] Type=Evaluate DispSize=69 Txt= Expression="$RV[GetExp2]" ExprNewRV=GetExp ExprStoreRV=0 On {True} Goto [checkExpLen] On {False} Goto [checkExpLen] Position=1267,856 [checkAmtLen] Type=Evaluate DispSize=69 Txt= Expression=len("$RV[GetAmt]")>0 ExprNewRV= ExprStoreRV=0 On {True} Goto [checkAmtSize1] Position=1999,350 [clearGetAmt] Type=Evaluate DispSize=69 Txt=Evaluate the Result Variable specified, and select the path which matches the current value of the Result Variable Expression=0 ExprNewRV=GetAmt ExprStoreRV=0 On {True} Goto [retryincAmt] On {False} Goto [retryincAmt] Position=2012,658 [ClearGetAmt2] Type=Evaluate DispSize=24 Txt=Evaluate the Result Variable specified, and select the path which matches the current value of the Result Variable Expression=0 ExprNewRV=GetAmt ExprStoreRV=0 On {True} Goto [GetAmt] On {False} Goto [GetAmt] Position=2213,151 [Transfer call] Type=Transfer Call DispSize=69 Txt=Transfer call to the operator strXferDestExt=9 iXferType=0 Position=19,160 [Play Goodbye] Type=Play DispSize=69 Txt=Thank you fo yusing our system... PlayFile1=wav\Goodbye.wav Replay=0,0 strTtsText= On {Timeout 0} Goto [The End] Position=2389,465 [RetryCC inc2] Type=Evaluate DispSize=24 Txt=Evaluate the Result Variable specified, and select the path which matches the current value of the Result Variable Expression=$RV[retrycount]+1 ExprNewRV=retrycount ExprStoreRV=0 On {0} Goto [GetCC] On {1} Goto [GetCC] On {2} Goto [GetCC] On {3} Goto [err8.vox CC] On {4} Goto [err8.vox CC] Position=963,615