Help with setting up a update line

Hi guys

My goal is to setup a system where the administrators can call a extension, record a message and the PBX will call a list of staff members cellphones, staff members can callback and listen to emergency update, then the system will play a beep and play the next message.

So I am thinking of something like the below

exten => s,n,Record(custom-updates/update%d:ulaw)
exten => s,n,Wait(2)
exten => s,n,Playback(please-wait)
exten => s,n,System(cp /etc/asterisk/custom-updates/ /tmp/)
exten => s,n,System(mv /tmp/ /var/spool/asterisk/outgoing/)
exten => s,n,Playback(thank-you)

Assuming this part should be working fine, I did not test it yet.

The callfile will call a couple of cellphones and ring for 5 seconds. I don’t want to give them an option to play the message, because of the outbound minute usage, they should rather call back and listen to the updates.

Now, this is the challenging part.

I want that once they callback:

  1. It should start playing the newest file in /custom-updates/ (being that each recording/file gets a new/higher number) once done, play a beep, and then the next, beep, next etc.
  2. When a caller presses a specific number it should go to the next file.

Thanks for any tips

Could be way off here, but just throwing this out there.

It sounds like to me to want to create something similar to, but a scaled down voicemail system. In your case you want a single user to be able to leave a message, and then others dial in and listen to it. Voicemail already gets you all this, and more (users can rewind message, skip to next, etc…)

I think this should be doable using the app_voicemail module and properly configuring the voicemail system and necessary dialplan. I’ll leave it to you to comb through all the settings to verify if it’s possible for your use case, but here is just an idea:

Modify the VM greetings and such to empty or whatever you like. Have each person subscribe to that mailbox, but only the one extension can dial in and leave a message, etc…

Here’s a neat way to build a list of files and iterate through them.

same => n,Set(FILES=${SHELL(ls -tm /var/lib/asterisk/sounds/custom-updates)});
same => n,While($[!${ISNULL(${SET(FILE=${SHIFT(FILES)})})}])
same => n,NoOP(File is ${FILE})

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