Guest henrik@abcgroup.dk Report post Posted 05/03/2007 02:06 PM Hi system: - XP-pro version - Voiceguide for Dialogic, 6.0.3243Enterprise, 4 line version - Dialogic cards D/41JCT-LS-eu I have been trying to implement a script, placing a new call in the callque but with a different script. That part is now working brilliantly. This new call in the outdialque should though first be commenced say 20minutes later, which means I have to calculate the new time based upon $RV[HH] and $RV[MM]. This is though not the easiest task as the time is obviously in 1/60, not 1/100. How will I do this easiest? Is there a hidden function, as I haven't been able to modify the time simply by adding a digit, e.g. string = $RV[MM] + 20 or explained differently: The following works fine. placing a new call in the outdialque: set vg = CreateObject("VoiceGuide.CommandLink") vg.Dialer_OutDialQueAdd "$RV_CIDnumber", 705031400, 1500, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "" sResult = "success" vg.Run_ResultReturn $RV_LINEID, sResult set vg = Nothing but if I start putting in a variable instead of the starttime: set vg = CreateObject("VoiceGuide.CommandLink") dialstartime = "1500" 'or even worse: dialstartime = ($RV_HH$RV_NN+20) vg.Dialer_OutDialQueAdd "$RV_CIDnumber", 705031400, #dialstartime#, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "" sResult = "success" vg.Run_ResultReturn $RV_LINEID, sResult set vg = Nothing the result is an error. Second thing is that I have not been able to add eg. 20 minutes to the currenttime registered with $RV_HH and $RV_NN. I know this is on the edge of being a problem with Voiceguide compared to my own programming headache, but I would appreciate a hint or two. as I am sure you have had the case before. The $RV_NN, $RV_HH, $RV_starttime etc.; are they in the form of textstrings or numbers(integer)? Thank you in advance. /Henrik Share this post Link to post
SupportTeam Report post Posted 05/04/2007 01:01 AM The Acrivation Time field is in format YMMDDHHNNSS, so you need to find out what the time will be in 20 minutes and then put that time in the YMMDDHHNNSS format. The VBScript snippet which will do that is: CurrentDate = Now + 0.0138888 MyDay = Right("0" & Day(CurrentDate),2) MyMonth = Right("0" & Month(CurrentDate),2) MyYear = Right(Year(CurrentDate),1) MyHour = Right("0" & Hour(CurrentDate),2) MyMinute = Right("0" & Minute(CurrentDate),2) MySecond = Right("0" & Second(CurrentDate),2) sActivateTime = MyYear & MyMonth & MyDay & MyHour & MyMinute & MySecond 0.0138888 is the fraction of the day taken up by 20 minutes. Share this post Link to post
Guest henrik@abcgroup.dk Report post Posted 05/04/2007 01:26 PM Thank you very much for your help. It is obviously easier to do with the activatetime but do should the seconds also be included as specified? sActivateTime = MyYear & MyMonth & MyDay & MyHour & MyMinute & MySecond or should it be sActivateTime = MyYear & MyMonth & MyDay & MyHour & MyMinute (as I find it in the óutdialque.mdb)? The obvious thing would be to try both, and I did, but my script keeps failing and not entering anything in the outdialque: Now the clsoest I get is by the following vb script: set vg = CreateObject("VoiceGuide.CommandLink") CurrentDate = Now + 0.0138888 MyDay = Right("0" & Day(CurrentDate),2) MyMonth = Right("0" & Month(CurrentDate),2) MyYear = Right(Year(CurrentDate),1) MyHour = Right("0" & Hour(CurrentDate),2) MyMinute = Right("0" & Minute(CurrentDate),2) MySecond = Right("0" & Second(CurrentDate),2) sActivateTime = MyYear & MyMonth & MyDay & MyHour & MyMinute & MySecond vg.Dialer_OutDialQueAdd "$RV_CIDnumber", sActivateTime, 0700, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "" sResult = "success" vg.Run_ResultReturn $RV_LINEID, sResult set vg = Nothing I tried various versions of sactivatetime, being #sactivatetime#, "sactivatetime", etc. The VB error I receive is incorrect type/types are not the same in line 10. What would the correct syntax be for entering the sactivatetime? again, thank you very much. Regards Henrik Share this post Link to post
SupportTeam Report post Posted 05/04/2007 10:18 PM should the seconds also be included as specified? sActivateTime = MyYear & MyMonth & MyDay & MyHour & MyMinute & MySecond or should it be sActivateTime = MyYear & MyMonth & MyDay & MyHour & MyMinute (as I find it in the óutdialque.mdb)? You are right, the seconds should not be included. The format of the Dialer_OutDialQueAdd function is: object.Dialer_OutDialQueAdd sPhoneNumber, vActivateTime, lDayTimeStart, lDayTimeStop, sDaysCallAllowed, sLineSelection, iPriority, sAnnounceMessage, sScript, sAnswerMachineMsg, sRV, lAnswerTimeout, iCallRetriesLeft, lDelayBetweenRetries, sOnNotConnected, sOptionsXml, sEscalationCalls you should change the vg.Dialer_OutDialQueAdd "$RV_CIDnumber", sActivateTime, 0700, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "" to be: vg.Dialer_OutDialQueAdd "$RV_CIDnumber", sActivateTime, 0700, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "", "" ie. add a , "" to the end... Share this post Link to post
Guest henrik@abcgroup.dk Report post Posted 05/10/2007 10:27 AM The format of the Dialer_OutDialQueAdd function is: object.Dialer_OutDialQueAdd sPhoneNumber, vActivateTime, lDayTimeStart, lDayTimeStop, sDaysCallAllowed, sLineSelection, iPriority, sAnnounceMessage, sScript, sAnswerMachineMsg, sRV, lAnswerTimeout, iCallRetriesLeft, lDelayBetweenRetries, sOnNotConnected, sOptionsXml, sEscalationCalls you should change the vg.Dialer_OutDialQueAdd "$RV_CIDnumber", sActivateTime, 0700, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "" to be: vg.Dialer_OutDialQueAdd "$RV_CIDnumber", sActivateTime, 0700, 2200, "MoTuWeThFrSaSu", "1,2", 1, "none", "d:\basis\basis_0.5.1_DK.vgs", "retry", "none", 45, 2, 15, "", "", "" ie. add a , "" to the end... Thank you for your help, but it continues to deliver the same error: "the types do not correspond" (translation from Danish) in the vg.Dialer_OutDialQueAdd line. For this reason I went "back to basics" in my script and have attached a test version, which I can't get to work either. Would you happen to find the error as it keeps giving the error and not entering anything into the outdialque.mdb I thank you in advance. /Henrik outdialqueadd.zip Share this post Link to post
SupportTeam Report post Posted 05/10/2007 10:22 PM Can you try specifying the telephone number explicitly to start off with, rather then using $RV_CIDnumber. $RV_CIDnumber should be $RV_CIDNUMBER. If you still have problems please post a copy of VoiceGuide's Trace Logs which captures the problem, this will allow us to see what happened. Enable logging by setting the log levels to 10 in VG.INI as per below: [Log] VoiceGuide=10 Then restart VG and make a test call which demonstrates the problem. Trace files will be created in VG's \log\ subdirectory. Please post the traces and the VoiceGuide script used. When posting traces/scripts please .ZIP them up and post them as attachments. Share this post Link to post