VoiceGuide IVR Software Main Page
Jump to content

Cannot Access Cdr Billsec Variable

Recommended Posts

I need assistance in troubleshooting the $RV[CDR_billsec] variable to record call length from pick up to hang up. I have look through the forums and tried several different methods, but have had no luck. Eventually we are going to use the $RV[CDR_billsec] variable in a VBS insert into our accounting for billing purposes. Currently the system uses $RV_CALLLENGTH, but we are changing processes to utilize $RV[CDR_billsec]. One of our call servers uses V6 and one V7. The variable appears successfully in the cdrout table but due to size and process, we have a separate table for billing purposes and need a way to extract billsec upon call completion.

Share this post


Link to post

Please update your systems to this version of VoiceGuide v7 :

 

[old link removed]

 

This version will allow you to use:

 

$RV_CDR_billsec

 

The value of this RV will correspond to the value of billable seconds entry in CDR log.

Share this post


Link to post

I am running V7 and have tried the method above, still no luck.

 

What is our next step?

Share this post


Link to post
Here is the VBScript I am running to try and output the variable as instructed:


Const ForReading = 1

Const ForWriting = 2

Const ForAppending = 8

set fso = CreateObject("Scripting.FileSystemObject")

set tsFile = fso.OpenTextFile("FileDirectory\Log.txt", ForAppending, True)

tsFile.WriteLine "$RV_CDR_billsec, $RV_CALLLENGTH, $RV_STARTTIME, $RV_CIDNUMBER, $RV[officephone]"

tsFile.Close

set tsFile = Nothing

set fso = Nothing



All other variables are outputting correctly except the billsec.

Share this post


Link to post

Please post vgEngine trace capturing the call. We can see what happened during the call.

 

When posting traces please .ZIP them up an post them as attachments.

Share this post


Link to post

Can you instruct on how to go about doing this?

I have seen it talked about in the forum but no where in documentation or forum have I seen how to go about complete.

Share this post


Link to post

Trace logs are by default automatically created in VoiceGuide's /log/ subdirectory.

 

Please see the vgEngine trace log for the day when you ran the $RV_CDR_billsec test and either .ZIP up an post the entire vgEngine trace file, or just .ZIP up the relevant call extract.

Share this post


Link to post

Trace shows that system is still running a very old version of VoiceGuide v7. System was not updated to latest version provided in previous post.

 

To upgrade existing VoiceGuide v7 system to new version of VoiceGuide v7 provided:

 

1. Stop VoiceGuide Service and exit all VoiceGuide programs. (eg Script Designer, Voicemail Manager, etc) and all other programs.

2. Run new version VoiceGuide install and install into same directory as existing installation. (Do NOT uninstall the previous VoiceGuide installation).

3. Start VoiceGuide service.

 

Running a VoiceGuide install over the top of an existing install will not overwrite existing configuration or license files (Config.xml, ConfigLine.xml, VG.INI, VmBoxList.xml, userinfo.lic) and will not remove any sound files, and will not remove any log files.

Please note however that the local SQLite outdial database will be re-initialized. If you are using the local SQLite outdial database and have any queued outgoing calls that you would like to keep then this database should be backed up first.

 

Looking at timestamps at beginning of vgEngine logs created after VoiceGuide service restart will let you confirm that the new version of VoiceGuide v7 is running.

Share this post


Link to post

After upgrading the VoiceGuide application to the most recent V7, I am still unable to utilize the $RV_CDR_billsec variable.

Currently I am trying to output to a text file via a VBScript before inserting into a database for billing purposes.

 

I have tried both the $RV_CDR_billsec recommended above and the $RV[CDR_billsec] noted in the documentation.

 

You can find the output to Log.txt in C:\Users\trehm\Desktop\outcomeHuman .vgs called by c:\voiceguide\Scripts\human19844.vgs.

 

Please see the attached vgEngine snip for diagnosis.

 

Thank you for your help!

vgEnginSnip.txt.txt

Share this post


Link to post

System is running v7.4.5268.24964 from 2014-06-04 (4th June 2014).

 

Please use the link posted previously to download the right version.

 

