How do I add music on hold files?

phinphan

Active Member
Joined
Oct 19, 2007
Messages
641
Reaction score
130
I have tried to add some mp3 files by converting them to 8 bit wav files but am having no success getting them to play. Can anyone suggest the right tool to use to convert an mp3 file to the correct wav format and then the steps to get PBXiaF to recognize it.

Thanks in advance.

I will make a $20.00 donation to PBXiaF in the name of whoever provides the solution to this problem!
 

phinphan

Active Member
Joined
Oct 19, 2007
Messages
641
Reaction score
130
I have tried using Audacity to make a short clip and save as an 8bit or 16 bit wav file and upload through the freepbx page. I get an error saying that the lame command was not found or something like that. I can add the files manually but they still do not work.
 

phinphan

Active Member
Joined
Oct 19, 2007
Messages
641
Reaction score
130
Thanks for the suggestion. I did the lame install and I still get the same error [error precessing: "sh: lame: command not found"

I will give the sox command a try.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
When you type lame at the command prompt, do you get a "command not found" error? If so, the yum install didn't work. Just do it again. If lame is installed, then there appears to be something else missing in the script you're using that isn't being reported. Here's what I get when I type lame at the command prompt:
Code:
[COLOR=Lime]root@pbx:~ $[/COLOR] [B]lame[/B]
LAME 32bits version 3.97 (http://www.mp3dev.org/)

usage: lame [options] <infile> [outfile]

    <infile> and/or <outfile> can be "-", which means stdin/stdout.

Try:
     "lame --help"           for general usage information
 or:
     "lame --preset help"    for information on suggested predefined settings
 or:
     "lame --longhelp"
  or "lame -?"              for a complete options list
 

phinphan

Active Member
Joined
Oct 19, 2007
Messages
641
Reaction score
130
When I install lame this is the result:

root@pbx:~ $ yum install lame
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
mondorescue 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Parsing package install arguments
Nothing to do

So I guess the lame install did not work. Oh well. Back to the drawing board.
 

phinphan

Active Member
Joined
Oct 19, 2007
Messages
641
Reaction score
130
Google is my friend... Google is my friend... Google is my friend...
 

phinphan

Active Member
Joined
Oct 19, 2007
Messages
641
Reaction score
130
Darmock - you are the bomb. Google is my friend. Now on to make another $20 "donation" to NV.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
FreePBX Seems to want LAME by Default -

To install LAME: yum install lame

Or, try sox. You can read all about it in this Nerd Vittles article.

FreePBX seems to expect LAME to be in place. Perhaps it should be included in the standard install. In the other hand, perhaps making it available via update scripts is wiser. In that way, you might choose to offer support for LAME and some other way to accomplish the same thing.

Getting the RPM worked fine by the way - and thank you - as always - for making this info available!
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
The problem is the licensing of the MP3 codec. Because mp3 is "owned" by a company in germany you MUST pay a licensing fee to them to use it. The lame software has reverse engineered the mp3 codec and made an "interface" so MP3 encoded material can be used. If you read the licensing of the lame software it is to be used for "educational purposes" only. Any other use is illegal (especially in North America where the software police monitor your every move)

So technically if you live in North America you are breaking the law even using this piece of software. Watch out for the Software police... they drive black vans with parabolic antennas on the roof ... the masquerade as Television news vans... or Direct TV installers
:beatdeadhorse5:

Seriously this is why all of the major linux distributions do not include lame and make the user download it.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Why not just drop your MOH in as wav files - the format it needs to be in is "the file must be PCM Encoded, 16 Bits, at 8000Hz</SPAN>:" to quote FreePBX

I use wavepad from NCH to do the conversions on my Windows PC. It's free software, if a little stilted unless you upgrade, but good enough.

oe
 

Calunker

New Member
Joined
Jan 21, 2008
Messages
24
Reaction score
0
Ironic that when I Googling for an answer for this problem I ended up here. Google was my friend and you were too. Thanks for the help.

rick
 

jaray

Member
Joined
Dec 17, 2007
Messages
71
Reaction score
0
I fought getting mp3's onto my box as well through http. Always complained the file size was too big in php.ini. Increasing that didn't even work, so I simply used an scp client (WinSCP) and manually transfered a full length mp3 directly into /var/lib/asterisk/mohmp3. Voila...the file showed up on the music on hold webpage and it works great.
 

Members online

Forum statistics

Threads
25,810
Messages
167,754
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top