We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

How to write out the error message to the log

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

How to write out the error message to the log

Post by metroscript »

Good evening,

I have the following code in place:

Code: Select all

		<error>
			<if cond="initial_recording == undefined">
				<% if ( strFrom = "pause" ) then %>
					<log>process_record_start.xml - END (error during recording but after a PAUSE, no length, Go to process_combine_voxs.xml?next=disconnect )</log>
					<submit next="process_combine_voxs.xml?next=disconnect" method="post"/>
				<% else %>
					<log>process_record_start.xml - End (error during recording, no length, Go to process_record_hangup.xml?next=zerolength )</log>
					<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
				<% end if %>
			<elseif cond="initial_recording$.size < 24000 || initial_recording$.size == ''"/>
				<% if ( strFrom = "pause" ) then %>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_combine_voxs.xml?next=disconnect )</log>
					<log>process_record_start.xml - END (error during recording but after a PAUSE, 24k or less in length(3 seconds), Go to process_combine_voxs.xml?next=disconnect )</log>
					<submit next="process_combine_voxs.xml?next=disconnect" method="post"/>
				<% else %>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_hangup.xml?next=zerolength )</log>
					<log>process_record_start.xml - END (error during recording, 24k or less in length(3 seconds), Go to process_record_hangup.xml?next=zerolength )</log>
					<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
				<% end if %>
            <else/>
				<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_savevox.xml?next=disconnect )</log>
				<log>process_record_start.xml - End (error during recording, Go to process_record_savevox.xml?next=disconnect )</log>
				<submit next="process_record_savevox.xml?next=disconnect" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
			</if>
		</error>

My problem is this. For some reason, users get into this code but I need to know what the error message is so I can correct it. There is no error message in the Plum error log, and by the time I find out, I can't look at the other log you supply since it's usually after a few days and a few hundred calls later. I'm just looking to <log> the exact error description when the users get into the general <error> handling.

Thanks,

Mike C.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

Is anybody from Plum Support working this week?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code to capture and log errors

Post by support »

Hi Mike,

Are you looking for IVR code to capture and log the IVR errors that appear in your IVR call log that look something like this?

"DocumentParser::FetchDocument - Parse error in file "http://www.example.com/script.php", line 59, column 8 - Element 'prompt' is not valid for content model: '(grammar|catch|help|noinput|nomatch|error|filled|initial|object|link|property|record|script|subdialog|transfer|block|data|field|var)*'
errno: 205 uri http://www.example.com/script.php"

Or are you trying to log separate IVR errors altogether?

Regards,
Plum Support
Last edited by support on Wed Feb 17, 2010 12:04 pm, edited 4 times in total.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

Basically, if my application enters the <error> tag, I want to get information on what that error is.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR fix for capturing and logging errors

Post by support »

Hi Mike,

To resolve this IVR issue, you can either:

1) Use the IVR tag, <log>, to write error entries into your IVR session log. Then, on your IVR hosting account page, you can go to Call Logs -> Session Logs and view your session logs.

OR

2) Post IVR log entries directly to your backend by using the <submit> or <data> tag. Please keep in mind of post-call processing rules such as not playing any TTS once the IVR call has finished as this would cause a "Max Disconnect Exceeded" error.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 2:50 pm, edited 4 times in total.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

So, when I use the <log> tag, how do I show the description of the error? I don't know the syntax to show the error description and couldn't find it anywhere in the documentation. Can you please provide an example? Thx.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Clarification for IVR issue needed

Post by support »

Hi Mike,

Sorry, but we misunderstood the purpose of your post.

So, what you're looking for is the exact error generated by our IVR platform when a call reaches the <error> block within your IVR code.

Could you provide us with more details on how to reproduce this issue of how your customers are reaching the <error> block? Normally, if an IVR call reaches an <error> block, an error message is generated by the IVR platform and stored under Error Logs. So, it seems unusual that no error messages are being generated when you go to check your IVR error logs.

Regards,
Plum Support
Last edited by support on Wed Feb 17, 2010 12:06 pm, edited 3 times in total.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

