I cannot play any of the sound files I placed in /var/lib/asterisk/sounds/en/ and I don’t know why. How can I fix this?
Version: Asterisk 16.16.1~dfsg-1+deb11u1 built by nobody @ buildd.debian.org on a unknown running Linux on 2021-08-09 06:48:31 UTC
My custom file called invalidnumber.wav is mono 8khz 16-bit PCM and works in Asterisk 13.15.0 in the same directory. By doing module show I can see these are loaded:
- format_wav.so
- format_wav_gsm.so
When I dial an invalid number I get an error on the console. I have also tried with the audio files in /var/lib/asterisk/sounds/custom and just in /var/lib/asterisk/sounds/
[Dec 13 12:46:39] == Using SIP RTP CoS mark 5
[Dec 13 12:46:39] > 0x7f3d44007830 -- Strict RTP learning after remote address set to: 192.168.1.79:32762
[Dec 13 12:46:39] -- Executing [0900@tests:1] NoOp("SIP/test1-00000000", "Language: en") in new stack
[Dec 13 12:46:39] -- Executing [0900@tests:2] Set("SIP/test1-00000000", "CHANNEL(LANGUAGE)=en") in new stack
[Dec 13 12:46:39] -- Executing [0900@tests:3] NoOp("SIP/test1-00000000", "Language: ") in new stack
[Dec 13 12:46:39] -- Executing [0900@tests:4] Goto("SIP/test1-00000000", "external,0900,1") in new stack
[Dec 13 12:46:39] -- Goto (external,0900,1)
[Dec 13 12:46:39] -- Channel 'SIP/test1-00000000' sent to invalid extension: context,exten,priority=external,0900,1
[Dec 13 12:46:39] -- Executing [i@external:1] Playback("SIP/test1-00000000", "beeperr&invalidnumber") in new stack
[Dec 13 12:46:39] > 0x7f3d44007830 -- Strict RTP switching to RTP target address 192.168.1.79:32762 as source
[Dec 13 12:46:39] -- <SIP/test1-00000000> Playing 'beeperr.gsm' (language 'en')
[Dec 13 12:46:39] WARNING[37903][C-00000001]: file.c:789 ast_openstream_full: File invalidnumber does not exist in any format
[Dec 13 12:46:39] WARNING[37903][C-00000001]: file.c:1262 ast_streamfile: Unable to open invalidnumber (format (ulaw)): No such file or directory
[Dec 13 12:46:39] WARNING[37903][C-00000001]: app_playback.c:497 playback_exec: Playback failed on SIP/test1-00000000 for beeperr&invalidnumber
[Dec 13 12:46:39] -- Executing [i@external:2] NoOp("SIP/test1-00000000", "Language: en") in new stack
[Dec 13 12:46:39] -- Executing [i@external:3] Hangup("SIP/test1-00000000", "") in new stack
[Dec 13 12:46:39] == Spawn extension (external, i, 3) exited non-zero on 'SIP/test1-00000000'
When I do core show sounds I get a long list of the built-in audio but I cannot see these anywhere on disk even if I do find / vm-unknown-caller
modules.conf
----------------------
[modules]
autoload=yes
asterisk.conf
----------------------
[directories]
astcachedir => /tmp
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /usr/share/asterisk
astagidir => /usr/share/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin
[options]
;verbose=6
;debug=6
timestamp=yes
runuser=asterisk ;the user that Asterisk should run as
rungroup=asterisk ;the group that Asterisk should run as
maxload=5.0 ;the maximum load average (“1.0” per core) before calls are rejected
minmemfree=128 ;the minimum amount of memory before calls are rejected
maxcalls=120 ;the maximum number of simultaneous calls before calls are rejected
hideconnect=yes ;hide "Remote UNIX connection" messages
defaultlang=en
dialplan
----------------------
[tests]
exten => _0.,1,NoOp(Language: ${CHANNEL(LANGUAGE)})
same => n,Set(CHANNEL(LANGUAGE)=en)
same => n,NoOp(Language: ${LANGUAGE})
same => n,GoTo(external,${EXTEN},1)
same => n,HangUp()
[external]
exten => i,1,Playback(beeperr&invalidnumber)
same => n,NoOp(Language: ${CHANNEL(LANGUAGE)})
same => n,HangUp()
directory listing
----------------------
root@asterisk02beta:/var/lib/asterisk/sounds/en# ll
total 224K
drwxr-xr-x 2 asterisk asterisk 4.0K Dec 13 12:10 .
drwxr-xr-x 4 asterisk asterisk 4.0K Dec 13 12:10 ..
-rw-r--r-- 1 asterisk asterisk 61K Nov 26 10:00 callfailed.wav
-rw-r--r-- 1 asterisk asterisk 50K Nov 19 14:39 dialtelephonenumber.wav
-rw-r--r-- 1 asterisk asterisk 26K Dec 7 11:01 extension-not-found.wav
-rw-r--r-- 1 asterisk asterisk 38K Nov 22 12:35 invalidnumber.wav
-rw-r--r-- 1 asterisk asterisk 31K Nov 26 10:30 premiumbarred.wav
The beeperr works but invalidnumber fails. This box is currently in early setup so has no outside connections and it can play wav files because I’ve copied over our hold music which is in the same format and that works.