VoiceGuide IVR Software Main Page
Jump to content

Isdn - Ringcount

Recommended Posts

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 = 0
iWaitCount = 0
sReturnValue = "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 + 1

loop

 

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

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

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

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

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

What about if you run simpler VBScript, eg:

 

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
set fso = CreateObject("Scripting.FileSystemObject")
set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)
tsFile.WriteLine "$RV_STARTTIME"
tsFile.Close
set tsFile = Nothing
set 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

Hi there

 

I tried...

 

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
set fso = CreateObject("Scripting.FileSystemObject")
set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)
tsFile.WriteLine "$RV_STARTTIME"
tsFile.Close
set tsFile = Nothing
set 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

Hi there

 

Ive just realised that the ISDN card was down. Rebooted the PC and the above sample script worked fine ie

 

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
set fso = CreateObject("Scripting.FileSystemObject")
set tsFile = fso.OpenTextFile("C:\LogCalls.txt", ForAppending, True)
tsFile.WriteLine "$RV_STARTTIME"
tsFile.Close
set tsFile = Nothing
set 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

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

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 = 8
set 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.Close
set tsFile = Nothing
set fso = Nothing

Share this post


Link to post

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

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

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

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

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

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

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

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 = 8
set 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.Close
set tsFile = Nothing
set fso = Nothing

Share this post


Link to post

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

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. :D

 

Thanks

 

Lee

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×