All,

I have been playing with liquidSoap for the past few months for a Music on Hold stream generator for my PBX. I would like to automate this a little more though, by allowing me to dynamically change the playlists by month timeframes. As an example, I live in the US, so after November 26th, I would like to switch over to a holiday theme to the music, and after January first switch back to my normal. The same would apply with October 1-31st, and maybe expand that out as desired. What I do have right now in my script is:

set("log.file.path", "/var/log/asterisk/moh-liquid.log")
set("harbor.bind_addr","127.0.0.1")
set("harbor.port",8000)
set("harbor.password","anotherpassword")
set("server.telnet.port",1240)

emergency = single("/var/musiconhold/default.mp3")

day = playlist(mode="randomize", "/etc/asterisk/moh_playlist/day.pls")
night = playlist(mode="randomize", "/etc/asterisk/moh_playlist/night.pls")
evening = playlist(mode="randomize", "/etc/asterisk/moh_playlist/evening.pls")

radio = fallback([ switch([ ({0h-7h}, night),
        ({7h-18h}, day),
        ({18h-24h}, evening)
        ]), emergency])

output.icecast.mp3(
       radio,
       port=8000,
       mount="/moh",
       url="http://127.0.0.1";,
       description="Music on Hold Stream",
       host="127.0.0.1",
       password="securePass"
)




Looking at the structure I would think I can do something like using a switch inside of a switch, but I am unsure of how to move ahead with this. The other thing I can think of is having a cron job running that changes everything out during the times I set, but I see that as being rather cumbersome.


Thanks in advance,
Seann

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------

_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to