As I see not many people know how to resolve this issue,
so i descided to go in the route of using chat.gpt. Together we came up with this system:
I add the songs to the system recordings and name them smh like Song1-
then I make announcements wth descripition the same name of the song and then i choose the recording as the song and destination is set to hangup.
Afterwards I go to configuration file editor and to extensions_custom.conf and add this code:
[from-custom-mp3-playback]
exten => s,1,Answer()
exten => s,n(start),Background(custom/Song1) ; Plays first song
exten => s,n,WaitExten(10) ; Wait for DTMF input for 10 seconds
exten => s,n,Background(custom/Song2) ; Plays second song
exten => s,n,WaitExten(10) ; Wait for DTMF input for 10 seconds
exten => s,n,Background(custom/Song3) ; Plays third song
exten => s,n,Hangup()
; DTMF input handling for skipping tracks
exten => 1,1,Goto(s,start+1) ; Press 1 to skip to the next song
For this to be called by my VoIP phones i create a custom extension for example 6001 and set the dial to: local/s@from-custom-mp3-playback
This works in the sense of playing each song one by one with a 10sec pause in between. The issue i’m having now is that I can’t skip songs via pressing number one on my phone instead of going to the nother song it just disconnects me.
The next option I tried using was IVRs like this: IVR name is set to something like MusicPlayer_1 and the announcment is set to Song1
the timeout destination is set to a nother IVR wich is set the same way but the difference is that its Song2 an MusicPlayer2… Than i configure a IVR entry like this: digits 1, destination IVR MusicPlayer_2 .
To connect that to the phone I add a custom extension for exmp. 6000 and set the dial to: local/MusicPlayer_1@from-internal
I thought that this sounds more promising but instead of connecting me to the IVR the phone starts beeping as if the extension was offline or smh…