[Asterisk-Users] Need language variable to user account

trixter aka Bret McDanel trixter at 0xdecafbad.com
Mon Oct 17 01:05:52 MST 2005


On Mon, 2005-10-17 at 02:42 -0500, brett at websmyths.com wrote:
> Apparently I misunderstood the use of the word 'language'...
> 
> You mean English, Spanish, Italian, and German - or the actual wording of
> prompt itself?
> 
> For a language - set the 'language=en' or 'language=es' in the
> sip.conf for
> that user.  It is 'supposed' to be carried through.  Should be
> something on
> the wiki about it.
> 
> If you mean the wording or the prompts/IVR etc - well - that's why you
> get
> the 'big bucks'.  8-)
> 
> Brett

You could still use language.  Its not limited to two letters, at least
not with SetLanguage() (I havent seen the realtime parts for this so I
dont know there, but it shouldnt be).  

You could use language just to mean 'use a different set of prompts' and
if the prompt doesnt exist in the subdir it will use the 'default
language' prompt.  

So if you have greetings (greeting.gsm):
default: hello there
lang1: how now brown cow
lang2: the quick brown fox jumps

and create in your /usr/share/asterisk/sounds (or whatever) directory a
directory called 'lang1' and a directory called 'lang2' and placed the
appropriate greeting.gsm in each directory the prompts would be
different if you did
language=lang1 *or* SetLanguage(lang1) depending on how you wanted to do
it.

If you cant do this from the realtime stuff you could do it via an AGI
or dbget() to get the appropriate language as needed.


-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20051017/25485e0b/attachment.pgp


More information about the asterisk-users mailing list