Scheduled rotation of MOH in Incredible PBX 13

casm23

New Member
Joined
Aug 16, 2017
Messages
11
Reaction score
0
Been trying to figure this one out for a couple of days, and am having zero luck. Google is not really helping, either.

What I'm looking to accomplish is changing the MOH that a caller hears based on time of day and day of week. Pretty simple, but the functionality does not appear to be part of Incredible PBX nor am I digging up a module that might be able to do this.

For anyone wondering, I'm trying to set up an unattended info line for an event. The idea is that the info line would have its own MOH category with multiple recordings made for different times of day, which would rotate on an appropriate schedule. By routing inbound calls to Terminate Call: Put caller on hold forever, this would make it dead simple for someone to call in and hear the message intended for that particular time of day.

(Yes, I'm aware that someone could call in and effectively perform a denial of service of the info line by not hanging up. In this case, I'm not too concerned about that happening.)
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
1st thought GUI way: Route to time condition(s) and then to the appropriate announcement.

1sth thought hacker way - a cron job to copy the appropriate message into the designated moh folder. If hourly is good enough then something like: cp /root/hourlymessages/Hour-$(date +%H).wav /var/lib/asterisk/moh/hourly/currentmessage.wav ; asterisk -x 'moh reload'
 

casm23

New Member
Joined
Aug 16, 2017
Messages
11
Reaction score
0
1st thought GUI way: Route to time condition(s) and then to the appropriate announcement.

1sth thought hacker way - a cron job to copy the appropriate message into the designated moh folder. If hourly is good enough then something like: cp /root/hourlymessages/Hour-$(date +%H).wav /var/lib/asterisk/moh/hourly/currentmessage.wav ; asterisk -x 'moh reload'

Funnily enough, the cron job was pretty close to what I had come up with as a first thought :)

Having said that, routing to time conditions would make more sense. I think I need to do some more investigation of how I can use them; somehow, that thought had crossed my mind but I didn't really piece it together as being possible. Think this might be a case of not seeing the forest for the trees.
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top