Summary:ASTERISK-07184: MP3Player command has stopped functioning in new upgrade
Reporter:caribou7 (caribou7)Labels:
Date Opened:2006-06-16 01:36:40Date Closed:2011-06-07 14:07:59
Versions:Frequency of
Description:We did a fresh install of Trixbox today (updating an Asterisk@Home install), including running the upgrade script so that everything should be up to date.  What we found is that everything works as before EXCEPT that in custom contexts were we had used the MP3Player command, the command now fails to play the file.  Music-on-Hold still works, however.

Here is what the log shows:
Jun 16 02:18:28 VERBOSE[14883] logger.c:     -- Executing MP3Player("SIP/250-74ca", "/tmp/foo.mp3") in new stack
Jun 16 02:18:28 DEBUG[14883] channel.c: Set channel SIP/250-74ca to write format slin
Jun 16 02:18:29 DEBUG[14883] rtp.c: Ooh, format changed from unknown to ulaw
Jun 16 02:18:31 NOTICE[14883] app_mp3.c: Poll timed out/errored out with 0
Jun 16 02:18:31 DEBUG[14883] app_mp3.c: No more mp3
Jun 16 02:18:31 DEBUG[14883] channel.c: Set channel SIP/250-74ca to write format ulaw
Jun 16 02:18:31 DEBUG[14883] pbx.c: Launching 'System'
Jun 16 02:18:31 VERBOSE[14883] logger.c:     -- Executing System("SIP/250-74ca", "rm /tmp/49457.mp3 -f") in new stack
Jun 16 02:18:31 DEBUG[14883] pbx.c: Launching 'Hangup'
Jun 16 02:18:31 VERBOSE[14883] logger.c:     -- Executing Hangup("SIP/250-74ca", "") in new stack

Note that this same exact command worked perfectly prior to the upgrade, and it now fails whether called from extensions_custom.conf as part of a custom extension context, or from an agi script.  In other words, it might be called this way:

exten => 210,5,MP3player(/tmp/foo.mp3)

Or in a Perl AGI file, like this:


And in all such cases it worked before the upgrade, but doesn't work now. What is surprising to me is that Music on Hold works great, but no other MP3 playback does.


In the interim (until this is fixed) it would be helpful to me if someone could explain the fastest and best way to convert an MP3 file to a file that Asterisk will play using the Playback() command.  I tried using Lame, which *will* decode to a .wav file, but not one that Asterisk will play.

Alternately, if there is another way to play an MP3 file back to a caller (not using MP3Player), it would be helpful if someone could explain that.
Comments:By: caribou7 (caribou7) 2006-06-16 03:46:54

Discovered after more testing that you can use the Playback command instead of MP3player as long as you don't include the .mp3 extension in the filename.  It appears that mpg123 is not installed with TrixBox (they use the format_mp3 module instead) and because of this the MP3player command is non-functional.

By: Serge Vecher (serge-v) 2006-06-16 10:22:50

caribou7: remember, that this an Asterisk bug tracker, not the Asterisk@Home/Trickbox bug tracker. The requirement for mpg123 for MP3Player is clearly documented here
http://www.voip-info.org/wiki/view/Asterisk+cmd+MP3Player (which is a community documentation effort for Asterisk in addition to the code itself).

For future reference, please rememeber that the bug-tracker is a place to report bugs (which are clearly defined malfunctions of the code or undocumented features) and not a place to request support or information (I'm referring to your notes in 'Additional information'). If you require support or help or think you have found a bug in _Asterisk_ but need to "run it by somebody else", please use the asterisk-users list or #asterisk or #asterisk-bugs channels on IRC. Since you are running Trickbox, your main point of contact should be support channels provided by that project.

Thanks and good luck.