Then please follow the update instructions posted before.

 

Please ensure that the VoiceGuide service is fully stopped (you may need to use the Task manager to confirm this) before starting the install of the new version.

Share this post


Link to post

I have updated VoiceGuide to the version specified.

When outputting $RV_CDR_billsec, it corresponds to the Duration column in the cdrout table, not the billsec value.

I need the billsec value that is recorded in the cdrout table for the call, not the duration (time from user pickup to hang up, not total time).

 

Please let me know what I can do to resolve this,

Thank you,

Tyler

Share this post


Link to post

Can you please post the vgEngine trace capturing the whole call. We can then see what is happening on the system.

 

Please .ZIP traces before posting them.

Share this post


Link to post

Looks like there was a bug when calculating $RV_CDR_billsec on outbound ISDN calls.

 

Please update your systems to this version of VoiceGuide v7 :

 

[old link removed]

 

and run test again. If you still encounter any issues then please post the vgEngine trace capturing the whole call as before. We can then see what is happening on the system.

 

Please .ZIP traces before posting them.

Share this post


Link to post

Ever since we upgrade to this new version, we keep getting application failures between 3:00 and 6:00 pm EST, our peak call hours.

After reviewing the Windows Event Viewer, it looks like vgIvrService.exe is faulting as the .Net Runtime is failing due to a System. AccessViolationException.

 

I have copied the Event Log error and attached the vgEngineSnip leading up to the event.

 

