Created by: null on 02-08-2007 05:16:07 PM In using the Path setting in the "record" element, I discovered that it seems to be relative to the root of the operating system, not the application server, which is different from spoken audio files. (For example, a phrase that I play will be relative to "TOMCAT_HOME/webapps/", but the phrase recorded will be placed in C:\PATH, where PATH is the setting from the record element.
I want to speak out a phrase, and then rerecord it; so I need to make the path of the record the same as that of the original phrase.
I could imbed the value of TOMCAT_HOME/webapps in the Path setting, but this depends on which and how the app server is installed. Is there some way I can use a redefined session variable or something like that which is already set to the app server root - (TOMCAT_HOME/webapps in my case).
Subject: RE: Record Element, path for audio file is absolute Replied by: Cheng-Dar Yang on 02-08-2007 08:13:44 PM Hi,
Can record with confirm element be used for your purpose?
There is no session variable that contains the path to the application server. You will need to write a custom java code to extract the path value from the system and place it into element data to be accessed later.
Regards, Cheng
Subject: RE: Record Element, path for audio file is absolute Replied by: null on 03-08-2007 02:51:39 AM If you set the path to . (that's a dot) it will be deposited in TOMCAT_HOME\bin. So if you set the path to ..\webapps\etc it will work
(I have played with the recording element quite a bit lately. I agree with Cheng though - the Record_with_Confirm is the way to go)
Regards Geoff
Subject: Record Element, path for audio file is absolute Replied by: null on 03-08-2007 01:47:45 PM Thanks, Metralla
The record with confirm did not help in my case, because i need to play the old version of the audio first, then record a new version. I did not need to play the new recording after recording.
I found out, however, that using a simple "." for a path in the record caused the new audio file to be dropped in"C:\WINDOWS\system32" in my environment, not TOMCAT_HOME/bin. So what is the environment variable that is really being used to determine the relative path?
So, it appears if the path in the record and record with confirm elements is NOT absolute unless it starts with a "/", which makes sense - normal file naming conventions.
It's a bit inconsistent though: The app audio settings form has a number of paths that by default all start with a "/" (/Audium/audio/error.wav, etc.) and are still relative; the default audio path URI in that same form also is relative if it starts with a "/". These are all relative to " TOMCAT_HOME/webapps".
The path in the record elements is absolute if it starts with a "/", but otherwise is relative to either "TOMCAT_HOME/bin" or "C:\WINDOWS\system32" (depending on what?).
It seems that this should be cleaned up a little, or at the least, the documentation should spell out exactly what relative paths are used and where a ;eading "/" still indicates a relative path.
Does this make sense?
Thanks, Art
Subject: RE: Record Element, path for audio file is absolute Replied by: Cheng-Dar Yang on 03-08-2007 10:30:08 PM Hi Art,
Thanks for the suggestion regarding documenting the absolute/relative path defaults. I will pass this on to the documentation team. However, I would like to list out a few points.
1. Audio settings in application properties refer to system audios for handling errors and special conditions. They are relative to the webapp because the will always be available if the server is running.
2. The Default Audio Path is appended in front of the audio items (with the check box checked) and does not affect the system audios described in item 1. You must think of it from the voice browser's perspective, if you simply put a slash or a .slash, the browser should try to append the http://<IP>/ to the slash or .slash and then the audio item. Typically, absolute is used plus the http://<IP>/ to avoid confusion.
3. Recoding elements makes the voice browser record an audio, submit that data back to the application server. Then the app server makes a decision to save this file. If no path is specified, the app server determines where to put the file. The app server may defer that "temp" location to the OS. Again, absolute path should be used to avoid confusion.
Hope this helps, Cheng
Subject: RE: Record Element, path for audio file is absolute Replied by: Janine Graves on 07-08-2007 06:15:06 AM when you put in a path for saving the record element, the VXML Server is using that directory as a file path (relative to Unix root or Windows C to creat a file on the CVP Vxml Server. It has nothing to do with any web server.
(I don't know why putting in a "." on windows with tomcat is different than on unix or with websphere. It's probably in some tomcat or websphere config file somewhere. )
When you use a path for a URI (like with a recorded audio file name) the voice gateway is making an http request of a web server and it's using that URI to tell the web server where within the web server's path to find the file.
So you need to understand a little bit about web servers (or app servers). Web servers are configured with something called a "document root" directory - (for apache, you'd find this configured in the apache.conf file, and the default "document root" is "<apache>/htdocs/").
This "document root" is a directory that indicates to the web server, that any file or subdirectory within an http URI request will be relative to this "document root" location. Even if the http request looks like this "/helloworld.wav" - the web server goes to its "document root directory" and looks for the helloworld.wav there.
I think this is done for security purposes. So http requests can't access any files other than those within a certain directory and its subdirectories.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: