mbssupport Report post Posted 05/21/2009 06:29 AM This is the script I need to run ************* ************* Set MyConn = CreateObject("ADODB.Connection") set vg = CreateObject("vgServices.CommandLink") MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mediasol\MBS-Data-VG.mdb" 'sReturnValue1 = vg.RvGet_All(1) 'sreturnvalueA = $RV[ref] sReturnValueA = vg.RvGet(8,"$RV[ref]") sReturnValue = "$RV_CALLLENGTH" 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime, fldcallDuration, fldcallnumber, fldcallto, fldcallreference, Fldfield1, Fldfield2, Fldfield3, Fldfield4, Fldfield5, Fldfield6, Fldfield7, Fldfield8, Fldfield9, Fldfield10 ) VALUES ('" & $RV[ref] & "', "Voice", "No Answer", '" & #$RV_MM/$RV_DD/$RV_YY $RV_HH:$RV_NN:$RV_SS# & "', '" & $RV_CALLLENGTH & "', '" & $RV[callnum] & "', '$RV[user1]', '$RV[user1]', '$RV[user1]', '$RV[user2]', '$RV[user3]', '$RV[user4]', '$RV[user5]', '$RV[user6]', '$RV[user7]', '$RV[user8]', '$RV[user9]', '$RV[user10]'") 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime, fldcallDuration, fldcallnumber) VALUES ('" & $RV[ref] & "', "Voice", "No Answer", '" & #$RV_MM/$RV_DD/$RV_YY $RV_HH:$RV_NN:$RV_SS# & "', '" & $RV_CALLLENGTH & "', '" & $RV[callnum] '") 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime) VALUES (999, 'voice', 'No Answer', now)" 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime, fldcallDuration, fldcallnumber) VALUES ( $RV[ref] ', 'Voice', 'No Answer', now , $RV_CALLLENGTH , $RV[callnum] )" 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime) VALUES ( $RV[ref] , 'Voice', 'No Answer', now )" 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype) VALUES ("& sReturnValueA &", 'Voice')" MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime) VALUES ('" & $RV[ref] & "', "Voice", "No Answer", now)" MyConn.Close Dim Stuff, myFSO, WriteStuff, dateStamp Set myFSO = CreateObject("Scripting.FileSystemObject") Set WriteStuff = myFSO.OpenTextFile("C:\output.txt", 8, True) set vg = CreateObject("vgServices.CommandLink") WriteStuff.WriteLine("after create object vg") sReturnValue1 = vg.RvGet_All(1) WriteStuff.WriteLine("after get 1") sReturnValue2 = vg.RvGet_All(2) WriteStuff.WriteLine("after get 2") sReturnValue3 = vg.RvGet_All(3) WriteStuff.WriteLine("after get 3") sReturnValue4 = vg.RvGet_All(4) WriteStuff.WriteLine("after get 4") sReturnValue5 = vg.RvGet_All(5) WriteStuff.WriteLine("after get 5") sReturnValue6 = vg.RvGet_All(6) WriteStuff.WriteLine("after get 6") sReturnValue7 = vg.RvGet_All(7) WriteStuff.WriteLine("after get 7") sReturnValue8 = vg.RvGet_All(8) WriteStuff.WriteLine("after get 8") WriteStuff.WriteLine("LINE 1-----------------" & sReturnValue1) WriteStuff.WriteLine("LINE 2-----------------" & sReturnValue2) WriteStuff.WriteLine("LINE 3-----------------" & sReturnValue3) WriteStuff.WriteLine("LINE 4-----------------" & sReturnValue4) WriteStuff.WriteLine("LINE 5-----------------" & sReturnValue5) WriteStuff.WriteLine("LINE 6-----------------" & sReturnValue6) WriteStuff.WriteLine("LINE 7-----------------" & sReturnValue7) WriteStuff.WriteLine("LINE 8-----------------" & sReturnValue8) WriteStuff.Close SET WriteStuff = NOTHING SET myFSO = NOTHING Set vg = Nothing ******************* ******************* This simple script cannot even be called please assist set vg = CreateObject("vgServices.CommandLink") 'see what Result Varaibles are currently defined on current line sReturnValue = vg.RvGet_All(RV_LINEID) set vg = Nothing MsgBox sReturnValue ********* I need to save this info to a table [ref]{1039} [callnum]{18310755279677} [campaign] {fsd} [state]{} [postcode]{} [user1]{test} [user2]{} [user3]{} [user4]{} [user5]{} [user6]{} [user7]{} [user8]{} [user9]{} [user10]{} [pickupretry] {2} [intro] {C:\mediasol\soundfiles\comp001-body.wav} [body] {C:\mediasol\soundfiles\comp001-body.wav} [priv] {C:\mediasol\soundfiles\comp001-body.wav} [end] {C:\mediasol\soundfiles\comp001-body.wav} [amrec] {C:\mediasol\soundfiles\comp001-body.wav} I need help on this asap . Thanks Share this post Link to post
SupportTeam Report post Posted 05/21/2009 06:51 AM Have you checked what the VBScript looks like after the $RVs have been replaced? Look at the .vbs copy saved in VG's \temp\ subdirectory. You can just try running that script by double clicking on it and if there are any errors then the message box with error details should show up. Share this post Link to post
mbssupport Report post Posted 05/21/2009 08:14 AM I manage to make the script run on voiceguide I restarted only voiceguide :: I made some changes . I need to get the number , call lenght . Can you just give me a simple way to get it . I'm new with this kindly assist . [ref]{1039} [callnum]{18310755279677} Thanks ***** Set MyConn = CreateObject("ADODB.Connection") Dim db,rs Dim Mynumber Set db= createobject("adodb.connection") db.mode=adModeReadWrite db.Provider="microsoft.jet.oledb.4.0" db.open("C:\mediasol\MBS-Data-VG.mdb") Set rs=CreateObject("adodb.recordset") rs.open "SELECT max(fldresultref) as Ref from tblVoiceGuideResult ",db Mynumber = rs.Fields.Item(0) MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mediasol\MBS-Data-VG.mdb" 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime, fldcallDuration, fldcallnumber, fldcallto, fldcallreference, Fldfield1, Fldfield2, Fldfield3, Fldfield4, Fldfield5, Fldfield6, Fldfield7, Fldfield8, Fldfield9, Fldfield10 ) SELECT $RV[ref], "Voice", "No Answer", #$RV_MM/$RV_DD/$RV_YY $RV_HH:$RV_NN:$RV_SS#, $RV_CALLLENGTH, '$RV[callnum]', '$RV[user1]', '$RV[user1]', '$RV[user1]', '$RV[user2]', '$RV[user3]', '$RV[user4]', '$RV[user5]', '$RV[user6]', '$RV[user7]', '$RV[user8]', '$RV[user9]', '$RV[user10]'" MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime) VALUES (" & Mynumber & ", 'Voice', 'No Answer', Now)" MyConn.Close Dim Stuff, myFSO, WriteStuff, dateStamp Set myFSO = CreateObject("Scripting.FileSystemObject") Set WriteStuff = myFSO.OpenTextFile("C:\outputtext.txt", 8, True) set vg = CreateObject("vgServices.CommandLink") WriteStuff.WriteLine("after create object vg") sReturnValue1 = vg.RvGet_All(1) WriteStuff.WriteLine("after get 1") sReturnValue2 = vg.RvGet_All(2) WriteStuff.WriteLine("after get 2") sReturnValue3 = vg.RvGet_All(3) WriteStuff.WriteLine("after get 3") sReturnValue4 = vg.RvGet_All(4) WriteStuff.WriteLine("after get 4") sReturnValue5 = vg.RvGet_All(5) WriteStuff.WriteLine("after get 5") sReturnValue6 = vg.RvGet_All(6) WriteStuff.WriteLine("after get 6") sReturnValue7 = vg.RvGet_All(7) WriteStuff.WriteLine("after get 7") sReturnValue8 = vg.RvGet_All(8) WriteStuff.WriteLine("after get 8") WriteStuff.WriteLine("LINE 1-----------------" & sReturnValue1) WriteStuff.WriteLine("LINE 2-----------------" & sReturnValue2) WriteStuff.WriteLine("LINE 3-----------------" & sReturnValue3) WriteStuff.WriteLine("LINE 4-----------------" & sReturnValue4) WriteStuff.WriteLine("LINE 5-----------------" & sReturnValue5) WriteStuff.WriteLine("LINE 6-----------------" & sReturnValue6) WriteStuff.WriteLine("LINE 7-----------------" & sReturnValue7) WriteStuff.WriteLine("LINE 8-----------------" & sReturnValue8) WriteStuff.Close SET WriteStuff = NOTHING SET myFSO = NOTHING set vg = Nothing Share this post Link to post
SupportTeam Report post Posted 05/21/2009 08:17 AM Current call length is returned by $RV_CALLLENGTH (see http://www.voiceguide.com/vghelp/source/ht...tvariables.htm ) Not sure what you mean by "I need to get the number". Are you referring to the CallerID number? in this case use: $RV_CIDNUMBER Share this post Link to post
mbssupport Report post Posted 05/21/2009 08:29 AM I need to save these information : [ref]{1039} [callnum]{18310755279677} The referrence numner and the number dialed by voiceguide and also the call lenght . I placed $RV_CALLLENGTH it retunrs and error . Any sample you might want to share the link you gave does not return a page . Thanks for the assistance Share this post Link to post
SupportTeam Report post Posted 05/21/2009 10:27 AM I need to save these information : [ref]{1039} [callnum]{18310755279677} I assume that you want to save this information in a database, yes? Saving data to a database would be easiest to achieve using a Database Query module. Is there a reason why you want to use a VBScript module to do the insert? If you would rather use a VBScript instead and are encountering issues then we can assist with some insight into what the the cause of your problem but you would need to provide us with an example of a working script and the problem script (that differ only in addition of the $RV_CALLLENGTH) and the description of what error you are seeing, and we can then advise why the error is occurring. You can also use http://www.voiceguide.com/vghelp/source/ht...tracelogadd.htm to add tracing to your VBScripts. Also please provide the VoiceGuide trace capturing the call when the problem occurs. When posting traces/scripts please .ZIP them up and post them as attachments. We have also fixed the link in the previous post. Share this post Link to post
mbssupport Report post Posted 05/22/2009 12:39 AM I need to get this from viouceguide they are placed on RV field. [ref]{1039} [callnum]{1831414727880} [campaign] {fsd} [state]{} [postcode]{} [user1]{test 3} [user2]{} [user3]{} [user4]{} [user5]{} [user6]{} [user7]{} [user8]{} [user9]{} [user10]{} The script I got working is :: Set MyConn = CreateObject("ADODB.Connection") Dim db,rs Dim Mynumber,caller,call_lenght Dim callID,U1,u2,u3,u4,u5,u6,u7,u8,u9,u10 Set db= createobject("adodb.connection") db.mode=adModeReadWrite db.Provider="microsoft.jet.oledb.4.0" db.open("C:\mediasol\MBS-Data-VG.mdb") Set rs=CreateObject("adodb.recordset") rs.open "SELECT max(fldresultref) as Ref from tblVoiceGuideResult ",db Mynumber = rs.Fields.Item(0) caller = $RV_CIDNUMBER call_lenght = $RV_CALLLENGTH Callid=$RV[callnum] u1=$RV[user1] u2=$RV[user2] u3=$RV[user3] u4=$RV[user4] u5=$RV[user5] u6=$RV[user6] u7=$RV[user7] u8=$RV[user8] u9=$RV[user9] u10=$RV[user10] MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mediasol\MBS-Data-VG.mdb" MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime,fldcallnumber,fldcallDuration) VALUES (" & Mynumber & ", 'Voice', 'No Answer', Now," & caller & "," & call_lenght & ")" MyConn.Close I get no values from the voiceguide temp folder "vbs_5_LsFaxTx_TFX_FAXERROR_090522102852.vbs" Set MyConn = CreateObject("ADODB.Connection") Dim db,rs Dim Mynumber,caller,call_lenght Dim callID,U1,u2,u3,u4,u5,u6,u7,u8,u9,u10 Set db= createobject("adodb.connection") db.mode=adModeReadWrite db.Provider="microsoft.jet.oledb.4.0" db.open("C:\mediasol\MBS-Data-VG.mdb") Set rs=CreateObject("adodb.recordset") rs.open "SELECT max(fldresultref) as Ref from tblVoiceGuideResult ",db Mynumber = rs.Fields.Item(0) caller = 0756689181 call_lenght = 44 Callid= u1= u2= u3= u4= u5= u6= u7= u8= u9= u10= MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mediasol\MBS-Data-VG.mdb" 'MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime, fldcallDuration, fldcallnumber, fldcallto, fldcallreference, Fldfield1, Fldfield2, Fldfield3, Fldfield4, Fldfield5, Fldfield6, Fldfield7, Fldfield8, Fldfield9, Fldfield10 ) SELECT , "Voice", "No Answer", #05/22/09 10:28:52#, 44, '', '', '', '', '', '', '', '', '', '', '', '', ''" MyConn.Execute "INSERT INTO tblvoiceguideresultdetails (fldresultref, fldcalltype, fldcallresult, fldcalldatetime,fldcallnumber,fldcallDuration) VALUES (" & Mynumber & ", 'Voice', 'No Answer', Now," & caller & "," & call_lenght & ")" MyConn.Close I got the database to save some information .I just need the rest of the information from the RV filed saved. I might just need to know how to declare them correctly . Can you show me how callnum and campaign is declared and return a value I can do the rest from there. Thank you. Share this post Link to post
SupportTeam Report post Posted 05/22/2009 02:02 AM First you say that: The script I got working is :: after which you quote what looks like to be text of the original input script before the $RVs are replaced and the script is ran. But then you say: I get no values from the voiceguide temp folder "vbs_5_LsFaxTx_TFX_FAXERROR_090522102852.vbs" Which I take to mean that something is not working as you intend...? So which one is it. Is the quoted script working for you or not working for you? You really need to better explain what is the actual problem that you are encountering, and it'd be best if you can provide a simple example demonstrating the problem of what it is that is not working. Share this post Link to post
SupportTeam Report post Posted 05/22/2009 02:07 AM Also, when looking at the script after the $RV replacement it looks like many of the $RVs are undefined. The undefined $RVs are $RV[callnum] and $RV[user1] to $RV[user10]. As they are undefined they get replaced by an empty sting, which then results in a VBScript syntax error when the script is ran. In the VBScript you should use quotes around the $RVs, like this: Callid="$RV[callnum]" u1="$RV[user1]" u2="$RV[user2]" ... u10="$RV[user10]" Then at least you will not get syntax errors when the $RVs are undefined. Share this post Link to post
mbssupport Report post Posted 05/22/2009 04:51 AM I did what you said still they return as blanks. Am I declaring it incorrectly? Can you possibly just get me thru getting callnum or the campaign from the RV Field . ref]{1039} [callnum]{18310755279677} [campaign] Code :: Set MyConn = CreateObject("ADODB.Connection") Dim db,rs Dim Mynumber,caller,call_lenght Dim Callid,u1,u2 Set db= createobject("adodb.connection") db.mode=adModeReadWrite db.Provider="microsoft.jet.oledb.4.0" db.open("C:\mediasol\MBS-Data-VG.mdb") Set rs=CreateObject("adodb.recordset") rs.open "SELECT max(fldresultref) as Ref from tblVoiceGuideResult ",db Mynumber = rs.Fields.Item(0) caller = $RV_CIDNUMBER call_lenght = $RV_CALLLENGTH Callid="$RV[callnum]" u1="$RV[user1]" u2="$RV[user2]" OUtput from voiceguide temp:: Set MyConn = CreateObject("ADODB.Connection") Dim db,rs Dim Mynumber,caller,call_lenght Dim Callid,u1,u2 Set db= createobject("adodb.connection") db.mode=adModeReadWrite db.Provider="microsoft.jet.oledb.4.0" db.open("C:\mediasol\MBS-Data-VG.mdb") Set rs=CreateObject("adodb.recordset") rs.open "SELECT max(fldresultref) as Ref from tblVoiceGuideResult ",db Mynumber = rs.Fields.Item(0) caller = 0756689181 call_lenght = 44 Callid="" u1="" u2="" Thanks Share this post Link to post
SupportTeam Report post Posted 05/22/2009 05:44 AM If the RVs are not defined then they will be replaced by blanks in the VoiceGuide Scripts and VBScripts ran by VoiceGuide. Can you possibly just get me thru getting callnum or the campaign from the RV Field . What do you mean by "callnum"? The telephone number called by VoiceGuide? That can be obtained using $RV_CIDNUMBER on outgoing calls. From your previous posts it looks like you are already using it. If you want to have a "campaign name" type RV then you need to create tour own RV at the time the outbound call is loaded. Share this post Link to post