VoiceGuide IVR Software Main Page
Jump to content

Help With Result Variables Using Outdial_new.xml

Recommended Posts

I am having a problem with passing a variable to a vbscript when an outbound call goes unanswered. My outdial_new.xml files have the following format:

 

- <OutDialEntry>

<PhoneNumber>*82,(xxx) xxx-xxxx</PhoneNumber>

<DayTimeStart>1800</DayTimeStart>

<DayTimeStop>2030</DayTimeStop>

<DaysCallAllowed>MoTuWeThFrSaSu</DaysCallAllowed>

<LineSelection>dxxxB1C1</LineSelection>

<OnAnswer>C:\RemPlus\Human.vgs</OnAnswer>

<OnAnswerMachine>C:\RemPlus\Ans_Mach.vgs</OnAnswerMachine>

<CallRetries>2</CallRetries>

<RetryDelay>30</RetryDelay>

<RV>[RecordID]{20041004160439997151KATHRYN100404}[PatFirstName]{Austa}[Appt_Date]

Thursday, October 7}[Appt_Time]{2:00 PM}[Dr_LastName]{Collins}</RV>

<OnNotConnected>C:\RemPlus\No_Ans.vbs $RV[RecordID] $RV[OutDial_Result]</OnNotConnected>

</OutDialEntry>

 

My No_Ans.vbs script which is referenced in the OnNotConnected section updates a database on an MS SQL and that part works great. I now want to send an additional variable to update the database with the Date and Time that VG actually made the call. I was going to use the $RV_STARTTIME variable and add that to the end of the command line. Here is where I run into trouble. Since the format returned by $RV_STARTTIME includes spaces (i.e. 9/14/2004 10:00:44 AM) the vbscript ends up treating that as 3 separate command line parameters. My first thought was to just enclose the parameters in quotes. While that works great in a test vbscript, I now have problems trying to get that to work in the XML files that are generated from my MS Access database. My OnNotConnected field in my Access table now looks something like this: C:\RemPlus\No_Ans.vbs "$RV[RecordID]" "$RV[OutDial_Result]". Now if I try to export that table to XML it ends up creating a CDATA entry and then the file doesn't properly import into VG. So after my long winded description here is the real question. What is the best way to get that result variable in to my vbscript since I can't seem to have quotes in the XML file?

Share this post


Link to post

You can have quotes in your XML expression that the VG imports. If you have:

 

<OnNotConnected>C:\RemPlus\No_Ans.vbs $RV[RecordID] $RV[OutDial_Result] "$RV_STARTTIME"</OnNotConnected>

 

or

 

<OnNotConnected>C:\RemPlus\No_Ans.vbs $RV[RecordID] $RV[OutDial_Result] '$RV_STARTTIME'</OnNotConnected>

 

Then I think you should be fine...

 

Reading your post I think that you are saying that you are not able to find a way to generate the XML file from within your system... If that's the case then you may want to look into changing the way the XML is generated.

 

Otherwise you could also look into loading all data into a database and passing some sort of index into your VB Script which would then allow you to read data out of this database..

Share this post


Link to post

Putting a single quote around the '$RV_Starttime' variable does not work properly. I have tried that already. Having it look like this "$RV_Starttime" does work in testing. I get the data for the VG dialing from an MS Access database. One of the queries creates a table with all the info that is required in the OutDial_New.xml file. I then have Access export that to XML. If there are any quotes in any of the fields then that field gets exported as CDATA. I have read everything I can about the situation and I cannot seem to create the XML file successfully with any quotes in it anywhere. I have not needed the quotes till now since the other command line parameters we are passing to the vbscript from the OnNotConnected field don't have any spaces in them. We have successfully been generating and send XML to VG from Access for about 2 months with no problems but now we have been asked to include the date and time of the call which created this problem. I can do it fine from vbscripts that are run from inside a VGS but that is only part of the issue since I need to address situations when the OnNotConnected is used. What other way do you suggest that I can create an XML file? Also I did not understand your suggestion about loading all data into a database and passing and index. Can you elaborate?

Share this post


Link to post

How to generate an XML file from within Access is really outside the scope of this support forum - I'd recommend having a search through MS Access related web sites for advice on this one.

 

Another way if to have MS Access dump all data to a temporary text file and pass to VBScript the filename - which the VBScript can then read in...

Share this post


Link to post

I am not really asking for help with Access really. Access has been exporting out the table I create in it just fine to an XML file that VG accepts. The issue is that Access will not successfully export an XML if there are quotes in any of the fields. I need quotes around the $RV_Starttime variable since it has spaces in it. Lets forget that I am doing this in Access for a second. How would YOU generate an XML file of phone numbers and OnNotConnected fields that have result variables like the ones that I am asking for if the numbers were in some database somewhere? I think that is a simple request.

 

On the other side of things, why don't you allow us to run a VGS script when a number is not connected instead of limiting us to running an external command? If that was an option then I wouldn't have this problem. Anybody else want to chime in on this point?

Share this post


Link to post
How would YOU generate an XML file of phone numbers and OnNotConnected fields that have result variables like the ones that I am asking for if the numbers were in some database somewhere?

Probably using a VBScript function... I think you can run VBScript or "VB for Applications" from within MS Access...

 

why don't you allow us to run a VGS script when a number is not connected instead of limiting us to running an external command?

If a call is not connected then any VoiceGuide Script which would be run in such an event would be limited to using "Run Program", "Run VBScript" and "DB Query" modules - all of which can be done from a VBScript and for a majority of users it is more straightforward to be able to just call a command then having to call a new VoiceGuide Script from within which they then call a command...

Share this post


Link to post

Ok well I guess I will have to figure this one out for myself....

 

I am using VBA inside of Access to generate the XML from a table that has the data for the outdial_new. Again, it doesn't work right if the original data has quotes in it so I guess I am screwed for right now......

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
×