Music on hold files can't load

I configured followings on extensions.conf

[tower]
exten => s,1,Wait(3)
exten => s,2,Answer()
exten => s,3,NoOp(${CALLERID(all)})
exten => s,4,NoOp(${CALLERID(num)})
;exten => s,5,Dial(Zap/6,60)
exten => s,5,SetMusicOnHold(tower)
exten => s,6,Background(fpm-calm-river)
exten => s,7,WaitExten(30)
exten => s,8,Dial(Zap/6,60)
exten => s,9,Hangup

musiconhold.conf

[default]
mode=files
directory=/var/lib/asterisk/moh
random=yes

[tower]
mode=files
directory=/var/lib/asterisk/moh
random=yes

zapata-channels.conf

;;; line="4 WCTDM/0/3"
signalling=fxs_ks
allow=ulaw
callerid=asreceived
disallow=all
rxgain=1.0
txgain=1.0
group=0
context=tower
channel => 4
;context=default

When I dial to phone number connected to FXO port, got following WARNING message can’t play music.

I found that Asterisk trying to load music file from /var/lib/asterisk/sounds directory not from /var/lib/asterisk/moh directory.

-- Starting simple switch on 'Zap/4-1'

[Jan 13 13:27:19] NOTICE[12327]: chan_zap.c:6376 ss_thread: Got event 18 (Ring Begin)…
[Jan 13 13:27:21] NOTICE[12327]: chan_zap.c:6376 ss_thread: Got event 2 (Ring/Answered)…
– Executing [s@tower:1] Wait(“Zap/4-1”, “3”) in new stack
– Executing [s@tower:2] Answer(“Zap/4-1”, “”) in new stack
[Jan 13 13:27:24] DEBUG[12327]: chan_zap.c:2781 zt_answer: Took Zap/4-1 off hook
[Jan 13 13:27:24] DEBUG[12327]: chan_zap.c:1457 zt_train_ec: Engaged echo training on channel 4
– Executing [s@tower:3] NoOp(“Zap/4-1”, “”" <>") in new stack
– Executing [s@tower:4] NoOp(“Zap/4-1”, “”) in new stack
– Executing [s@tower:5] SetMusicOnHold(“Zap/4-1”, “tower”) in new stack
– Executing [s@tower:6] BackGround(“Zap/4-1”, “fpm-calm-river”) in new stack
[Jan 13 13:27:24] WARNING[12327]: file.c:568 ast_openstream_full: File fpm-calm-river does not exist in any format
[Jan 13 13:27:24] WARNING[12327]: file.c:871 ast_streamfile: Unable to open fpm-calm-river (format 0x44 (ulaw|slin)): No such file or directory
[Jan 13 13:27:24] WARNING[12327]: pbx.c:5700 pbx_builtin_background: ast_streamfile failed on Zap/4-1 for fpm-calm-river
– Executing [s@tower:7] WaitExten(“Zap/4-1”, “30”) in new stack
pbx*CLI>

Where can I change directory for music on hold files?

Thanks

Anyone provide me suggestion?

Anyone provide me suggestion?

To start a MOH (MusicOnHold) it is not Background, it’s:
StartMusicOnHold(class);

so try:
exten => s,5,StartMusicOnHold(tower) instead of your Background.

Also, which specific version of Asterisk are you using (show version) ?

I am using Asterisk-1.4.17 on Debian 4.0 (Etch).

pbx:/home/balgaa# asterisk -r
Asterisk 1.4.17, Copyright © 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

Connected to Asterisk 1.4.17 currently running on pbx (pid = 4675)
Verbosity is at least 3
pbx*CLI>

Is it mean Background() command didn’t use musiconhold.conf?

How can I to configure music file for Background() command?

Or I need to copy all music files into /var/lib/asterisk/sounds?

/var/lib/asterisk/sounds/custom

put your file here and use Bakcground(custom/filename)
cheers

smaikol

Thanks, I got it. I don’t understand why there create /var/lib/asterisk/moh directory.