File ulawstream does not exist in any format

My setup used to work just fine, but I recently shut down my GCP instance. Now upon booting it back up, when I have the caller go to Music on hold, it hangs up (nothing plays). To clarify, if I change extensions.conf to play the please-try-call-later sound file, it plays fine. Here is what happens in the console:

    -- Executing [12225551234@from-siptrunk:1] Verbose("PJSIP/siptrunk-00000000", "1,Playing livestream.") in new stack
 Playing livestream.
    -- Executing [12225551234@from-siptrunk:2] Answer("PJSIP/siptrunk-00000000", "") in new stack
       > 0x7fe354021830 -- Strict RTP learning after remote address set to: 81.201.85.52:18500
    -- Executing [12225551234@from-siptrunk:3] ExecIfTime("PJSIP/siptrunk-00000000", "20:00-23:59,sun,,?Playback(silence/1&please-try-call-later&silence/1)") in new stack
    -- Executing [12225551234@from-siptrunk:4] ExecIfTime("PJSIP/siptrunk-00000000", "0:00-23:59,mon-sat,,?Playback(silence/1&please-try-call-later&silence/1)") in new stack
    -- Executing [12225551234@from-siptrunk:5] ExecIfTime("PJSIP/siptrunk-00000000", "0:00-14:54,sun,,?Playback(ulawstream)") in new stack
[Jan  9 12:59:52] WARNING[1878][C-00000001]: file.c:789 ast_openstream_full: File ulawstream does not exist in any format
[Jan  9 12:59:52] WARNING[1878][C-00000001]: file.c:1262 ast_streamfile: Unable to open ulawstream (format (ulaw)): No such file or directory
[Jan  9 12:59:52] WARNING[1878][C-00000001]: app_playback.c:497 playback_exec: Playback failed on PJSIP/siptrunk-00000000 for ulawstream
    -- Executing [12225551234@from-siptrunk:6] ExecIfTime("PJSIP/siptrunk-00000000", "14:55-17:10,sun,,?MusicOnHold(ulawstream)") in new stack
    -- Executing [12225551234@from-siptrunk:7] ExecIfTime("PJSIP/siptrunk-00000000", "17:11-17:54,sun,,?Playback(silence/1&please-try-call-later&silence/1)") in new stack
    -- Executing [12225551234@from-siptrunk:8] ExecIfTime("PJSIP/siptrunk-00000000", "17:55-19:59,sun,,?MusicOnHold(ulawstream)") in new stack
    -- Executing [12225551234@from-siptrunk:9] Hangup("PJSIP/siptrunk-00000000", "") in new stack
  == Spawn extension (from-siptrunk, 12225551234, 9) exited non-zero on 'PJSIP/siptrunk-00000000'

Here is what is in musiconhold.conf:

[ulawstream]
mode=custom
dir=/var/lib/asterisk/mohmp3-empty
application=/etc/asterisk/mohstream.sh

mohstream.sh:

#!/bin/bash
/usr/bin/wget -q -O - https://domain.example.com/audio.mp3 | /usr/bin/madplay -Q -z -o raw:- --mono -R 8000 -a -12 -

extensions.conf

[from-siptrunk]
exten => 12225551234,1,Verbose(1,Playing livestream.)
same => n,Answer
same => n,ExecIfTime(20:00-23:59,sun,,?Playback(silence/1&please-try-call-later&silence/1))
same => n,ExecIfTime(0:00-23:59,mon-sat,,?Playback(silence/1&please-try-call-later&silence/1))
same => n,ExecIfTime(0:00-14:54,sun,,?Playback(silence/1&please-try-call-later&silence/1))
same => n,ExecIfTime(14:55-17:10,sun,,?MusicOnHold(ulawstream))
same => n,ExecIfTime(17:11-17:54,sun,,?Playback(silence/1&please-try-call-later&silence/1))
same => n,ExecIfTime(17:55-19:59,sun,,?MusicOnHold(ulawstream))
same => n,Hangup()

Assuming that you haven’t changed the standard paths, does your file show up with ls /var/lib/asterisk/sounds/*.ulaw ?

I haven’t changed any paths.

ls: cannot access '/var/lib/asterisk/sounds/*.ulaw': No such file or directory

I navigated to /var/lib/asterisk/sounds and with there, there’s a folder en. Within the en folder, there’s lots of .gsm files. But I don’t remember there every being any .ulaw files within the sounds directory? Just the en folder?

The sounds directory is for Playback. The files here are being referenced from musiconhold.conf, although I haven’t used streaming MP3 feeds, myself, so I can’t validate the musconhold.conf configuration.

It was my extensions.conf configuration. I changed to my old configuration:

[from-siptrunk]
exten => 12225551234,1,Verbose(1,Playing livestream.)
same => n,Answer
same => n,MusicOnHold(ulawstream)
same => n,Hangup()

And it worked and didn’t hang up on me. As I was typing this out, I suddenly realized… that I’m dumb. Lol. Since I was testing, I changed one of the silence/1&please-try-call-later&silence/1 to ulawstream, but failed to also change Playback for that line to MusicOnHold. So what was happening was Playback was trying to play a file, because that is what Playback does. It plays files. I wanted it to play my musiconhold.conf. So I changed Playback to Musiconhold on the appropriate line, and now it works.

I had read what david551 said, but because he didn’t “spell it out” what I did, I didn’t clue in.

If you want to play some sound data, Playback() is the solution and the files are from one of the subdirectories of the sound directory. gsm is awful, in case you have only these files. You can download the other files. The details depend on how you installed Asterisk. You can install them as part of “make install” or download them manually.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.