Repetitive page, "facility lockdown"

I need to implement a functionality into a FreePBX system, I know there will probably be some degree of custom dialplan needed but I’d like to use as much native functionality as possible.

So basically a user dials the activation code (lets say 26669) an announcement will play to page group 302 once every 5 minutes until such time as 26669 is dialed again. There also needs to be a visual indication that the feature is active by way of programming it into a BLF button on a phone/phones (so the blf button would be unlit until the feature is activated, and then it would either illuminate or blink when the feature is active… not just during the announcement itself but in total until the feature is deactivated). I should also be able to just press the BLF key to activate/deactivate the function instead of manually typing 26669. The page group will not be held open during the whole period (ie. it will deliver the announcement and disconnect) since it is very possible that manual instructions would need to be paged out manually as well during the duration of the event.

There would be the possibility of paging out (once) a different announcement to the same page group when the feature is de-activated… but that’s not as critical.

The goal of the feature is to give an easy way to trigger a repetitive announcement that the facility is on lockdown and deliver some instructions on what to do. The de-activation announcement (if implemented) would basically just say that the lockdown is over, go about your lives. Obviously we’ll use some sort of restriction to limit which extensions are allowed to access this feature (though every extension should be able to monitor the status of the hint/BLF).

Any suggestions or thoughts as to the best way to tackle this implementation?


P.S. It also strikes me that it would be nice if this could be implemented in a way that it could also be triggered by a script… in a slightly different usage scenario to allow it to be triggered by external monitoring/automation (ie. a trigger from the fire alarm system).

Sounds to me like you’ve got about 90% of it done.

The BLF is pretty easy. Just set up a custom context that turns the hint off and on.

The one “new” piece is the repetition - I don’t think there’s anything in the GUI to set that up… unless…

This is ridiculous, but it’s kind of what you want:

Record your message. Create a custom announcement that starts with 3 second of silence (I think it’s called silence/3) + your announcement recording + the longest silence file you can find (silence/30 maybe?, I haven’t looked).

Set up the custom context so it plays your announcement and loops back while the value of the hint is true. You might even be able to do it with something like a queue, where the announcement file is the “on-hold” music for that extension.

Short of just coding it up as a custom context, you could start with that and see what pieces you need to add.

Is the for a school?

The announcement/silence loop was my first thought. The only problem is that the paging circuit absolutely has to be freed up between iterations of the announcement… such that other pages could be made in the meantime. And I don’t think that method would allow for this.

Bob, it’s for an office facility actually… but the concept could apply equally well to a school, shopping mall or anywhere else a repetitive announcement might need to be triggered in an easy manner.

i asked because we have used Bell Commander for a number of schools. it supports emergency lock down, bells, schedules, etc.

I would run a cron job every minute or five that would "activate’"a “call-file” only when your “hint” is active or your “external alarm” was active, something like this;

if [[ “$(/usr/sbin/rasterisk -x ‘core show hint 26669’ )” =~ InUse ] || [ (your external alarm script was triggered) ]];then ln /var/lib/asterisk/bin/yourcallfile /var/spool/asterisk/outgoing/;fi

where /var/lib/asterisk/bin/yourcallfile does the nasty, you would need to build that file . . . .

I would suggest that the initial trigger either way should be asynchronous. but would do the same thing with the call file.


Thanks Bob will definitely bookmark that product for future projects.

Awesome Dicko… that looks like a great solution, looks like it should do just what I need without too much pain in implementation.