I am building a very simple vxml app that uses the <data> tag to go out and call a web service and speak back the account info . The web service does not return a fully structured XML but rather a single string with a pound sign (#) to delimit the different accounts and a comma to delimit the fields in the account. I use the <script> tag to execute some JavaScript that basically pulls apart the single string using the delimiters and assign them to vxml vars. The problem I am having is that while the JS is doing everything right, it can take up to 15 seconds to parse through the string, sometimes even longer and confused the caller thinking something is wrong! When I execute the code using a browser, it comes back super quick and I even tried the code with another IVR platform and it too comes back real quick and with much less GHz speed on the hardware side.
What could be going wrong here? Should I avoid JS?
I'll do my best to describe the code here without listing the entire app.
This is what a return string looks like from the web service:
<string>0,999999991,,,0,0,0#1,000023336,,,0,1300,1300#2,000005365,,06/01/2008,0,241.61,129.38#3,05K678321,,06/01/2008,0,250.37,167.28#4,392840464,,,0,0,4632.5#5,000000000,,,0,0,-263.59</string>
<!-- Globals -->
<var name="gc_accounts_string" expr=""/>
<var name="each_account" expr=""/>
<!-- Get Account String Web Service -->
...
<data name="domXMlData" src="http://mywebserver.com/ivr.asmx/GetAccountsString" namelist="sToken sSSN Sep1 Sep2" method="post" />
<block>
<assign name="gc_accounts_string" expr="domXMlData.documentElement.firstChild.toString()"/>
</block>
### The JS call below, separates out the account by using the # delimiter
<block cond="segment_account_info()">
....
</block>
<block cond="account_index < gc_account_count" name="play_accounts">
### The JS call below, separates out the fields in the account by using the , delimiter. In this case, I use an index counter in a loop to load the field values in vars to play back
<if cond="get_account_info(account_index)">
### In between I play back the values returned in the JS below.
</if>
</block>
### I use the JS SPLIT method to separate out the accounts and fields in the accounts.
<script>
function segment_account_info() {
var the_accounts = gc_accounts_string;
each_account = the_accounts.split("#");
return true;
}
function get_account_info(i) {
var elements = each_account.split(",");
record = elements[0];
loanid = elements[1].substr(6,3);
lastpaymentdate = elements[2];
nextpaymentdate = elements[3];
lastpayment = elements[4];
nextpayment = elements[5].split(".");
dollarsdue = nextpayment[0];
centsdue = nextpayment[1];
balance = elements[6].split(".");
dollarsbalance = balance[0];
centsbalance = balance[1];
return true;
}
</script>
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
JavaScript Speed issues
IVR issue with javascript may be TTS related
Hi Mike,
We believe that this IVR issue is TTS related. We're currently looking into this IVR issue and we'll let you know once we find a resolution.
Regards,
Plum Support
We believe that this IVR issue is TTS related. We're currently looking into this IVR issue and we'll let you know once we find a resolution.
Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 10:54 am, edited 2 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
-
- Posts: 3
- Joined: Tue Mar 25, 2008 9:29 am
IVR issue with javascript was due to TTS engine
Hi Mike,
The IVR support team has just let us know that they believe that have resolved the IVR issue with the TTS engine. Please try calling in again to test your IVR application to see if the speed has improved.
Regards,
Plum Support
The IVR support team has just let us know that they believe that have resolved the IVR issue with the TTS engine. Please try calling in again to test your IVR application to see if the speed has improved.
Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 10:54 am, edited 3 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
-
- Posts: 3
- Joined: Tue Mar 25, 2008 9:29 am
IVR support team fix TTS speed being read back
Hi,
Yes, the support team has made this TTS update to your IVR system. Please send an e-mail to support@plumvoice.com with your customer ID in the subject line if you are still having IVR issues with the TTS speed being read back.
Regards,
Plum Support
Yes, the support team has made this TTS update to your IVR system. Please send an e-mail to support@plumvoice.com with your customer ID in the subject line if you are still having IVR issues with the TTS speed being read back.
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com