AbsoluteControls Report post Posted 10/11/2004 01:06 PM Hi again I'm using VG ISDN Version 5.2.1142 When I use the OutDialQueAdd COM feature I get a type mismatch error. This is the line of code that is causing the problem. vg.Dialer_OutDialQueAdd sPhone, lActivate, 800, 2100, "", "", 1, "", "$RV[Directory]\Sites\S$RV[SiteID]\Person.vgs", "$RV[Directory]\Sites\S$RV[SiteID]\Machine.vgs", "[CallID] {55}", 60, 10, 30, "" I noticed that in the help file documentation for OutDialQueAdd, there is a required parameter for iPriority, but in the example given at the end of the help entry, that parameter is not used. I tried the above VB code without the iPriority parameter and I got an Argument Not Optional error. Share this post Link to post
SupportTeam Report post Posted 10/12/2004 11:29 AM What is the value of lActivate in your code? I assume this Dialer_OutDialQueAdd function is called from within a "Run VBScript" module? Share this post Link to post
AbsoluteControls Report post Posted 10/12/2004 11:42 AM The value of lActivate is 0. I am running this code from a Run VB module in VG. The caller has set up the parameters for a series of calls, which are saved to an access database. In the next step, the caller executes the whole series of calls. The VB code iterates thru the database, reads the parameters of each call and sends it to the Outdialer Que with Dialer_OutDialQueAdd function. Share this post Link to post
SupportTeam Report post Posted 10/15/2004 04:20 AM Please check if the below loads the number to be called with no problems: set vg = CreateObject("VoiceGuide.CommandLink") vg.Dialer_OutDialQueAdd "5551234", 0, 0, 0, "", "", 1, "C:\Program Files\VoiceGuide\Scripts\Credit Card Payment\PayUsingCard.wav", "C:\Program Files\VoiceGuide\Scripts\Credit Card Payment\Credit Card Payment.vgs", "C:\Program Files\VoiceGuide\Scripts\Credit Card Payment\Credit Card Payment.vgs", "", 0, 2, 5, "" set vg = Nothing The above worked fine on our "VoiceGuide for ISDN" test machine... Please try running the above VBScript on your machine and if above works OK I'd recommend changing the paramters above to your settings one by one and see at which stage it breaks - this may lead us closer to resolving the problem. Share this post Link to post
AbsoluteControls Report post Posted 10/17/2004 07:10 PM I think I solved this problem using your elimination idea - Here again is the line of code I wanted to use: vg.Dialer_OutDialQueAdd sPhone, lActivate, 800, 2100, "", "", 1, "", "$RV[Directory]\Sites\S$RV[siteID]\Person.vgs", "$RV[Directory]\Sites\S$RV[siteID]\Machine.vgs", "[CallID] {55}", 60, 10, 30, "" The example code you posted below worked fine. When I tried substituting the very first parameter from my code, I got the Type Mismatch error. The visual basic variable sPhone does contain a string, but for some reason, the Voice Guide function was not treating it like a string. Maybe it viewed it as a variant. Anyway, that was causing the error. I also had the same problem with the next parameter, lActivate, which the voice guide function would not view as a number. This also caused a Type Mismatch error, even though the variable contained the number 0. I couldn't figure out how to make voice guide view the variables themselves as a string and a number. So in the end I changed the code to read as follows: vg.Dialer_OutDialQueAdd Cstr(sPhone), Int(lActivate), 800, 2100, "", "", 1, "", "$RV[Directory]\Sites\S$RV[siteID]\Person.vgs", "$RV[Directory]\Sites\S$RV[siteID]\Machine.vgs", "[CallID] {55}", 60, 10, 30, "" The Cstr and Int functions seem to force the Voice Guide function to translate the contents of the variables as a string and a number. This solution apparently works fine, but I would be interested to know if there is a better way of doing this. Share this post Link to post
SupportTeam Report post Posted 10/17/2004 08:57 PM Using Cstr() and Int() functions within VBScript to force VBScript to treat a variable as a particular data type is the right way of doing it. Not too sure at this stage why VBScript was having problems calling the COM function before the variables were forced to a certain data type - more of a question for VBScript gurus.. Share this post Link to post