Hi guys! As I already mentioned in the following post http://permalink.gmane.org/gmane.comp.voip.sipx.devel/10359, the method OSBpromptTTS::getDateFrom (in sipXvxml/src/prompt/osbprompt_tts.cpp) always orders voice prompts for a date in the order Month, Day, Year (MDY). For some langauges, it would be prefereable to change this order to DMY. For Italian, it looks like the order must be DMY (see XECS-1489). Changing the order based on a flag is apparently no problem. What I am looking for is feedback with regard to the "flag" itself. Below are some options.
1. Adding the flag as a new option that can be changed by the administrator via the sipXconfig GUI would be in my opinion a bad idea. For many langauges, recorded voice prompts must match the order in which they are used. Allowing the administrator to change the order would open a gate to problem reports about the wrong order of prompts on misconfigured systems. 2. The list of languages that require the DMY order could be hardcoded in the source. This solution would be pretty simple, but it would require updates whenever someone identifies a new language that requires the DMY order. Also, this - in my opinion - inflexible solution does not really chime well with our idea of installable localization packages. 3. We could use a configuration file that contains identifiers of languages that require the DMY order. Even though this solution would be more flexible than the hardcoded list, someone would have to update the configuration file when a new langauge is identified (better than changing the code). Also, the installation script for localization packages could somehow - probably not exactly in a nice way - get the info about the required order and update this configuration file if needed. The configuration file would be parsed by the Media Server startup code and the appropriate flag would be (somehow) passed down to the method getDateFrom() that needs it. 4. As the order of the date prompts is really directly tied to the voice prompts recorded for the specific language, we could add a special file to the stdprompts_xx directory to indicate that the DMY order is required. For example, the presence of the file "DMY.wav" (or maybe just "DMY") would indicate that this specific language (or this set of voice prompts) requires the DMY order. For all existing stdprompts_xx directories, this special file wouldn't be present, so the default (MDY) order would be used. Localization packages could include this file with other voice prompt files, so no changes would be required in that area. At the startup of the Media Server, the presence of this special file in the stdprompts directory would be checked and the appropriate flag passed down to the method getDateFrom() that needs it. The file itself could possibly contain a text that describes what it is used for. There must be many other ways how the flag could be stored. I am looking for opinions with regard to what would be the cleanest (or maybe best) way of storing and retrieving the flag. Also, if someone (maybe Woof! :-) is opiniated about where in the Media Server code the flag should be retrieved and how, I am open to suggestions. I don't really want to retrieve it in the getDateFrom() method, I don't want to pass it as a parameter through way too many levels, a global variable does not feel right as an acceptable way of passing it down (even though it would be the simplest approach).... Cheers, Misha _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
