Playback(): File ... does not exists in any format


#1

Hello there,
I would like to execute the following simple dialplan:

[default]
[users]
exten => 200,1,Answer()
exten => 200,n,WaitExten(5)
exten => 1,1,Playback(/var/lib/asterisk/sounds/en/digits/1)
exten => 1,n,Hangup()

However, after someone calls extension 200 and presses digit 1, the following log is dumped:

  == Using SIP RTP CoS mark 5
    -- Executing [200@users:1] Answer("SIP/100-00000000", "") in new stack
    -- Executing [200@users:2] WaitExten("SIP/100-00000000", "5") in new stack
  == CDR updated on SIP/100-00000000
    -- Executing [1@users:1] Playback("SIP/100-00000000", "/var/lib/asterisk/sounds/en/digits/1") in new stack
[Oct 28 18:03:28] WARNING[20519]: file.c:653 ast_openstream_full: File /var/lib/asterisk/sounds/en/digits/1 does not exist in any format
[Oct 28 18:03:28] WARNING[20519]: file.c:959 ast_streamfile: Unable to open /var/lib/asterisk/sounds/en/digits/1 (format 0x4 (ulaw)): Resource temporarily unavailable
[Oct 28 18:03:28] WARNING[20519]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/100-00000000 for /var/lib/asterisk/sounds/en/digits/1
    -- Executing [1@users:2] Hangup("SIP/100-00000000", "") in new stack
  == Spawn extension (users, 1, 2) exited non-zero on 'SIP/100-00000000'

Naturally, the .gsm file exists:

and I accept gsm in sip.conf:

[general]
port=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=gsm

Do you have any ideas what to check now?


#2

Then the sound files are automatically assumed to be in /var/lib/asterisk/sounds/en (unless otherwise overridden in asterisk.conf).
The path Playback is looking for is relative to there.
So…
Playback(digits/1)


#3

Unfortunately, when I use only:

[default]
[users]
exten => 200,1,Answer()
exten => 200,n,WaitExten(5)
exten => 1,1,Playback(digits/1)
exten => 1,n,Hangup()

as you advise, I receive the following log (reporting failure):

  == Using SIP RTP CoS mark 5
    -- Executing [200@users:1] Answer("SIP/100-00000002", "") in new stack
    -- Executing [200@users:2] WaitExten("SIP/100-00000002", "5") in new stack
  == CDR updated on SIP/100-00000002
    -- Executing [1@users:1] Playback("SIP/100-00000002", "digits/1") in new stack
[Oct 29 12:14:40] WARNING[6136]: file.c:653 ast_openstream_full: File digits/1 does not exist in any format
[Oct 29 12:14:40] WARNING[6136]: file.c:959 ast_streamfile: Unable to open digits/1 (format 0x4 (ulaw)): Resource temporarily unavailable
[Oct 29 12:14:40] WARNING[6136]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/100-00000002 for digits/1
    -- Executing [1@users:2] Hangup("SIP/100-00000002", "") in new stack

If anyone has got any other idea, please share it with us in this topic.


#4

Solved!
I follow noautoload policy so that I need to explicitly specify what modules are loaded.
I have not loaded any func_ and format_ modules.
It was the reason.
I guess I needed to load apart from codec_gsm.so also format_gsm.so.