Multi Language Say_Number for the Asterisk Open Source Project
--------------------------------------------------------------

Contents: 

1. What is app_say_number.so
2. Installation
3. Usage of testprogramm
4. Usage of Say_Number app in asterisk contexts
5. adding Lagnuages
6. Licensing


1. What is app_say_number.so
-----------------------------

app_say_number.so is an asterisk application Module which allows the user to
send Numbers in multiple different Languages to an asterisk channel.

Since there exist a SayNumber Application in the asterisk right now, one could
ask why we need another Application which does the same.  

Well the Problem is clear. SayNumber only Sends the digits in the english
format. Different languages have different Numbering formats, so its not
possible to simply translate the sound files and change them if you want to
change the Language.

Some examples: 

In English is 81 	: eighty one 
In German its		: one and eighty (ein und achtzig)
In french its even	: four twenty on (quatre vingt un)

(There are lots more)

So you see there is a need for a configurable Number Saying Application. But
its not that cruel because in each language you have some kind of basic
Numbers with which you can construct more complex ones.

Say_Number reads its config-file (where the structure of the Numbering format in each language lives) and speaks the Number into the asterisk Channel. 

BUT BEWARE: 

Say_Number is not a tts (TextToSpeech - System) so it needs the basic Number
soundfiles for constructing more complex numbers!

Additionally Say_Number supports Negative Numbers and kommas, and even digit saying. 


2. Installation
----------------

Please see the file INSTALL


3. Usage of testprogramm
------------------------

After Compiling there should be a litle testprogramm which I called sayit. 

sayit takes 3 Arguments: the first on must be the language-definition
Configfile, the second one must be the spoken Number, and the third one is the
Language (e.g. de or en)

But you can simply type in:
#./sayit 

and it should tell you its needed arguments. 

Sayit reads the language definition file and prints out the construction of
the given Number with its Basic Numbers

4. Usage of Say_Number app in asterisk contexts
------------------------------------------------

First of all we should check wether Say_Number was correctly installed, so we need to get the Commandline or the remote Manager of the asterisk. 

then we simply type in (at the asterisk prompt): 

#Cli>show application Say_Number 

(The Underscore is Important, because there is still the builtin application)

If theres an error Please check the Install Paths and read the INSTALL File
again.


If we saw the litle explanation we can add an extension to some context where
we can play a bit (e.g. the OSS Context).

The extension could look like this: 

exten => 123,1,SetLanguage(fr)
exten => 123,2,Say_Number(-882,83Eur)

This extension would do the same in one Line: 

exten => 123,1,Say_Number(-882,83Eur,fr)

As you see its possible to set the Language variable of this Channel with
SetLanguage. If this variable is set,  Say_Number will use it as its Language.

Else You can simply give the language as second argument to Say_Number.

If an error occures (e.g. Language file is not found, or Language is not found
in the Languagefile ..) Say_Number will print out a warning, at the asterisk
command line. 


Additionaly you can give a "digits" flag to Say_Number: 

exten => 123,1,Say_Number(12345,digits,fr)

Now Say_Number will not construct the Number, but will play the digits each by each, in our example above Say_Number would play "1 2 3 4 5". 


5. adding Lagnuages
-------------------

Please See README.addlang if you want to modify or add Languages in the
langfile.

If you find bugs in existing languages or add new ones, I'd like to have a
copy of your language definition file so our language samplefile can grow.


6. Licensing
-------------

Till Say_Number merges into the official asterisk source tree, its Source is distributet under the GPL License. 

Christian Richter (cristian.richter@beronet.com) has the copyright of the
source, but you are encouraged to modify and advance the code and send patches
to me.


