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()