Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Oct 19, 2017 12:55 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Rates/Minutes announcement after 20 in German
PostPosted: Mon Mar 24, 2008 1:24 pm 
Offline

Joined: Tue Feb 12, 2008 11:34 am
Posts: 87
Location: Germany
Hi All,
How can I solve this problem:
The digits sound files contain files with 0,1,2...20,30,40,50,60,70,80,90,hundred

Lets say rate for cuba is 75 cents per minute, In english its easy to combine 70 and 5 to announce 75 cents per minute, but in German its not seventy five, rather its something like five and seventy (fünf und siebzig)
cents per minute.

How to overcome this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 1:48 pm 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
http://www.voip-info.org/wiki-Asterisk+cmd+SayNumber


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 4:20 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
I have a similar need, but it gets more complicated than this. The currency instead of using 100 cents = 1 dollar, it is in essence 1000 cents = 1 dollar. Anyone have a clue how to handle this ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 4:38 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
krzykat wrote:
I have a similar need, but it gets more complicated than this. The currency instead of using 100 cents = 1 dollar, it is in essence 1000 cents = 1 dollar. Anyone have a clue how to handle this ?
Luckily you shouldn't need to modify the Asterisk sources to accomplish this. I think you can do this in Class.A2Billing.php around line 1233 by swapping:
Code:
      list($units, $cents)=split('[.]', sprintf('%01.2f', $credit_cur));
for
Code:
      list($units, $cents)=split('[.]', sprintf('%01.3f', $credit_cur));
(that is just swap the 2 for a 3)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 4:50 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
THANKS - now if only all the problems were this easy to solve.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 9:43 pm 
Offline

Joined: Tue Feb 12, 2008 11:34 am
Posts: 87
Location: Germany
Hi,
Does modify the code in Class.A2Billing.php ? solve both problems? or for the first issue I need to search voip.info.org ?
I went to the link provided but doesn't look like to be a final solution at first glance, so I pended this issue for the time being due to ratecard problem.

BTW what if i add sound files 21, 22,23... 99 explicityly, would it still try to combine 20.wav and 1.wav when the rate is 21 cent/min or would it play 21.wav ?

with sincere regards

mazhar


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 9:49 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
mazhar996 wrote:
I went to the link provided but doesn't look like to be a final solution at first glance
No, it's not the complete solution. You'd need to modify the SayNumber() application in Asterisk to correctly phrase numbers in your chosen language.
Quote:
BTW what if i add sound files 21, 22,23... 99 explicityly
Good question! I don't know, but I'd be interested to hear your findings if you test this experimentally.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 10:06 pm 
Offline

Joined: Tue Feb 12, 2008 11:34 am
Posts: 87
Location: Germany
I will test and let the forum know.

regards
mazhar


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 25, 2008 1:14 pm 
Offline

Joined: Tue Feb 12, 2008 11:34 am
Posts: 87
Location: Germany
Ok, I tried it but didn't work.

Now although this is a direct asterisk forum question, I have posted it there too, but since krzykat had similar need and looks like he fixed out, so writing in a hope that krzykat responds.
I am writing here after searching asterisk forum with no luck.

I have asterisk ver 1.4.17
My german sound files are with correct path
/sounds/de/
/sounds/digits/de/

The files are not corrupt.

Now when i set language to de and try to announce a price 68 cents per minute, instead of saying 8 & 60 , it says only 60

If i copy the same 8.gsm and 60.gsm files in fr or en directories i hear 68. but in case of german it has to be 8 & 60

Dear krzykat, please advise what more configurations are needed.

with sincere regards,


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 25, 2008 1:34 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
mazhar996 wrote:
Now when i set language to de and try to announce a price 68 cents per minute, instead of saying 8 & 60 , it says only 60
Hmm... the source for ast_say_number_full_de() looks like it should work:
Code:
      /* The grammar for German numbers is the same as for English except
      * for the following:
      * - numbers 20 through 99 are said in reverse order, i.e. 21 is
      *   "one-and twenty" and 68 is "eight-and sixty".
      * - "one" varies according to gender
      * - 100 is 'hundert', however all other instances are 'ein hundert'
      * - 1000 is 'tausend', however all other instances are 'ein tausend'
      * - 1000000 is always 'eine million'
      * - "million" is different in singular and plural form
Also the contrib/i18n.testsuite.conf shipped with Asterisk indicates that they tested this to their satisfaction.
I'm fairly sure you're just missing the necessary audio files:
Code:
/* New files:
In addition to English, the following sounds are required:
"millions"
"1-and" through "9-and"
"1F" (eine)
"1N" (ein)
NB "1" is recorded as 'eins'
*/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 25, 2008 3:30 pm 
Offline

Joined: Tue Feb 12, 2008 11:34 am
Posts: 87
Location: Germany
thats true,, these files are missing.
1-and ... 9-and are missing

thanks a lot stavros, you are a great help always,

Added after 1 hours 37 minutes:

Hi Stavros,
whats the path to contrib/i18n.testsuite.conf
and ast_say_number_full_de() and other asterisk functions?

regards
mazhar


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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