Log Name: Application
Source: .NET Runtime
Date: 11/21/2014 3:43:49 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: f
Description:
Application: vgIvrService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at Microsoft.ClearScript.Windows.IActiveScriptParse32.ParseScriptText(System.String, System.String, System.Object, System.String, UInt32, UInt32, Microsoft.ClearScript.Windows.ScriptTextFlags, IntPtr, System.Runtime.InteropServices.ComTypes.EXCEPINFO ByRef)
at Microsoft.ClearScript.Windows.ActiveScriptWrapper32.ParseScriptText(System.String, System.String, System.Object, System.String, UIntPtr, UInt32, Microsoft.ClearScript.Windows.ScriptTextFlags, IntPtr, System.Runtime.InteropServices.ComTypes.EXCEPINFO ByRef)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.Parse(System.String, System.String, Microsoft.ClearScript.Windows.ScriptTextFlags, IntPtr, System.Runtime.InteropServices.ComTypes.EXCEPINFO ByRef, Boolean)
at Microsoft.ClearScript.Windows.WindowsScriptEngine+<>c__DisplayClass11.<Execute>b__10()
at Microsoft.ClearScript.Windows.WindowsScriptEngine+<>c__DisplayClass14.<ScriptInvoke>b__13()
at Microsoft.ClearScript.ScriptEngine.ScriptInvoke(System.Action)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.ScriptInvoke(System.Action)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.Execute(System.String, System.String, Boolean, Boolean)
at DynamicClass.(System.Object, System.String)
at ..(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Event Xml:
<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='.NET Runtime'/><EventID Qualifiers='0'>1026</EventID><Level>2</Level><Task>0</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime='2014-11-21T20:43:49.000000000Z'/><EventRecordID>33653</EventRecordID><Channel>Application</Channel><Computer>f</Computer><Security/></System><EventData><Data>Application: vgIvrService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at Microsoft.ClearScript.Windows.IActiveScriptParse32.ParseScriptText(System.String, System.String, System.Object, System.String, UInt32, UInt32, Microsoft.ClearScript.Windows.ScriptTextFlags, IntPtr, System.Runtime.InteropServices.ComTypes.EXCEPINFO ByRef)
at Microsoft.ClearScript.Windows.ActiveScriptWrapper32.ParseScriptText(System.String, System.String, System.Object, System.String, UIntPtr, UInt32, Microsoft.ClearScript.Windows.ScriptTextFlags, IntPtr, System.Runtime.InteropServices.ComTypes.EXCEPINFO ByRef)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.Parse(System.String, System.String, Microsoft.ClearScript.Windows.ScriptTextFlags, IntPtr, System.Runtime.InteropServices.ComTypes.EXCEPINFO ByRef, Boolean)
at Microsoft.ClearScript.Windows.WindowsScriptEngine+<>c__DisplayClass11.<Execute>b__10()
at Microsoft.ClearScript.Windows.WindowsScriptEngine+<>c__DisplayClass14.<ScriptInvoke>b__13()
at Microsoft.ClearScript.ScriptEngine.ScriptInvoke(System.Action)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.ScriptInvoke(System.Action)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.Execute(System.String, System.String, Boolean, Boolean)
at DynamicClass.(System.Object, System.String)
at ..(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
</Data></EventData></Event>

vgEngineSnip11212014.txt

Share this post


Link to post

Looks like an issue occurs in a "Run VBScript" type module.

 

VoiceGuide v7.4.4 by default uses a different method of running VBScripts (Microsoft's ClearScript engine) - which is much faster - but looks like in this case the ClearScript engine sometimes has problems running your VBScripts.

 

We'll look into what is causing this problem, but for immediate workaround there are 2 options:

 

You can set the software to use the the previous method or Running VBScripts by adding an entry to VG.INI file (more on this below), but in your case we'd recommend moving replacing the 'Run VBScript' type module with a 'Database Query' type module.

 

The vgEngine traces posted show that right now the 'Run VBScript' modules are used to execute simple SQL queries:

Set rs = CreateObject("ADODB.Recordset")
rsConn = "Driver={MySQL ODBC 5.1 Driver};Server=;Database=;Uid=;Pwd=;"
rs.ActiveConnection = rsConn

strSQL = "UPDATE campaigns_attempts SET responseString = 'Machine', responseStamp = '$RV_MM-$RV_DD-$RV_YY $RV_HH:$RV_NN' WHERE accountid = '$RV[accountid]' AND callid = '$RV[callid]'"
rs.Open strSQL
Wscript.Quit

or

Set rs = CreateObject("ADODB.Recordset")
rsConn = "Driver={MySQL ODBC 5.1 Driver};Server=;Database=;Uid=;Pwd=;"
rs.ActiveConnection = rsConn

strSQLI = "INSERT DELAYED INTO systemcounts (callid, month, day, year, hour, minute, calllength, accountid) VALUES ('$RV[callid]', '$RV_MM', '$RV_DD', '$RV_YY', '$RV_HH', '$RV_NN', '$RV_CALLLENGTH', '$RV[accountid]')"
rs.Open strSQLI

These SQLs can be sent from a 'Database Query' module - and the 'Database Query' type modules would perform these UPDATES and INSERTS much quicker.

 

 

If you would like to continue using the "Run VBScript" type modules to do the database UPDATES and INSERTS, then to have system use the old Wscript/CScript way of running the VBScript snippets please set this in VG.INI file, in section [moduleRunScript]

 

Engine=WScript

 

and then restart the VoiceGuide service to read in the new VG.INI values.

Share this post


Link to post

Any update on what is causing the problem?

 

I am going to add the 'Engine=WScript' tonight as transitioning to Database Query modules would require a major system overhaul that is currently unfeasible.

 

Please let me know,

Thanks again!

Share this post


Link to post

When this issue was looked at it was noted that a new version of Microsoft's ClearScript engine was made available about a month ago.

VoiceGuide was updated to use this new version and we were unable to reproduce the problem when using this new version.

New version of VoiceGuide that has the newest ClearScript engine incorporated into the 'Run VBscript' module can be downloaded here:

[old link removed]

Please let us know if you still encounter issues on your system with this new version, and post traces as before

If you do still encounter issues then setting Engine=WScript in VG.INI will, as before, revert the 'Run VBscript' module to use the old way of running the scripts - as was used by the original version of VoiceGuide that you had on the system (2011 November release).

 

Also, can you please enable Windows Error Reporting to generate .hdmp and .mdmp (heapdump and minidump) files when errors occur? This way if error occurs you would be able to .ZIP up and post the .hdmp and .mdmp traces that better show where exactly the error in ClearScript occurred.

 

More information on enabling Windows Error Reporting can be found here:

http://msdn.microsof...1(v=vs.85).aspx

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
×