Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 11:53 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: IVR sounds strange problem with languages FR and ES [SOLVED]
PostPosted: Wed Jul 02, 2008 4:52 pm 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
Hi all,
I have download from http://ftp2.digium.com/pub/telephony/sounds/
file asterisk-core-sounds-fr-gsm-current.tar.gz and put
in /var/lib/asterisk/sounds/fr the following folders with all files gsm:
dictate, digits, followme, letters, phonetic and silence.

My agiconf3 is ... play_menulanguage = YES say_balance_after_auth = Yes say_rateinitial = Yes

when I dial *2 for spanish or *3 for French, it is correct with the language selected but (the IVR balance and the IVR rateinitial) are in English. :x


Last edited by smart187 on Mon Jul 07, 2008 9:14 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 02, 2008 5:56 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Try this: -

mkdir /var/lib/asterisk/sounds/digits/es/
cp /var/lib/asterisk/sounds/es/digits/* /var/lib/asterisk/sounds/digits/es/

mkdir /var/lib/asterisk/sounds/digits/fr/
cp /var/lib/asterisk/sounds/fr/digits/* /var/lib/asterisk/sounds/digits/fr/

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 02, 2008 10:03 pm 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
don't works :(
when select *3 for French IVR (Vous avez five euros) :evil:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 02, 2008 11:54 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Try this is linux and let me know if you get any result.

Code:
cd /var/lib/asterisk/agi-bin/ && grep ChangeLanguage * -Ri


What this code will do is to find if the word ChangeLanguage appears anywhere in your script. If it does, them you have a problem because there is no function having the name ChangeLanguage() in phpagi. However, a reference to that name appears in some A2Billing installations. Not sure where it came from (not from SVN).

Added after 5 minutes:

Correction: some versions of phpagi has this ...

Code:
    function ChangeLanguage($lang)
    {
   return $this->exec("AGI SET VARIABLE LANGUAGE()",$lang);
    }


... and while the other version doesn't declare function ChangeLanguage($lang), the file Class.A2Billing.php tries to use it.

Added after 2 minutes:

You also might want to check the menulanguage files. There used to be 2 different files: 1 for 2 languages and the other one for 3 languages.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 03, 2008 1:19 am 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
Thank you for your reply, but I am not expert in linux and php :(

I found the files phpagi.php and Class.A2Billing.php in attached.
:oops: sorry for my bad english

Can you correct me the files?
Many thanks


Attachments:
Class.A2Billing.txt [96.58 KiB]
Downloaded 516 times
phpagi.txt [65.42 KiB]
Downloaded 420 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 03, 2008 3:15 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
These files seems to be ok.

What version of Asterisk do you have? Make sure that you set that in a2billing.conf (1_2 or 1_4).

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 03, 2008 11:25 am 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
I Have Asterisk 1.2.26.1 svn rev 79171

In a2billing.conf
; Asterisk Version Information
; 1_1,1_2,1_4 By Default it will take 1_2 or higher
asterisk_version = 1_2


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 04, 2008 10:02 pm 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
which version of asterisk I must to install for to solve this problem? :idea:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 05, 2008 3:26 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
It should work. I have a small script that rearrange all the sound files. I will find it and send it to you.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 06, 2008 7:40 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
This may be a silly question, but during the "make menuselect" section of building Asterisk, you did install the language files didn't you? They are not installed by default.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 06, 2008 10:50 am 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
Which others files I must to install? :?

I have installed:
asterisk-core-sounds-es-gsm-current.tar.gz
asterisk-core-sounds-fr-gsm-current.tar.gz
from http://ftp2.digium.com/pub/telephony/sounds/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 06, 2008 11:01 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
try

cd /usr/src/astersisk ;
make clean
./configure
make menuselect ;select the languages and codecs you want and save.
make
make install
reboot

then try again, if it does not work then

mkdir /var/lib/asterisk/sounds/digits/es/
cp /var/lib/asterisk/sounds/es/digits/* /var/lib/asterisk/sounds/digits/es/

mkdir /var/lib/asterisk/sounds/digits/fr/
cp /var/lib/asterisk/sounds/fr/digits/* /var/lib/asterisk/sounds/digits/fr/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 06, 2008 11:52 am 
Offline

Joined: Wed Jun 11, 2008 10:19 am
Posts: 92
Location: Italy
Via WinSCP3 I have try to create a new dir /var/lib/asterisk/sounds/es/digits/* and then copy inside all files gsm ( digit es) but don't works :(


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 06, 2008 4:18 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
and you have set the right ownership and permissions?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 06, 2008 6:54 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
The sounds files that come with a2billing right out of the box cannot be always properly found by asterisk. That is because asterisk expects sound files to be arranged in a different manner as stated below.

Quote:
Place the voice prompts into a directory structure as follows (usually within /var/lib/asterisk/:

* sounds/xx
* sounds/digits/xx
* sounds/letters/xx
* sounds/phonetic/xx

where xx is the two letter ISO code of the language in question (nl, fr, de, it, pt, es ...)
(NOTE: The structure for 1.4 is different but it requires a configuration change)


The configuration change (if applicable) is located in /etc/asterisk/asterisk.conf. Unfortunately, it seems to work erratically. I couldn't make it work myself. The setting name is:

Code:
languageprefix = yes ; Use the new sound prefix path syntax


This seems to be a new feature introduced in some Asterisk 1.4. Good luck with it.

I have found out that creating language folders in inside each asterisk folder works better all the time.

Here is the script that I have mentioned earlier and it should find any sound files arranged in the A2Billing Style and move them around using Asterisk Default Style. It was not meant to be a beautiful script and the end result was the only goal here.

Code:
#!/bin/bash
lang=fr
ast_sound=/var/lib/asterisk/sounds
echo Fixing the lang "$lang"
echo ...
echo creating relevant folders
echo mkdir $ast_sound/dictate/$lang
mkdir $ast_sound/dictate/$lang
mkdir $ast_sound/digits/$lang
mkdir $ast_sound/followme/$lang
mkdir $ast_sound/letters/$lang
mkdir $ast_sound/phonetic/$lang
mkdir $ast_sound/silence/$lang
echo Moving $lang files in the right folder ...
mv $ast_sound/$lang/dictate/* $ast_sound/dictate/$lang
mv $ast_sound/$lang/digits/* $ast_sound/digits/$lang
mv $ast_sound/$lang/followme/* $ast_sound/followme/$lang
mv $ast_sound/$lang/letters/* $ast_sound/letters/$lang
mv $ast_sound/$lang/phonetic/* $ast_sound/phonetic/$lang
mv $ast_sound/$lang/silence/* $ast_sound/silence/$lang
#rm -rf $lang/dictate/  $lang/digits/  $lang/followme/  $lang/letters/  $lang/phonetic/  $lang/silence/

lang=es
ast_sound=/var/lib/asterisk/sounds
echo Fixing the lang "$lang"
echo ...
echo creating relevant folders
echo mkdir $ast_sound/dictate/$lang
mkdir $ast_sound/dictate/$lang
mkdir $ast_sound/digits/$lang
mkdir $ast_sound/followme/$lang
mkdir $ast_sound/letters/$lang
mkdir $ast_sound/phonetic/$lang
mkdir $ast_sound/silence/$lang
echo Moving $lang files in the right folder ...
mv $ast_sound/$lang/dictate/* $ast_sound/dictate/$lang
mv $ast_sound/$lang/digits/* $ast_sound/digits/$lang
mv $ast_sound/$lang/followme/* $ast_sound/followme/$lang
mv $ast_sound/$lang/letters/* $ast_sound/letters/$lang
mv $ast_sound/$lang/phonetic/* $ast_sound/phonetic/$lang
mv $ast_sound/$lang/silence/* $ast_sound/silence/$lang
#rm -rf $lang/dictate/  $lang/digits/  $lang/followme/  $lang/letters/  $lang/phonetic/  $lang/silence/

lang=en
ast_sound=/var/lib/asterisk/sounds
echo Fixing the lang "$lang"
echo ...
echo Moving $lang files in the right folder ...
mv $ast_sound/$lang/dictate/* $ast_sound/dictate/
mv $ast_sound/$lang/digits/* $ast_sound/digits/
mv $ast_sound/$lang/followme/* $ast_sound/followme
mv $ast_sound/$lang/letters/* $ast_sound/letters/
mv $ast_sound/$lang/phonetic/* $ast_sound/phonetic/
mv $ast_sound/$lang/silence/* $ast_sound/silence/
#rm -rf $lang/dictate/  $lang/digits/  $lang/followme/  $lang/letters/  $lang/phonetic/  $lang/silence/


Copy this code and paste it in a file called for instance: /var/lib/asterisk/sounds/fix_a2b_sounds

Then do the following (remove the # from the #rm ... lines if you wish to delete the old folders after moving the files):

Code:
cd /var/lib/asterisk/sounds/
chmod +x fix_a2b_sounds
./fix_a2b_sounds


Don't worry about the warning if some files have not been found. After running the file, everything should run smoothly.

Please note that this requires that you already have the a2billing sound files copied **as is** in the Asterisk sound folder.

You will notice that I have not includes the br language. That is because I am convinced that br **does not stand for Brazilian**. It stands for Breton language and Brazilians speak Portuguese (pt) instead. If you need to support BR, then add this at the end of the file:

Code:
lang=br
ast_sound=/var/lib/asterisk/sounds
echo Fixing the lang "$lang"
echo ...
echo creating relevant folders
echo mkdir $ast_sound/dictate/$lang
mkdir $ast_sound/dictate/$lang
mkdir $ast_sound/digits/$lang
mkdir $ast_sound/followme/$lang
mkdir $ast_sound/letters/$lang
mkdir $ast_sound/phonetic/$lang
mkdir $ast_sound/silence/$lang
echo Moving $lang files in the right folder ...
mv $ast_sound/$lang/dictate/* $ast_sound/dictate/$lang
mv $ast_sound/$lang/digits/* $ast_sound/digits/$lang
mv $ast_sound/$lang/followme/* $ast_sound/followme/$lang
mv $ast_sound/$lang/letters/* $ast_sound/letters/$lang
mv $ast_sound/$lang/phonetic/* $ast_sound/phonetic/$lang
mv $ast_sound/$lang/silence/* $ast_sound/silence/$lang
#rm -rf $lang/dictate/  $lang/digits/  $lang/followme/  $lang/letters/  $lang/phonetic/  $lang/silence/


Good luck


Last edited by asiby on Sun Jul 06, 2008 6:59 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group