Page 1 of 1

Custom Error Voices

Posted: Fri Nov 17, 2006 7:23 pm
by brent.russell
I am trying to find a way to overide all default errors such as "Sorry I did not hear you" Or "Sorry, I just can't understand you" and I want to say my own thing with an audio tag. Basicaly I never want to hear anything but my prerecorded messages. I would also like to gather all possible options that could outcome as error message so I can record my own. Can you lead me to the proper area to find these?

Would I over ride error messages like so:
<form id="mainMenu">
<field name="confirmMenuChoice">
<grammar type="application/x-jsgf">1|2</grammar>
<property name="interdigittimeout" value="100ms" />
<prompt timeout="4s">
<audio src="http://mysite.com/saysomething.mp3" />
</prompt>
<filled>
<if cond="confirmMenuChoice==1">
<goto next="unsubscribe.vxml" maxage="0"/>
<elseif cond="confirmMenuChoice==2"/>
<goto next="leavemessage.vxml" maxage="0"/>
</if>
</filled>
<noinput>
<reprompt/>
</noinput>
<nomatch>
<audio src="http://mysite.com/tryagain.mp3" />
<reprompt/>
</nomatch>
</field>
</form>

Thank you for all you help

IVR code will override the default noinput and nomatch cases

Posted: Fri Nov 17, 2006 11:42 pm
by support
Hello,

The approach you are taking is correct. That IVR code will override the default <noinput> and <nomatch> cases. The other thing you may want to do is globally <catch> all IVR error messages and play a generic IVR error message for the caller. The default error message is: "A serious error of type {error_type} has occurred exiting."

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
	<catch event="error.*">
		<prompt bargein="false">
			<audio src="generalerror.wav">
				I'm sorry, this system is experiencing technical difficulties.  Please try your call again later.
			</audio>
		</prompt>
		<exit/>
	</catch>

	<form id="mainMenu">
		<field name="confirmMenuChoice">
			<grammar type="application/x-jsgf">1|2</grammar>
			<property name="interdigittimeout" value="100ms" />
			<prompt timeout="4s">
				<audio src="http://mysite.com/saysomething.mp3" />
			</prompt>
			<filled>
				<if cond="confirmMenuChoice==1">
					<goto next="unsubscribe.vxml" maxage="0"/>
				<elseif cond="confirmMenuChoice==2"/>
					<goto next="leavemessage.vxml" maxage="0"/>
				</if>
			</filled>
			<noinput>
				<reprompt/>
			</noinput>
			<nomatch>
				<audio src="http://mysite.com/tryagain.mp3" />
				<reprompt/>
			</nomatch>
		</field>
	</form>
</vxml>
Regards,
Plum Support

Posted: Fri Dec 01, 2006 5:50 pm
by brent.russell
I am getting an error saying

DocumentParser::FetchDocument - Parse error in file "http://site.com/root.vxml ", line 31, column 26 - The values for attribute 'event' must be names or name tokens

When I add this:
<catch event="error.*">
<prompt bargein="false">
<audio src="generalerror.wav">
</prompt>
<exit/>
</catch>

I looked at catch in the documentation and and it said:
The event or events to catch. A space-separated list of events may be specified, indicating that this <catch> element catches all the events named in the list. In such a case a separate event counter (see "count" attribute) is maintained for each event. If the attribute is unspecified, all events are to be caught.
I don't think this wild card is working properly. Can you please help me out?

can't use * as a wildcard in IVR application

Posted: Fri Dec 01, 2006 6:01 pm
by support
Hi,

You can't use * as a wildcard in IVR application. Just use <catch event="error" /> instead; it will catch all IVR error.* events for you.


Regards,

Plum Support

Posted: Tue Dec 12, 2006 2:18 pm
by brent.russell
The following script did not catch all errors: The scratchpad main_mener.vxml does not exsists so I tried the call and instead of saying "I'm sorry, this system is experiencing technical difficulties. Please try your call again later" it said "invalid scratchpad"

Also is there a way to overide built in responses. I also need to override things like "Sorry, I did not understand you" after a user enters 4 digits when only 3 is required.

