[asterisk-bugs] [Asterisk 0014749]: [patch] Add support for relative path to digits, letters and phonetics files in say.c

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Aug 20 07:15:01 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14749 
====================================================================== 
Reported By:                nicchap
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14749
Category:                   Addons/New Feature
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     feedback
Target Version:             1.6.x Version Tracker
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-25 08:44 CDT
Last Modified:              2009-08-20 07:15 CDT
====================================================================== 
Summary:                    [patch] Add support for relative path to
digits,letters and phonetics files in say.c
Description: 
We use asterisk as our IVR base and thus support multiple applications for
multiple clients. Each client have their own set of prompts and voices,
including what I call VOCAB files, or digits - letters and phonetics.
Currently Asterisk only supports these files from the language root:

ie: digits/ or fr/digits or fr/letters and so on. 

This patch enables us to have multiple recordings of these files located
in a relative directory under the required language:

ie: allison/digits , fr/isabelle/letters, en/manuel/phonetics and so on

I tried as best to avoid touching any internals and decided to use a
channel variable called VOCAB_RELATIVE_PATH to enable this feature (simply
call the dialplan Set function to enable it). If this variable exists, then
the relative path defined by it is used, otherwise it defaults to it's
usual location. If the file is not found under the relative path, it also
defaults to it's usual location.
====================================================================== 

---------------------------------------------------------------------- 
 (0109328) nicchap (reporter) - 2009-08-20 07:15
 https://issues.asterisk.org/view.php?id=14749#c109328 
---------------------------------------------------------------------- 
tilghman: I'll do my best to explain why I'm doing this patch...

1) this only affects files that reside in /digits, /letters, /phonetics,
which in "mostly" done through say.c (see tzafrir's comment above dated
2009-04-01 14:00)

2) It already uses the language prefix, that I do not touch, I only append
to it, thus working with any language model you may adopt.

3) Consider the following sound file directory structure:

sounds/digits
sounds/letters
sounds/phonetics
sounds/customer1
sounds/customer2
sounds/customer3
sounds/customer1/digits
sounds/customer1/letters
sounds/customer1/phonetics

sounds/fr/digits
sounds/fr/letters
sounds/fr/phonetics
sounds/fr/customer1
sounds/fr/customer2
sounds/fr/customer3
sounds/fr/customer1/digits
sounds/fr/customer1/letters
sounds/fr/customer1/phonetics

What my patch does it that it tells which /digits, /letters, and
/phonetics to use, based on existing language prefix. This permits me to be
able to use a different subset for customer1 then that of customer2 or
customer3. If no VOCAB_RELATIVE_PATH is specifed, it uses from the default
language prefix, otherwise it appends to the language prefix. 

Your suggestion to use languagecode[_territorycode[_gender[_variant]]]
still does not "fix" how this module uses these files. 

I guess you could say that this patch is equivalent to adding a relative
path to play functions in the dialplan, 

ie. playback(file1), playback(customer1/file1)

and this is not possible with any "say" functions.

Hope I'm clear. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-20 07:15 nicchap        Note Added: 0109328                          
======================================================================




More information about the asterisk-bugs mailing list