maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   Asterisk Voicemail: wav49 codec (https://talk.maemo.org/showthread.php?t=44539)

paulkoan 2010-02-15 08:11

Asterisk Voicemail: wav49 codec
 
Hello,

Asterisk can send its voicemail email attachments in wav, ogg or wav49 formats. Wav49 is compressed and works out of the box on Windows and Linux, which means I can get my email on any workstation I happen to come across without having to install anything.

Maemo 5 doesn't understand wav49, even with the extra codecs pack.

Has anyone else got this working, or have suggestions?

Thanks,

Paul

lma 2010-02-15 10:28

Re: Asterisk Voicemail: wav49 codec
 
Feel free to vote for bug 4252.

paulkoan 2010-02-15 10:43

Re: Asterisk Voicemail: wav49 codec
 
GSM isn't wav49 and GSM doesn't work out of the box with Windows without additional codec installs.

So it doesn't meet my requirement.

lma 2010-02-15 10:56

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by paulkoan (Post 527097)
GSM isn't wav49

No, GSM is a codec while WAV is a container format. However so-called "wav49" is 8KHz GSM under the WAV encapsulation. See also bug 6724 and http://en.wikipedia.org/wiki/Wav.

Quote:

and GSM doesn't work out of the box with Windows without additional codec installs.
No idea what works on Windows, sorry.

pelago 2010-02-16 16:58

Re: Asterisk Voicemail: wav49 codec
 
Can you maybe upload one of those voicemail files that is compressed and works out of the box on Windows, then someone can analyse it to check the codec?

uk-david 2010-03-04 11:04

Re: Asterisk Voicemail: wav49 codec
 
1 Attachment(s)
If you go into the Asterisk voicemail configuration file (/etc/asterisk/voicemail.conf on a regular Asterisk or /opt/asterisk/etc/voicemail.conf if you're running Asterisk on the N900 itself) you will find a line in the [general] section that looks like this:

format=wav49|gsm|wav

Change it to:

format=wav|wav49|gsm

In order to get Asterisk to work with this new configuration, get on to your Asterisk command line and issue the following command:

*CLI> module reload app_voicemail.so

...and you should now find that your voicemail attachments will play on the N900 media player.

One more thing: The first time you do this you may experience continual repetition of the message, as (for whatever reason) the media play comes up in auto-repeat mode (coloured blue when on) - pictured below.

All you need to do is touch the auto-repeat symbol to turn it off (the symbol will go white) and this setting will be remembered for the future.

So now your Asterisk voicemails should playback perfectly!

BTW - these files should also play on desktops (Windows tested successfully) so this appears to be an all-round solution.

lma 2010-03-04 11:33

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by pelago (Post 529953)
Can you maybe upload one of those voicemail files that is compressed and works out of the box on Windows, then someone can analyse it to check the codec?

Sorry, I didn't see your post until now. Did that a while ago, see the aforementioned bug 6724. Note: I have no idea whether that works out of the box in Windows.

Quote:

Originally Posted by uk-david (Post 555304)
format=wav49|gsm|wav

Change it to:

format=wav

When you change the format in voicemail.conf you need to convert pre-existing stored voicemails manually on the server. It would be better to just rearrange the order so what wav comes first (the first format listed is the one used for email notification).

Quote:

...and you should find that your voicemail attachments will play on the N900 media player.
Except now the attachements are huge, which is probably not what you want (if you receive voicemail there's a high chance you're on the road with a slow/expensive GPRS connection).

pelago 2010-03-04 11:33

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by uk-david (Post 555304)
format=wav49|gsm|wav

Change it to:

format=wav

Very useful information. Although it would still be nice if it was possible to make "wav49" work on N900, for those who cannot change the Asterisk config.

paulkoan 2010-03-04 11:50

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by pelago (Post 555335)
Very useful information. Although it would still be nice if it was possible to make "wav49" work on N900, for those who cannot change the Asterisk config.

And for those who can indeed change the asterisk config but do not want voicemail files the size of a building - wav is uncompressed.

uk-david 2010-03-04 12:12

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by lma (Post 555334)
Except now the attachements are huge, which is probably not what you want (if you receive voicemail there's a high chance you're on the road with a slow/expensive GPRS connection).

Agreed Ima - it would be better to have a smaller codec in use.

Maybe (until we get GSM on the N900) a quick change to the out-going voicemail announcement saying "Leave a message, but keep it short!" is in order ;-)

lma 2010-03-04 12:30

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by uk-david (Post 555367)
it would be better to have a smaller codec in use.

In a perfect world we'd be using speex (compresses/sounds better than GSM, is BSD-style licenced so should work everywhere and is officially supported on Fremantle), but sadly asterisk doesn't have a format_speex.so yet :-(

paulkoan 2010-03-04 13:58

Re: Asterisk Voicemail: wav49 codec
 
In a perfect world we would use an open licensed compressed codec that came pre-installed on the majority of platforms.

This is the essence of my first query. While I want to be able to hear the voicemail on my n900, I also want to be able to hear it on any old machine that I happen across and can get to my email with. And the vast majority of those will be Windows, and will not have uncontained gsm or speex codec installed. They will however be able to decode wav49, as do most linux distros out of the box.

So the fastest if not best route to getting a cross platform compressed voicemail format for asterisk that will work with the n900 is to get the n900 to support wav49

pelago 2010-03-04 15:07

Re: Asterisk Voicemail: wav49 codec
 
What exactly is wav49? Can you point to a good source documenting it?

timwatt 2010-03-04 15:32

Re: Asterisk Voicemail: wav49 codec
 
I think I have fount the problem as to why my .wav voice mails that arrive by e-mail wont play.

On my n810 I installed MPlayer and was able to play them with out a problem, don't now how to use the command line version of Mplayer and KMPlayer doesn't play my Voicemail .wav files.

Excuse my ignorance but cant a codec be added or included with something like the "Extra Decoders Support" Application?

fred123 2010-03-04 16:10

Re: Asterisk Voicemail: wav49 codec
 
I this any help

Also known as MS GSM apparently

Notes about building gsm plugin for Gstreamer

A simple java applet that allows users to play GSM audio files from their web browser, with source code

paulkoan 2010-03-04 21:54

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by pelago (Post 555569)
What exactly is wav49? Can you point to a good source documenting it?

Ima seems to know:

http://talk.maemo.org/showthread.php?t=44539#4

whats_up_skip 2010-03-04 22:20

Re: Asterisk Voicemail: wav49 codec
 
So glad I stumbled on this thread, I have been going nuts trying to find a solution to this problem. At least I now know there is no good solution available at the moment.

Hopefully the codec can be added to the N900.

Shouldn't we be adding a bug report or feature request to have the codec added?

paulkoan 2010-03-05 00:11

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by timwatt (Post 555606)
On my n810 I installed MPlayer and was able to play them with out a problem, don't now how to use the command line version of Mplayer and KMPlayer doesn't play my Voicemail .wav files.

Aah, perfect. Should have thought of this myself.

I just changed /usr/share/applications/defaults.list and modified x-wav to load up hildon-kmplayer.desktop rather than hildon-mediaplayer.desktop

Now wav files are loaded in kmplayer, and I have altered the player for these to mplayer and now wav49 voicemails work perfectly.

Thanks...

lma 2010-03-05 06:41

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by whats_up_skip (Post 556154)
Hopefully the codec can be added to the N900.

Shouldn't we be adding a bug report or feature request to have the codec added?

One already exists, feel free to vote for it (but please avoid "me too" comments).

uk-david 2010-03-05 18:06

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by paulkoan (Post 556226)
Now wav files are loaded in kmplayer, and I have altered the player for these to mplayer and now wav49 voicemails work perfectly.

How do you alter the player to mplayer?

Thanks in anticipation.

paulkoan 2010-03-05 20:46

Re: Asterisk Voicemail: wav49 codec
 
When you click the wav file and it launches in kmplayer, keep the file highlighted in km and open the km menu (clicking the titlebar). There is an option to select player there.

whats_up_skip 2010-03-07 04:23

Re: Asterisk Voicemail: wav49 codec
 
Quote:

Originally Posted by paulkoan (Post 556226)
I just changed /usr/share/applications/defaults.list and modified x-wav to load up hildon-kmplayer.desktop rather than hildon-mediaplayer.desktop

How did you do this?

paulkoan 2010-03-07 05:56

Re: Asterisk Voicemail: wav49 codec
 
Install gainroot if you haven't, then type "root" to get into root mode.

Then
Code:

vi /usr/share/applications/defaults.list
Edit the entry for x-wav as above (note, in vi, key 'x' to delete a letter, key 'i' to get into insert mode, key 'esc' to exit insert mode. ':wq' to write and quit).

Or just install leafpad and do
Code:

leafpad /usr/share/applications/defaults.list
and edit it with a familiar gui.

whats_up_skip 2010-03-07 09:57

Re: Asterisk Voicemail: wav49 codec
 
Thanks for the detailed instructions.

I got it work!

whats_up_skip 2010-06-10 00:44

Re: Asterisk Voicemail: wav49 codec
 
This was all working fine until I did the reflash for PR1.2.

I made the changes to the file as per above and it now opens the correct player but it does not play the file. When I click on play or the file it briefly flashes and that's it. There is no actual playing of the file.

Any ideas?

paulkoan 2010-06-10 01:18

Re: Asterisk Voicemail: wav49 codec
 
Try saving the file to disk and playing it with mplayer

mplayer <filename>

If this works, then it is probably some issue with kmplayer. If it doesn't work, then the error message should provide some insight.


All times are GMT. The time now is 10:08.

vBulletin® Version 3.8.8