I agree it is strange that the user reached the <error> code but an error never appeared in the Plum error log. I will post the description tomorrow, since it will take some time to write up. In the meantime, could you please please please show me how to write out the error description. This is critical for debugging. Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR issue with logging exact error message

Post by support »

Hi,

You've been using the <log> tag, correctly in your IVR code. So, if we take the following example of IVR code:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<prompt>
Hello. Good night moon.
</prompt>
<goto expr="http://www.example.com/filedoesnotexist.php"/>
</block>

<error>
<log label="mylog">There's an error here. That file does not exist, so it cannot be fetched.</log>
</error>
</form>
</vxml>
and call into it, then this would generate the following line in our IVR session log:

Code: Select all

local 617XXXXXXX 17 [29/Dec/2008:14:39:15 -0500] 617XXXXXXX 000001;017;1230578721 mylog There's an error here. That file does not exist, so it cannot be fetched.
However, if you're looking to log the exact error message that is generated by the IVR platform, you would not be able to do this. You would have to look at your Error Logs for these error messages, which is why we would like to reproduce the issue that you are experiencing in not being able to see your IVR error logs.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 2:52 pm, edited 4 times in total.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

So, the user gets into this vxml page when then want to create a recording. Here is the entire vxml page:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.1" application="root.xml">

<!--#include file="clsXMLConstants.asp"-->
<!--#include file="clsXMLDatabase.asp"-->
<!--#include file="clsXMLSessionManager.asp"-->
<!--#include file="clsXMLUtilities.asp"-->
<!--#include file="clsXMLVariables.asp"-->

<%
GetSessionValues

dim strFrom
strFrom = Request.querystring("from")

objXMLUtilities.AppendToTodaysVoiceXMLServerLogFile(strPlumCallID & " process_record_start.xml - Start and End")

strFileCount = cint(strFileCount) + 1

SaveSessionValues
%>

<catch event="connection.disconnect">
	<log>process_record_start.xml - End (disconnect outside recording, 24k or less in length(3 seconds), Go to process_record_hangup.xml?next=zerolength )</log>
	<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
</catch>

<error>
	<log>process_record_start.xml - End (error outside recording, 24k or less in length(3 seconds), Go to process_record_hangup.xml?next=zerolength )</log>
	<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
</error>

<!--
This extraneous BREAK statement is here because the XML files that are sometimes called prior to this one
(process_combine_voxs.xml, main_menu.xml, and process_record_new.xml) are not acknowledging the fact that
the user hung up.  That is, their disconnect handler is not getting acknowledged.  This BREAK tag seems
to "force" the disconnect event here.
-->

<form id="begin">
	<block>
		<prompt>
			<break time="1ms"/>
		</prompt>
		<goto next="#record"/>
	</block>
</form>

