leeparvin Report post Posted 06/10/2014 12:00 PM Hi there I have a ISDN system setup (D/600 JCT) and all is working well. When an inbound call arrives, the call is answered immediately. Is it possible to have system ring say 4 times, and then hangup (without actually answering the call). Ive seen scripts like.... ---- set vg = CreateObject("VoiceGuide.CommandLink") iRingCount = 0iWaitCount = 0sReturnValue = "Fail" do while (iWaitCount < 30) iRingCount = vg.RvGet($RV_LINEID, "RV_RINGCOUNT") if iRingCount >= 4 then sReturnValue = "Success" Exit Do end if WScript.Sleep(1000) iWaitCount = iWaitCount + 1loop vg.Run_ResultReturn $RV_LINEID, sReturnValue set vg = Nothing ---- But I cant seem to get it to work. All I want from the call is the CallerID, Date/Time etc, and because the call is not answered, its cheaper!!!! Thanks Lee Share this post Link to post
SupportTeam Report post Posted 06/10/2014 08:52 PM The VBScript abouve uses WScript object. To use WScript object you will need to have the scritps in the "Run VBScript " type models executed using the Windows Scritping Host (WSH). Setting in VG.INI: [moduleRunScript] Engine=WScript should switch system back to using the WScript way of running the VBS scripts, which will allow you to use the Wscript objects in the VBScripts. Also,there is no "Ringcount" on ISN systems. Do all tht you need to do is to wait for 15 seconds or so. Like this: set vg = CreateObject("VoiceGuide.CommandLink") WScript.Sleep(15000) vg.Run_ResultReturn $RV_LINEID, "Fail" set vg = Nothing Note that you need to set the "Start script without answering the call" option in the Script Options. If you have problems when Engine=WScript is set then please post trace capturing that call Share this post Link to post
leeparvin Report post Posted 06/16/2014 02:04 PM Hi there Many thanks for your reply. Ive performed the task ie Vg.ini ====== [moduleRunScript] Engine=WScript and amended script to :- set vg = CreateObject("vgServices.CommandLink") WScript.Sleep(5000) vg.Run_ResultReturn 2, "Fail" set vg = Nothing I still can not get it to work. Ive also tried.... ... set vg = CreateObject("VoiceGuide.CommandLink") ... Looking through the log, it seems to keep looping waiting from a response from Run_ResultReturn, which is never called!! Please find attached the log file Do you have any suggestions??? Many thanks Lee 0616_1445_vgEngine.zip Share this post Link to post
SupportTeam Report post Posted 06/16/2014 02:33 PM Is there any anti-virus etc. software installed on this system that may be preventing the running of VBScripts when using the WScript/CScript intepreter? Share this post Link to post
leeparvin Report post Posted 06/16/2014 02:39 PM Hi there No. The OS is Windows 7 with Windows Firewall = Turned Off. No other security software is runnng the PC Thanks Lee Share this post Link to post
SupportTeam Report post Posted 06/16/2014 02:57 PM What about if you run simpler VBScript, eg: Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)tsFile.WriteLine "$RV_STARTTIME"tsFile.Closeset tsFile = Nothingset fso = Nothing or: set vg = CreateObject("vgServices.CommandLink")vg.Run_ResultReturn $RV_LINEID, "Fail"set vg = Nothing Do these simple scripts work on your system? Share this post Link to post
leeparvin Report post Posted 06/16/2014 03:42 PM Hi there I tried... Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)tsFile.WriteLine "$RV_STARTTIME"tsFile.Closeset tsFile = Nothingset fso = Nothing It did not work. When I check the VoiceGuide IVR Service, the LogOn is set to Local System Account. Could this be the problem?? Thanks Lee Share this post Link to post
leeparvin Report post Posted 06/16/2014 04:12 PM Hi there Ive just realised that the ISDN card was down. Rebooted the PC and the above sample script worked fine ie Const ForReading = 1Const ForWriting = 2Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)tsFile.WriteLine "$RV_STARTTIME"tsFile.Closeset tsFile = Nothingset fso = Nothing The file was created correctly. Therefore, the error must lie with the WScript call???? as :- set vg = CreateObject("vgServices.CommandLink") WScript.Sleep(5000) vg.Run_ResultReturn 2, "Fail" set vg = Nothing still does not work!!! Thanks Lee Share this post Link to post
leeparvin Report post Posted 06/16/2014 04:30 PM Hi there Please see the attached file. When I run this, the line just rings for say 30 seconds, as if it just times out. Thanks Lee BJPHS1.vgs Share this post Link to post
SupportTeam Report post Posted 06/17/2014 03:35 AM Maybe problem is with CreateObject("vgServices.CommandLink") call? Can you please try using this in the VBSCript module and check on what is logged in C:\LogCalls.txt This should let you confirm what line is causing the problem. Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 1" set vg = CreateObject("vgServices.CommandLink")tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 2" vg.Admin_TraceLogAdd 0, 0, "*************** Testing vgEngine log entry from VB Script" tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 3" vg.Run_ResultReturn $RV_LINEID, "Fail"tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 4" set vg = Nothing tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 5"tsFile.Closeset tsFile = Nothingset fso = Nothing Share this post Link to post
leeparvin Report post Posted 06/17/2014 08:28 AM Hi there I ran the script, and the log file only had.... 091634 1 As you suspect, the problem is something todo with :- set vg = CreateObject("vgServices.CommandLink") Please note, [moduleRunScript] Engine=WScript was still in place. I then set :- [moduleRunScript] ;Engine=WScript - (commented out) This time the log file added 092241 1 ie failed again at the same place as above. However,..... when ran with Engine=WScript, the call keeps ringing until Timeout, where as with ;Engine=WScript (commented out), the call does not ring and produces a 'dead tone' Should I try the lastest version of VoiceGuide? Thanks Lee Share this post Link to post
SupportTeam Report post Posted 06/17/2014 09:51 AM Looks like for some reason something is stopping the creation of the object. Usually this is because of an Anti-Virus type software, or because the software was not installed by a user with Administrator privildeges or "As Administrator". Can you please try uninstalling VoiceGuide and instaling it again, this time making sure the install program is ran "As Administrator". After installing VoiceGuide again and starting the VoiceGuide service, can you place the previously supplied script in a .VBS file and running that VBS file by double clicking it, and see wht are the results of that test. Share this post Link to post
leeparvin Report post Posted 06/17/2014 02:02 PM Hi there I reinstalled VoiceGuide using Run As Admin. Still it did not work!!! I then ran the vbs script, which produced 2 errors. Error 1 = Invalid Character vg.Run_ResultReturn $RV_LINEID, "Fail" to vg.Run_ResultReturn "$RV_LINEID", "Fail" This fixed this error. Error 2 = ActiveX Object cant create object "vgServices.CommandLink" Erro No : 800A01AD Any ideas??? Thanks Lee Share this post Link to post
SupportTeam Report post Posted 06/17/2014 02:23 PM Was VoiceGuide service runing at the time when you tried runing the .VBS file? Which version of Windows 7 are you using? Is it "Professional" or some other version? Is there anything else installed on this system apart from Windows + Dialogic drivers + VoiceGuide ? Share this post Link to post
leeparvin Report post Posted 06/17/2014 02:57 PM Hi there Yes VoiceGuide is running when the test was performed. Windows 7 Pro - 64bit Ive read some articles saying loading a 32bit DLL on a 64bit machine. Not sure if this is anything to do with though??? I also enabled hidden Administrator account, Uninstalled VoiceGuide and resinstalled under this ADministrator account. Again, runnging the script failed with "Cant create ActiveX Object" error. The only other on the PC is SQL Server and Adobe Reader Thanks Lee Share this post Link to post
leeparvin Report post Posted 06/17/2014 03:12 PM Hi there Please see :- http://stackoverflow.com/questions/2806584/how-do-i-run-a-vbscript-in-32-bit-mode-on-a-64-bit-machine After loading the 32bit cmd, the script ran upto Step 3 ie failed at vg.Run_ResultReturn "$RV_LINEID", "Fail" So its still failing, but at least it made progress to step 3!!! Thanks Lee Share this post Link to post
leeparvin Report post Posted 06/17/2014 03:35 PM Hi there Just to keep you updated..... Im wiping the PC ie restoring to base image (Win 7 Pro - 64bit) This should elimate any issues??? Thanks Lee Share this post Link to post
leeparvin Report post Posted 06/17/2014 04:25 PM Hi there Ive now performed :- 1. ReInstalled Windows 7 Pro - ie format disk etc 2. Activated Administrator account and logged in as Administrator 3. Installed Dialogic Card 4. Installed latest version 7.4.4 5. Amended vg.ini to Engine=WScript 6. Amended config.xml to E ISDN30 lines 7. Started Dialogic 8. started VoiceGuide 9. Run VB script The script still crashed - "ActiveX Object -cant create object" etc I can not see what else I can do????? Ive spent most of today working on this :-( Do I assume there is a bug in VoiceGuide? and I have to wait for an update? Please confirm. Thanks Lee Share this post Link to post
SupportTeam Report post Posted 06/18/2014 12:00 AM VoiceGuide is a 32 bit application. On 64 bit systems you will need to use the 32 bit version of cscript.exe / wscript.exe to run the .VBS file. The 32 bit versions of cscript.exe / wscript.exe are located in this directory: C:\Windows\SysWOW64\ So at command prompt please run this: "C:\Windows\SysWOW64\cscript.exe" "C:\Program Files (x86)\VoiceGuide\temp\myscript.vbs" Replacing C:\Program Files (x86)\VoiceGuide\temp\myscript.vbs with full path to your .vbs file. When calling a VBS file from command prompt all the $RVs will need to be replaced with actual values (as VoiceGuide no longer replaces these placeholders with values before running the VBScript). So the text that you use in our own .VBS file should be this: Const ForAppending = 8set fso = CreateObject("Scripting.FileSystemObject")set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)tsFile.WriteLine "100000 1" set vg = CreateObject("vgServices.CommandLink")tsFile.WriteLine "100000 2" vg.Admin_TraceLogAdd 0, 0, "*************** Testing vgEngine log entry from VB Script" tsFile.WriteLine "100000 3" vg.Run_ResultReturn 1, "Fail"tsFile.WriteLine "100000 4" set vg = Nothing tsFile.WriteLine "100000 5"tsFile.Closeset tsFile = Nothingset fso = Nothing Share this post Link to post
SupportTeam Report post Posted 06/18/2014 03:58 AM In VoiceGuide's RunVBScript module please try using this: Const ForAppending = 8 set fso = CreateObject("Scripting.FileSystemObject") set tsFile = fso.OpenTextFile("C:\LogRunVBS.txt", ForAppending, True) tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 1" On Error Resume Next Err.Clear set vg = CreateObject("vgServices.CommandLink") If Err.Number <> 0 Then tsFile.WriteLine "Error: " & Err.Number tsFile.WriteLine "Error (Hex): " & Hex(Err.Number) tsFile.WriteLine "Source: " & Err.Source tsFile.WriteLine "Description: " & Err.Description Err.Clear Else tsFile.WriteLine "NO Error!" End If On Error Goto 0 tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 2" vg.Admin_TraceLogAdd 0, 0, "*************** Testing vgEngine log entry from VB Script" tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 3" vg.Run_ResultReturn $RV_LINEID, "Fail" tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 4" set vg = Nothing tsFile.WriteLine "$RV_HH$RV_NN$RV_SS 5" tsFile.Close set tsFile = Nothing set fso = Nothing and advise contents of the C:\LogRunVBS.txt file Share this post Link to post
leeparvin Report post Posted 06/18/2014 10:20 AM Hi there IT FINALLY WORKED!!!!! Summing up... A fresh install of windows and a fresh install of VoiceGuide + Dialogic seemed to fix the original problem. Many thanks for all your patience and help. Very much appreciated. Thanks Lee Share this post Link to post
SupportTeam Report post Posted 06/18/2014 10:32 AM OK, thanks for letting us know that its working. Some Anti-Virus type software may not fully put back the changes it made when uninstalling - that is why if encountering issues with running VBScripts it is a good idea to just re-install Windows to ensure that is not a factor. Please let us know if you have any other questions in future! Share this post Link to post