Thank you a lot for your help. This would be a project in the gutter without your help.

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
   <catch event="error">
      <prompt bargein="false">
 I'm sorry, this system is experiencing technical difficulties.  Please try your call again later.
      </prompt>
      <exit/>
   </catch>

	<property name="inputmodes" value="dtmf"/>
	<!-- Declare Variables -->
	<var name="GVphone" expr="'123'"/>
	<var name="document.phone_number" expr="'1234567891'"/>
	<var name="document.tempPhoneNumber" expr="'1234567891'"/>
	<!-- Prompt Caller ID information -->

	<form id="getNumber">
		<property name="termmaxdigits" value="true"/> 
		<field name="enterNumber" type="digits?length=10">
			<prompt>Please enter your 10 digit phone number on your numeric keypad</prompt>
			<filled>
				<assign name="document.tempPhoneNumber" expr="enterNumber"/>
				<goto next="#confirmMobileNumber"/>
			</filled>
			<noinput>
				<reprompt/>
			</noinput>
		</field>
	</form>
	<!-- Confirm that thier entered number is correct -->
	<form id="confirmMobileNumber">
		<field name="confirmNumberChoice" type="digits?length=1">
			<grammar type="application/x-jsgf">1|2</grammar>
			<property name="interdigittimeout" value="4s"/>
			<prompt timeout="6s">You entered <say-as type="acronym">
					<value expr="document.tempPhoneNumber"/>
				</say-as>. If this phone number is correct, press one, if not press two.</prompt>
			<filled>
				<if cond="confirmNumberChoice==1">
					<assign name="document.phone_number" expr="document.tempPhoneNumber"/>
					
					<assign name="application.GVphone" expr="document.tempPhoneNumber"/>
					
					<goto next="main_mener.vxml" maxage="0"/>
					<elseif cond="confirmNumberChoice==2"/>
					<goto next="#getNumber"/>
				</if>
			</filled>
			<noinput>
				<reprompt/>
			</noinput>
			<nomatch>
      Sorry, that was not one of the choices.
      <reprompt/>
			</nomatch>
		</field>
	</form>
</vxml>

put absolute URL for the main_mener.vxml page so IVR platfor

Posted: Tue Dec 12, 2006 2:55 pm
by support
In addition to the "error" event handler, you can add a noinput and nomatch handler as well at the top of your vxml document.

As far as your reference to "main_mener.vxml" is concerned -- if your IVR code below is a scratchpad script, it'll be looking for main_mener.vxml relative to the scratchpad location. That won't work -- instead you should put the absolute URL for the main_mener.vxml page so that the IVR platform can load it from your web server.

Posted: Tue Dec 12, 2006 3:35 pm
by brent.russell
As far as your reference to "main_mener.vxml" is concerned -- if your code below is a scratchpad script, it'll be looking for main_mener.vxml relative to the scratchpad location. That won't work -- instead you should put the absolute URL for the main_mener.vxml page so that the platform can load it from your web server.
I don't think you understood my question let me reword it a little better.
I am trying to override what the system said. I know the file can't be found.... I just don't want it to say "Scratchpad not found" I want it to say something like "I'm sorry, this system is experiencing difficulties, please try again later". The <catch event="error"> is not catching this.

Is this possible?

Thank you again for your help[/code]

IVR code issue with relative reference

Posted: Tue Dec 12, 2006 3:57 pm
by support
There's no way to override the "scratchpad not found" message because it's a valid response from the IVR server that doles out the scratchpad scripts but can not find the one you're asking for. In other words, your <goto next="main_mener.vxml" maxage="0"/> is successful -- but it's going to a scratchpad server that can't find the reference and produces, instead, a stub page with a prompt that says the scratchpad you're asking for doesn't exist.

To prevent that message from coming up, you need to make sure your off-page references are clean in the first place -- which is why I suggested you use an absolute reference for your next IVR attribute rather than the relative reference to "main_mener.vxml"

Posted: Wed Dec 13, 2006 4:43 pm
by brent.russell
What about when a user does not respond to a prompt and it says
"I did not understand you"<reprompt/>
"I still don't understand"<reprompt/>
"I'm Sorry, I just can't understand you"<reprompt/>

Can I override those with my own Audio tag. I think that is the only other thing I would like to override..

Thanks again for all your help

specify three noinput handlers into your IVR code

Posted: Thu Dec 14, 2006 10:13 am
by support
Yes, you can put <audio> tags inside of a <noinput> handler. For the IVR case you describe below, you could specify three noinput handlers into your IVR code like this:

Code: Select all

<noinput count="1">
  <prompt>
    <audio src="noinput_1.wav">I did not understand you</audio>
  </prompt>
  <reprompt/>
</noinput>
<noinput count="2">
  <prompt>
    <audio src="noinput_2.wav">I still don't understand</audio>
  </prompt>
  <reprompt/>
</noinput>
<noinput count="3">
  <prompt>
    <audio src="noinput_3.wav">I'm Sorry, I just can't understand you</audio>
  </prompt>
  <reprompt/>
</noinput>