<form id="record">
	<!-- <var name="username" expr="<% = strUserName %>"/> -->
	<!-- <var name="calldate" expr="'<% = dtStartDateTimeYear %>'"/> -->
	<var name="foldernumber" expr="<% = strFolderNumber %>"/>
	<var name="filenumber" expr="<% = strFileCount %>"/>

	<block>
		<log>process_record_start.xml - Start</log>
	</block>
	<grammar>1|2|3|4|5|6|7|8|9|0|"*"|"#"</grammar>
	<record name="initial_recording" beep="true" dtmfterm="true" maxtime="3540s" finalsilence="300s" type="audio/basic">
		<prompt>
		<% if ( cint(strFileCount) <= 1 ) then 
			'Log the dictation
			'stored procedure: sp_insert_phone_in_log_record
			'tables: phone_log
			set conDatabase = Server.CreateObject("ADODB.Connection")
			conDatabase.Open strConnection
			objXMLUtilities.SetDictationStarted2 "L", strUserID, strFolderNumber, strCallID, 0
			conDatabase.Close
		%>
			<voice name="lauren">Reecord at the beep.</voice>
		<% else %>
			<voice name="lauren">Continue at the beep.</voice>
		<% end if %>
		</prompt>
		<catch event="noinput" count="1">
			<prompt>
				<voice name="lauren">
					Are you still there.
				</voice>
			</prompt>
			<reprompt/>
		</catch>
		<catch event="noinput" count="3">
			<prompt>
				<voice name="lauren">
					Goodbye.
				</voice>
			</prompt>
			<log>process_record_start.xml - End (No input, Go to process_record_hangup.xml?next=zerolength )</log>
			<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
		</catch>
		<filled>
		    <assign name="nextkey" expr="initial_recording$.termchar"/>
			<if cond="nextkey=='1'">
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is saved</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds for your dictation to be saved.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice 1, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=saveandrecordnormal )</log>
						<submit next="process_combine_voxs.xml?next=saveandrecordnormal" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 1, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=saveandrecordnormal )</log>
					<log>process_record_start.xml - END (User Choice 1, Go to process_record_savevox.xml?next=saveandrecordnormal )</log>
					<submit next="process_record_savevox.xml?next=saveandrecordnormal" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='2'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is saved</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds for your dictation to be saved.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice 2, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=saveandrecordstat )</log>
						<submit next="process_combine_voxs.xml?next=saveandrecordstat" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 2, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=saveandrecordstat )</log>
					<log>process_record_start.xml - End (User Choice 2, Go to process_record_savevox.xml?next=saveandrecordstat )</log>
					<submit next="process_record_savevox.xml?next=saveandrecordstat" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='3'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please use the rewind functionality before using the reecord from here function. Please wait to enter the pause menu..</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please use the rewind functionality before using the reecord from here function. Please wait <value expr="saveTime"/> seconds to enter the pause menu.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<prompt><voice name="lauren">You can not use the reecord from here feature in this area. Please wait so that your previous recordings are saved.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 3, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=hangup )</log>
						<submit next="process_combine_voxs.xml?next=hangup" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 3, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=pause )</log>
					<log>process_record_start.xml - End (User Choice 3, Go to process_record_savevox.xml?next=pause )</log>
					<submit next="process_record_savevox.xml?next=pause" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='4'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is accessed</voice></prompt>
		        <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds while your dictation is accessed.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice 4, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=reviewrewind )</log>
						<submit next="process_combine_voxs.xml?next=reviewrewind" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 4, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=reviewrewind )</log>
					<log>process_record_start.xml - End (User Choice 4, Go to process_record_savevox.xml?next=reviewrewind )</log>
					<submit next="process_record_savevox.xml?next=reviewrewind" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='5'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait to enter the pause menu</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds to enter the pause menu.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<prompt><voice name="lauren">You can not use the pause feature in this area. Please wait so that your previous recordings are saved.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 5, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=hangup )</log>
						<submit next="process_combine_voxs.xml?next=hangup" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 5, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=pause )</log>
					<log>process_record_start.xml - End (User Choice 5, Go to process_record_savevox.xml?next=pause )</log>
					<submit next="process_record_savevox.xml?next=pause" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='6'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please use the rewind functionality before using the fast forward function. Please wait to enter the pause menu.</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please use the rewind functionality before using the fast forward function. Please wait <value expr="saveTime"/> seconds to enter the pause menu.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<prompt><voice name="lauren">You can not use the fast forward feature in this area. Please wait so that your previous recordings are saved.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 6, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=hangup )</log>
						<submit next="process_combine_voxs.xml?next=hangup" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 6, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=pause )</log>
					<log>process_record_start.xml - End (User Choice 6, Go to process_record_savevox.xml?next=pause )</log>
					<submit next="process_record_savevox.xml?next=pause" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='7'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is accessed</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds while your dictation is accessed.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice 7, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=reviewbeginning )</log>
						<submit next="process_combine_voxs.xml?next=reviewbeginning" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 7, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=reviewbeginning )</log>
					<log>process_record_start.xml - End (User Choice 7, Go to process_record_savevox.xml?next=reviewbeginning )</log>
					<submit next="process_record_savevox.xml?next=reviewbeginning" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='8'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Going to the cancellation menu. Please wait.</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Going to the cancellation menu. Please wait <value expr="saveTime"/> seconds.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<% if (cstr(strCancelFlag) = "1") then %>
							<log>process_record_start.xml - End (User Choice 8, Go to process_record_cancel.xml )</log>
							<submit next="process_record_cancel.xml"/>
						<% else %>
							<prompt><voice name="lauren">The cancel feature is not activated for your account. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
							<log>process_record_start.xml - End (User Choice 8, no recording, not pause or recordfromhere, Go to process_combine_voxs.xml?next=hangup )</log>
							<submit next="process_combine_voxs.xml?next=hangup" method="post"/>
						<% end if %>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 8, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<% if (cstr(strCancelFlag) = "1") then %>
						<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=cancel )</log>
						<log>process_record_start.xml - End (User Choice 8, Go to process_record_savevox.xml?next=cancel )</log>
						<submit next="process_record_savevox.xml?next=cancel" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
					<% else %>
						<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=badcancel )</log>
						<log>process_record_start.xml - End (User Choice 8, Go to process_record_savevox.xml?next=badcancel )</log>
						<submit next="process_record_savevox.xml?next=badcancel" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
					<% end if %>
				</if>
			<elseif cond="nextkey=='9'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is accessed</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds while your dictation is accessed.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice 9, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=reviewend )</log>
						<submit next="process_combine_voxs.xml?next=reviewend" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 9, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=reviewend )</log>
					<log>process_record_start.xml - End (User Choice 9, Go to process_record_savevox.xml?next=reviewend )</log>
					<submit next="process_record_savevox.xml?next=reviewend" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='*'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is saved</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds while your dictation is saved.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice *, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=hangup )</log>
						<submit next="process_combine_voxs.xml?next=hangup" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice *, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=hangup )</log>
					<log>process_record_start.xml - End (User Choice *, Go to process_record_savevox.xml?next=hangup )</log>
					<submit next="process_record_savevox.xml?next=hangup" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='0'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Going to help menu. Please wait while your dictation is saved</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Going to help menu. Please wait <value expr="saveTime"/> seconds while your dictation is saved.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<prompt><voice name="lauren">You can not use the help feature in this area. Please wait so that your previous recordings are saved.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 0, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=hangup )</log>
						<submit next="process_combine_voxs.xml?next=hangup" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice 0, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,Go to process_record_savevox.xml?next=help )</log>
					<log>process_record_start.xml - End (User Choice 0, Go to process_record_savevox.xml?next=help )</log>
					<submit next="process_record_savevox.xml?next=help" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			<elseif cond="nextkey=='#'"/>
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">Please wait while your dictation is saved</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">Please wait <value expr="saveTime"/> seconds while your dictation is saved.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<if cond="initial_recording == undefined || initial_recording$.size == ''">
					<% if (strFrom = "pause" or strFrom = "recordfromhere" or strFrom = "continuerecord") then %>
						<log>process_record_start.xml - End (User Choice #, no recording, from <% = strFrom %>, Go to process_combine_voxs.xml?next=saveandreprompt )</log>
						<submit next="process_combine_voxs.xml?next=saveandreprompt" method="post"/>
					<% else %>
						<prompt><voice name="lauren">You have not created a recording. All previous recordings were saved. You will now be disconnected. Goodbye.</voice></prompt>
						<log>process_record_start.xml - End (User Choice #, no recording, not pause or recordfromhere, Go to process_record_hangup.xml?next=zerolength )</log>
						<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
					<% end if %>
				<else/>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,process_record_savevox.xml?next=saveandreprompt )</log>
					<log>process_record_start.xml - End (User Choice #, Go to process_record_savevox.xml?next=saveandreprompt )</log>
					<submit next="process_record_savevox.xml?next=saveandreprompt" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
				</if>
			</if>
			<if cond="initial_recording$.maxtime==true">
				<if cond="initial_recording$.size < 4500000">
					<prompt><voice name="lauren">You have reached the maximum time limit of 60 minutes. Please wait while your dictation is saved.</voice></prompt>
	            <else/>
					<assign name="saveTime" expr="Math.round(initial_recording$.size/450000)"/>
					<prompt><voice name="lauren">You have reached the maximum time limit of 60 minutes. Please wait <value expr="saveTime"/> seconds while your dictation is saved.  If you hang up, your dictation will still be saved</voice></prompt>
				</if>
				<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/>,process_record_savevox.xml?next=maxtime )</log>
				<log>process_record_start.xml - End (Go to process_record_savevox.xml?next=maxtime )</log>
				<submit next="process_record_savevox.xml?next=maxtime" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
			</if>
		</filled>

		<catch event="connection.disconnect">
			<if cond="initial_recording == undefined">
				<% if ( strFrom = "pause" ) then %>
					<log>process_record_start.xml - END (disconnect during recording but after a PAUSE, no length, Go to process_combine_voxs.xml?next=disconnect )</log>
					<submit next="process_combine_voxs.xml?next=disconnect" method="post"/>
				<% else %>
					<log>process_record_start.xml - End (disconnect during recording, no length, Go to process_record_hangup.xml?next=zerolength )</log>
					<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
				<% end if %>
			<elseif cond="initial_recording$.size < 24000 || initial_recording$.size == ''"/>
				<% if ( strFrom = "pause" ) then %>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_combine_voxs.xml?next=disconnect )</log>
					<log>process_record_start.xml - END (disconnect during recording but after a PAUSE, 24k or less in length(3 seconds), Go to process_combine_voxs.xml?next=disconnect )</log>
					<submit next="process_combine_voxs.xml?next=disconnect" method="post"/>
				<% else %>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_hangup.xml?next=zerolength )</log>
					<log>process_record_start.xml - END (disconnect during recording, 24k or less in length(3 seconds), Go to process_record_hangup.xml?next=zerolength )</log>
					<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
				<% end if %>
            <else/>
				<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_savevox.xml?next=disconnect )</log>
				<log>process_record_start.xml - End (disconnect during recording, Go to process_record_savevox.xml?next=disconnect )</log>
				<submit next="process_record_savevox.xml?next=disconnect" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
			</if>
		</catch>

		<catch event="error.badfetch" count="1">
			<if cond="initial_recording$.size == 0 || initial_recording$.size == '' || initial_recording == undefined">
				<log>process_record_start.xml - End (error.badfetch during recording, 0 length, Go to process_record_hangup.xml?next=zerolength )</log>
				<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
            <else/>
				<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_savevox.xml?next=disconnect )</log>
				<log>process_record_start.xml - End (error.badfetch during recording, Go to process_record_savevox.xml?next=disconnect)</log>
				<submit next="process_record_savevox.xml?next=disconnect" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
			</if>
		</catch>
		
		<catch event="error.badfetch" count="2">
			<log>process_record_start.xml - End (error.badfetch during recording, Save recording on Plum server)</log>
			<var name="filename" expr="foldernumber + '_phone_file_' + filenumber + '.vox'"/>
			<var name="recording" expr="initial_recording"/>
	        <submit next="http://metroscript.plumgroup.com/saverecording.php" namelist="filename recording" method="post" enctype="multipart/form-data"/>
		</catch>

		<catch event="nomatch noinput">
			<submit next="process_record_hangup.xml" method="post"/>
		</catch>

		<error>
			<if cond="initial_recording == undefined">
				<% if ( strFrom = "pause" ) then %>
					<log>process_record_start.xml - END (error during recording but after a PAUSE, no length, Go to process_combine_voxs.xml?next=disconnect )</log>
					<submit next="process_combine_voxs.xml?next=disconnect" method="post"/>
				<% else %>
					<log>process_record_start.xml - End (error during recording, no length, Go to process_record_hangup.xml?next=zerolength )</log>
					<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
				<% end if %>
			<elseif cond="initial_recording$.size < 24000 || initial_recording$.size == ''"/>
				<% if ( strFrom = "pause" ) then %>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_combine_voxs.xml?next=disconnect )</log>
					<log>process_record_start.xml - END (error during recording but after a PAUSE, 24k or less in length(3 seconds), Go to process_combine_voxs.xml?next=disconnect )</log>
					<submit next="process_combine_voxs.xml?next=disconnect" method="post"/>
				<% else %>
					<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_hangup.xml?next=zerolength )</log>
					<log>process_record_start.xml - END (error during recording, 24k or less in length(3 seconds), Go to process_record_hangup.xml?next=zerolength )</log>
					<submit next="process_record_hangup.xml?next=zerolength" method="post"/>
				<% end if %>
            <else/>
				<log>process_record_start.xml - MID (File size in bytes: <value expr="initial_recording$.size"/> , Go to process_record_savevox.xml?next=disconnect )</log>
				<log>process_record_start.xml - End (error during recording, Go to process_record_savevox.xml?next=disconnect )</log>
				<submit next="process_record_savevox.xml?next=disconnect" method="post" namelist="initial_recording" fetchtimeout="120s" enctype="multipart/form-data"/>
			</if>
		</error>

	</record>
