Summary:ASTERISK-06786: [patch] Voice mail in Polish support
Reporter:Bartosz Supczinski (supczinskib)Labels:
Date Opened:2006-04-14 17:01:44Date Closed:2006-05-05 21:05:45
Versions:Frequency of
Environment:Attachments:( 0) app_voicemail.c_050106.patch
( 1) feature6970-branch12.patch
( 2) feature6970-trunk.patch
( 3) say.c_050106.patch

As our contribution to the Asterisk project we have developed a full support to voice mail in Polish. Everything is grammaticaly correct for all messages. The following links are patches for version. Moreover we have made some improvements:

* The first one concerns two-digits numbers reading in Polish. Until now all numbers from 1 to 90 have been separate files, what made us to create hundreds of files. From now on numbers from 1 to 19 are separate files, and the next tens are created just like in English. It is grammaticaly correct also in Polish.

* The second improvement is proper playing the message header in voice mail (%vm-tohearenv.gsm%press 3 to hear the message envelope). The bug occurred with playing message every time just after the header.

* The third improvement corrects the zero number reading. The bug occurred only in Polish version. The function has played "0", and then it tried to play "-- Playing 'digits/' (language 'pl')", what from obvious reasons ended with a bug.

http://www.dir.pl/~supczinskib/Asterisk/say.c.patch [^]
http://www.dir.pl/~supczinskib/Asterisk/app_voicemail.c.patch [^]

Yours sincerely
Bartosz Supczinski
IT Specialist

Konstytucji 3 Maja 2
86-300 Grudziadz

t.: +48 (56) 6440100
f.: +48 (56) 6440111
m.: +48 (504) 019040
Comments:By: Jason Parker (jparker) 2006-04-15 14:46:18

We cannot do anything with these patches until a disclaimer is on file.

Also, please upload the patches here, so they may be tracked.

By: Bartosz Supczinski (supczinskib) 2006-04-15 19:47:12

Thank you for clues. I`ve uploaded all files to the server and I will send the given documents via fax to the given number.

By: Jason Parker (jparker) 2006-04-20 17:03:56

Submitter faxed disclaimer to Digium.

By: Matt O'Gorman (mogorman) 2006-04-26 15:00:49

everything looks good any polish speakers here to verify before commit into trunk?

By: Tomasz Rozynek (kleofas) 2006-04-26 17:01:52

This translation works well, all messages are grammaticaly correct. No suprises like: "me no messages have". I am using it for several days and have no complains on it.

By: Matt O'Gorman (mogorman) 2006-04-26 17:11:09

im a little uncomfortable about these two changes.

@@ -1786,7 +1788,7 @@
19 dziewietnascie
19m dziewietnastu
1z jedna
-2 dwie
+2 dwa
20 dwadziescia
200 dwiescie
200m dwustu
@@ -1878,7 +1880,7 @@
if (odmiana_nieosobowa == NULL) {
odmiana_nieosobowa = (odmiana *) malloc(sizeof(odmiana));

- odmiana_nieosobowa->separator_dziesiatek = "_";
+ odmiana_nieosobowa->separator_dziesiatek = " ";

memcpy(odmiana_nieosobowa->cyfry, nijaki_cyfry, sizeof(odmiana_nieosobowa->cyfry));
memcpy(odmiana_nieosobowa->cyfry2, nijaki_cyfry2, sizeof(odmiana_nieosobowa->cyfry));

can you explain why they are needed.

By: Bartosz Supczinski (supczinskib) 2006-04-26 17:31:03

- odmiana_nieosobowa->separator_dziesiatek = "_";
+ odmiana_nieosobowa->separator_dziesiatek = " ";

odmiana_nieosobowa->separator_dziesiatek = notpersonal_declension->tens_separator

This change seems to be reasonable, because until now all two-digit numbers were separate files, so it`s not hard to think of that in order to have all numbers from 1 to 99 you have to generate 99 files and you have to also multiply this number by few declensions what will make you generate a few hundrets of files. Now it`s like in english, for example 21 is 20.gsm + 1.gsm. I have no idea why the author made this that way.

-2 dwie
+2 dwa

It was a spelling mistake in a comment.

By: Bartosz Supczinski (supczinskib) 2006-04-27 22:04:33

I have also fixed two more bugs in the voice mail.

* Despite the fact that in 'voicemail.conf' an operator vairable was set to 'no' the option operator '0' was active when recording a message.

* Although in 'extension.conf' there was no 'exten => o', there was an attempt to transfer a connection to an unexisting extension when recording a message and pressing '0' and then accepting or canceling the recording

I did not find more mistakes.

By: Bartosz Supczinski (supczinskib) 2006-04-30 15:50:35

Another pack of bugfixes:

* I`ve modified the "play_message_duration" function for better Polish language support and I`ve added an additional sound "vm-duration", because until now it looked really weird:

-- Playing 'vm-first'
-- Playing 'vm-message'
-- Playing 'digits/3'
-- Playing 'vm-minutes'

after modifications:

-- Playing 'vm-first'
-- Playing 'vm-message'
-- Playing 'vm-duration'
-- Playing 'digits/3'
-- Playing 'vm-minutes'

* I`ve fixed a bug, when a recording is not finished a file with an information about the recording has the name "msgXXXX.txt.tmp", after going to operator '0' options and canceling the recording there is an attempt to delete msgXXXX.txt. It is a legacy after previous naming of the file, which during the recording was named "msgXXXX.txt".

* I`ve fixed a bug, which has occured when changing password to a voice mail from the telephone level. A change of password caused adding an empty line to "voicemail.conf". The error occured only when the 2 last lines of the file were empty. When there was only 1 empty line there was an added username from the previous line.

When patching please use only the newest patch "app_voicemail" and all above.

By: Serge Vecher (serge-v) 2006-05-01 13:33:38

Bartosz: great to see you fixing some bugs here. I think that in order to get these issues addressed in the most efficient manner you will need to separate your patch according to their respective issue. I propose the following course of action:

+1. The patch for issue with *.txt not being deleted when pressing 0 needs to be attached to an already open bug http://bugs.digium.com/view.php?id=7061. [Edit] This has no been committed to trunk by Russell on 05/01/06.
2. Other voicemail-related fixes need to be filed in a separate bug report.
3. A single patch file needs to be produced that only adds Polish support to voicemail. I will then remove previous versions of the patches.


By: Bartosz Supczinski (supczinskib) 2006-05-01 19:18:53

I did as you`ve suggested. I`ve created a new report in which I`ve put only fixes of voicemail bugs. Also I`ve created a separate patch that gives Polish language support to voicemail. Please delete the previous patches.

By: Bartosz Supczinski (supczinskib) 2006-05-05 18:54:44

I`ve prepared patches to the current /trunk and 1.2

By: Bartosz Supczinski (supczinskib) 2006-05-05 19:52:19

I`ve tested the one from /trunk and I had no complains.

By: Serge Vecher (serge-v) 2006-05-05 20:01:00

hmm, why is there a section of the patch titled

+ /* SWEDISH syntax */

By: Bartosz Supczinski (supczinskib) 2006-05-05 20:34:27

in this section ?

@@ -3810,15 +3854,49 @@

By: Russell Bryant (russell) 2006-05-05 21:05:44

Added to the trunk in revision 25159, thanks for the contribution!