Summary:ASTERISK-00330: setlanguage function doesnt work
Reporter:duncan (duncan)Labels:
Date Opened:2003-09-29 09:26:23Date Closed:2004-09-25 02:46:18
Versions:Frequency of
Description:using setlanguage is supposed to allow sound files to be played with a specific filename - to allow internationalisation.  

for instance:  SetLanguage(uk) should attempt to play digits in the /var/lib/asterisk/sounds/digits/ directory named 0-uk.gsm

instead no matter what language or permissions just the default 0.gsm is played.  


this functionality worked around 6 months ago, but recent cvs's have disabled this functionality
Comments:By: Mark Spencer (markster) 2003-09-29 15:20:14

The functionality was changed so that it *should* look for digits/uk/0.gsm.  Can you test this new version of the functionality?

By: duncan (duncan) 2003-09-29 15:39:56

i attempted this a few days ago and it didnt work, currently i have both digits/uk/0.gsm AND digits/0-uk.gsm and still it will only play 0.gsm

im wary about upgrading the live environment where this is in the wild due to recent changes, so on my dev machine at home (with todays cvs) i get:

   -- Starting simple switch on 'Zap/1-1'
   -- Executing Goto("Zap/1-1", "language|s|1") in new stack
   -- Goto (language,s,1)
   -- Executing SetLanguage("Zap/1-1", "uk") in new stack
   -- Executing AGI("Zap/1-1", "duncan.agi") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/duncan.agi
   -- Playing 'digits/0'
   -- AGI Script duncan.agi completed, returning 0
   -- Hungup 'Zap/1-1'

duncan.agi comprises of:


use Asterisk::AGI;

$AGI = new Asterisk::AGI;
%input = $AGI->ReadParse();



and the sounds directory has a subdirectory of digits called "uk" with a file named 0.gsm (actually its the original 2.gsm, but renamed to 0 so i know theres a difference.)

By: Mark Spencer (markster) 2003-10-06 00:09:43

Fixed in CVS