</form>

</vxml>

Here is the Plum error log for that day, in which you will see that this call did not get logged as an error (I removed the phone numbers for privacy reasons.

Code: Select all

000000;028;1228943769 HTTP/1.1 500 Internal Server Error - http://66.29.206.116/process_record_new.xml
000000;028;1228943769 DocumentParser::FetchBuffer - could not open URL: process_record_new.xml
000000;028;1228943769 DocumentParser::FetchDocument - exiting with error result 2
000000;028;1228943769 errno: 203 uri process_record_new.xml
000003;065;1228896029 Error fetching document http://66.29.206.116/process_record_savevox.xml?next=saveandreprompt due to Failed writing header
000003;065;1228896029 DocumentParser::FetchBuffer - could not open URL: process_record_savevox.xml?next=saveandreprompt
000003;065;1228896029 DocumentParser::FetchDocument - exiting with error result 2
000003;065;1228896029 errno: 203 uri process_record_savevox.xml?next=saveandreprompt
000003;008;1228925920 HTTP/1.1 500 Internal Server Error - http://66.29.206.116/main_menu_setup.xml
000003;008;1228925920 DocumentParser::FetchBuffer - could not open URL: main_menu_setup.xml
000003;008;1228925920 DocumentParser::FetchDocument - exiting with error result 2
000003;008;1228925920 errno: 203 uri main_menu_setup.xml
000004;047;1228937261 DocumentParser::FetchDocument - Parse error in file "process_record_savevox.xml?next=saveandreprompt", line 14, column 7 - Unknown element 'font'
000004;047;1228937261 errno: 205 uri process_record_savevox.xml?next=saveandreprompt
000021;015;1228888933 HTTP/1.1 500 Internal Server Error - http://66.29.206.116/process_record_new.xml
000021;015;1228888933 DocumentParser::FetchBuffer - could not open URL: process_record_new.xml
000021;015;1228888933 DocumentParser::FetchDocument - exiting with error result 2
000021;015;1228888933 errno: 203 uri process_record_new.xml
000021;022;1228931325 DocumentParser::FetchDocument - Parse error in file "process_record_savevox.xml?next=disconnect", line 14, column 7 - Unknown element 'font'
000021;022;1228931325 errno: 205 uri process_record_savevox.xml?next=disconnect
000012;070;1228918573 DocumentParser::FetchDocument - Parse error in file "process_record_savevox.xml?next=saveandreprompt", line 14, column 7 - Unknown element 'font'
000012;070;1228918573 errno: 205 uri process_record_savevox.xml?next=saveandreprompt
000012;033;1228923399 HTTP/1.1 500 Internal Server Error - http://66.29.206.116/main_menu_setup.xml
000012;033;1228923399 DocumentParser::FetchBuffer - could not open URL: main_menu_setup.xml
000012;033;1228923399 DocumentParser::FetchDocument - exiting with error result 2
000012;033;1228923399 errno: 203 uri main_menu_setup.xml
000012;003;1228933085 HTTP/1.1 500 Internal Server Error - http://66.29.206.116/main_menu_setup.xml
000012;003;1228933085 DocumentParser::FetchBuffer - could not open URL: main_menu_setup.xml
000012;003;1228933085 DocumentParser::FetchDocument - exiting with error result 2
000012;003;1228933085 errno: 203 uri main_menu_setup.xml
000012;004;1228928980 Error fetching document http://66.29.206.116/process_record_savevox.xml?next=pause due to
000012;004;1228928980 DocumentParser::FetchBuffer - could not open URL: process_record_savevox.xml?next=pause
000012;004;1228928980 DocumentParser::FetchDocument - exiting with error result 2
000012;004;1228928980 errno: 203 uri process_record_savevox.xml?next=pause
000012;089;1228942616 HTTP/1.1 500 Internal Server Error - http://66.29.206.116/process_record_new.xml
000012;089;1228942616 DocumentParser::FetchBuffer - could not open URL: process_record_new.xml
000012;089;1228942616 DocumentParser::FetchDocument - exiting with error result 2
000012;089;1228942616 errno: 203 uri process_record_new.xml
Here are the log files that I created for that call when the user was in that specific page. By my log files, it looks like the user entered the page, created a recording for 10:22 minutes and then all of a sudden entered into my GENERAL error handling routine. I removed the phone numbers for privacy reasons.

Code: Select all

local 40 [10/Dec/2008:16:01:58 -0500] 000012;040;1228941305 label process_record_start.xml - Start
local 40 [10/Dec/2008:16:12:20 -0500] 000012;040;1228941305 label process_record_start.xml - End (error during recording, no length, Go to process_record_hangup.xml?next=zerolength )
If you could make any sense out of this, it would be appreciated.

Thanks,

Mike C.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

One additional item to note. Not only did the user enter my GENERAL <error> routine, but the recording(initial_recording) was UNDEFINED so nothing was saved from this 10 minute recording. This is what makes this issue extremely critical. Thx.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR issue with logging exact error message

Post by support »

Hi Mike,

Thanks for the information. We are still working on using your IVR code to reproduce the IVR issue you are experiencing, as it seems to be a rare case.

Regards,
Plum Support
Last edited by support on Wed Feb 17, 2010 12:09 pm, edited 2 times in total.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

Please keep in mind that this happens sporatically. We'll go a couple days/weeks without seeing the error and then it will happen 3-4 times in one day.

metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Post by metroscript »

Good afternoon,

I was doing a search within the support area and saw somebody had some code with I think is what I would need to show the error and error description:

Code: Select all

   <error> 
      <log label="IVB_HISTORY"><value expr="'ERROR EVENT='+ _event + '   MESSAGE=' +_message"/></log> 
      <exit /> 
   </error> 
Wouldn't this show the error and error description/message, which you stated is not possible?

Thanks,

Mike C.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR issue with logging exact error message

Post by support »

Hi Mike,

The line of IVR code you provided would write out the IVR error event, but would not write out the error description/message.

From an earlier IVR example:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<prompt>
Hello. Good night moon.
</prompt>
<goto expr="http://www.example.com/filedoesnotexist.php"/>
</block>

<error>
<log label="IVB_HISTORY"><value expr="'ERROR EVENT='+ _event + '   MESSAGE=' +_message"/></log>
</error>
</form>
</vxml> 
You would see the following in your IVR session log:

Code: Select all

local 617xxxxxxx 4 [02/Jan/2009:14:53:01 -0500] 617xxxxxxx 000005;004;1230925326 IVB_HISTORY ERROR EVENT=error.semantic.ecmascript   MESSAGE=
which doesn't reflect what you would see in your IVR error log:

Code: Select all

error 617xxxxxxx 4 [02/Jan/2009:14:53:01 -0500] xxxx 000005;004;1230925326 syntax error line 1
error 617xxxxxxx 4 [02/Jan/2009:14:53:01 -0500] xxxx 000005;004;1230925326 SyntaxError: syntax error line 1
Regards,
Plum Support
Last edited by support on Wed Feb 17, 2010 12:09 pm, edited 2 times in total.

Post Reply