My Asterisk 1.8.0 (released) installation will not play MP3 files. This same installation will play 16-bit, Monaural, 8Ksample/Sec WAV files. It appears to me after spending many hours that the feature to play MP3 files is broken, or non-existent.
Anyone know how to make Asterisk 1.8.0 play MP3 files? The “mode” options in the musiconhold.conf file strongly suggest this should be possible…
; valid mode options:
; quietmp3 -- default
; mp3 -- loud
; mp3nb -- unbuffered
; quietmp3nb -- quiet unbuffered
; custom -- run a custom application
; files -- read files from a directory in any Asterisk supported format
Here is what I have/tried:
/var/lib/asterisk/mohmp3 # ll
total 36666
-rw-r--r-- 1 root root 2474709 2008-03-23 21:17 BeachBoys-CaliforniaGirl.mp3
-rw-r--r-- 1 root root 2597060 2008-03-23 21:17 BeachBoys-DontWorryBaby.mp3
-rw-r--r-- 1 root root 2705228 2008-03-23 21:17 BeachBoys-GodOnlyKnows.mp3
-rw-r--r-- 1 root root 2172845 2008-03-23 21:17 BeachBoys-InMyRoom.mp3
-rw-r--r-- 1 root root 3449687 2008-03-23 21:17 BeachBoys-Kokomo.mp3
-rw-r--r-- 1 root root 3512073 2008-03-23 21:17 BeachBoys-SloopJohnB.mp3
-rw-r--r-- 1 root root 3070653 2008-03-23 21:17 BeachBoys-WouldntItBeNice.mp3
extensions.conf:
exten => 27,1,Answer
exten => 27,2,MusicOnHold(default)
exten => 27,3,Hangup
musiconhold.conf:
[default]
directory=/var/lib/asterisk/mohmp3
mode=mp3
CLI> moh reload
CLI> moh show files
Class: default
File: /var/lib/asterisk/mohmp3/BeachBoys-SloopJohnB
File: /var/lib/asterisk/mohmp3/BeachBoys-CaliforniaGirl
File: /var/lib/asterisk/mohmp3/BeachBoys-DontWorryBaby
File: /var/lib/asterisk/mohmp3/BeachBoys-Kokomo
File: /var/lib/asterisk/mohmp3/BeachBoys-WouldntItBeNice
File: /var/lib/asterisk/mohmp3/BeachBoys-InMyRoom
File: /var/lib/asterisk/mohmp3/BeachBoys-GodOnlyKnows
CLI> moh show classes
Class: default
Mode: mp3
Directory: /var/lib/asterisk/mohmp3
Format: slin
After dialing the MOH -test- extension 27, I get the following on the console, and no sound:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [27@home:1] Answer("SIP/LINE2-0000000a", "") in new stack
-- Executing [27@home:2] MusicOnHold("SIP/LINE2-0000000a", "default") in new stack
-- Started music on hold, class 'default', on SIP/LINE2-0000000a
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-SloopJohnB does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-SloopJohnB': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-CaliforniaGirl does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-CaliforniaGirl': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-DontWorryBaby does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-DontWorryBaby': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-Kokomo does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-Kokomo': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/wav does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/wav': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-WouldntItBeNice does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-WouldntItBeNice': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-InMyRoom does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-InMyRoom': No such file or directory
[Dec 6 19:41:25] WARNING[26528]: file.c:648 ast_openstream_full: File /var/lib/asterisk/mohmp3/BeachBoys-GodOnlyKnows does not exist in any format
[Dec 6 19:41:25] WARNING[26528]: res_musiconhold.c:326 ast_moh_files_next: Unable to open file '/var/lib/asterisk/mohmp3/BeachBoys-GodOnlyKnows': No such file or directory
-- Stopped music on hold on SIP/LINE2-0000000a
== Spawn extension (home, 27, 2) exited non-zero on 'SIP/LINE2-0000000a'