Alert System for a School

Hello there,
I am trying to get an alert system for a school running but I don’t quite get into Asterisk, so I thought I’d ask for help.

So here is what I got and what I’m trying to accomplish:

We got an external SIP Provider
A FreePBX with Asterisk 13 running on a local server
An internal SIP phone
A bunch of Ubiquiti AP AC Edu devices

Extension to stop alerts
Different alerts:
-Each alert has an own Extension
-When Extension is called, repeat a soundfile until stop extension is called

The Extensions have to be callable from both the internal SIP phone as well as from the outside.

The setup is done, what’s missing is the dialplan since I totally lack the experience with Asterisk.
I welcome every hint and partial or complete solution.

Huge thanks in advance.

If you are using FreePBX, you need to ask on their forum, as FreePBX is likely to limit what you can do.

On bare Asterisk, use Originate to start the call, store the channel number in a global variables so that the stop extension knows where to find it to hang it up. then use the Page application. You will typically need to use a local channel on the outgoing side of the originate, because you will probably have to run Page on that.