E911 Notification - Dashboard widget / Email / SMS text / Paging

Hello! I want to share a quick story with you first. Emergency services responded to a 911 call made at our resort, but they were unable to pinpoint the room from which the emergency call was made. While I was able to very quickly figure out what room the person called from, it exposed a real issue with the liability of using FreePBX in a commercial environment. Specifically, how 911 calls are made and what happens after the call is made.

What I am proposing is a few helpful additions to FreePBX to ensure it’s commercial success in the marketplace, and really give it a popular feature set that will keep customers (and attorneys) happy.

First, on the FreePBX dashboard, can we get a “Who called 911?” widget that shows from what extension and the time the call was placed, and perhaps a link to the recorded call (if call recording is enabled.) Maybe there could be a blinking light next to the widget or maybe the whole widget can blink until the 911 notification is acknowledged on the dashboard? Perhaps the user acknowledging the E911 call from the FreePBX Dashboard will also be logged? Most of this info can be generated from the CDR Report when the Destination is specified for 911.

Secondly, can some sort of alert be generated via SMS to the manager on duty or owner/operator of the business, or to on property first responders or even the on-duty lifeguard or something? It would be nice to not have a patron lay dying in a room until emergency services show up which could be 15-30 minutes later.

And lastly, if there is a building operator or front desk, can that ring group get a call regarding the 911 call placed and from what room and time of call?

As a bonus, it would be nice if the dashboard widget had a link to a zipped log file that would show that on-property staff made every effort possible to help the 911 caller receive help, and when the case shows up in court that the log file could be submitted as evidence.

If we can do something like this, it would be a huge win for FreePBX in the commercial realm and for Open Source technology in general.

Thank You all for reading, and I am anxiously waiting to hear a response! The faster this gets outlined into a project, the faster we can provide a bounty on this project.

1 Like

We’ve actually covered this ground before. Last Spring (IIRC) we had a long discussion about handling E911 calls from various perspectives. Most of the stuff you want was laid out in that thread. The only thing that apparently didn’t get done was a ticket to add these features to the system.

Thank you for the quick reply! Any chance you could point me at that thread?

Search for “E911” in the search tab. It should be one of the long ones from last year.

Found it - the relevant information was covered here. Thank you cynjut!

This part you can easily accomplish via some custom dial plan code.
Put this into extensions_custom.conf:

[macro-dialout-trunk-predial-hook]
exten => s,1,ExecIf($["${OUTNUM}"="911"]?System(echo "Ext ${AMPUSER} - ${AMPUSERCIDNAME} just placed a 911 emergency call on ${STRFTIME(%C%m%d%y%H%M)}" | mailx -r "[email protected]" -s "911 Alert from ext ${AMPUSER} - ${AMPUSERCIDNAME}" [email protected]))
exten => s,n,MacroExit()

In above example, on a 911 call, an email will be sent to “[email protected]”, which is to a Verizon SMS gateway, that will deliver a SMS to cell number 1234567890. Most carriers should have those SMS gateways. You can send the alert to an email or a cell phone. You can add more email recipients, just have the addresses separated by space.

The email/sms will say what extension/user dialed 911 at what time.

5 Likes

Nice! I can even drop it in via the Admin > Config Edit page. Now if only there was an E911 configuration page…

Not an advertisement, but VOIP Innovations announced (a few weeks ago) that they have implemented a new SMS service that might help with this. Note that I know nothing more about it than that (I haven’t needed an SMS solution for anything but my cell phone). From the marketing fluff I read, it should be possible to send an SMS to almost anyone in the world through their gateway.

Old thread but I’ll try a reply…

So, avayax, if someone wanted to text more than 1 number at more than 1 carrier, would they simply edit the 2nd line and copy/paste as many times as they needed to? Or is the 3rd line required per time?

You don’t need to add any lines.
If you want to send to multiple addresses, just have those separated by space.
E.g.
[email protected] [email protected]
and so on.

1 Like

Marvelous!

I must be doing something wrong… .it’s complaining that the application delimiter is now the comma, not the pipe. But I’m not trying to delimit, I’m trying to pipe through mailx!

Does System no longer support piped commands?

Double check your ‘quoting’ , what is the exact dialplan in question ?

exten => s,1,ExecIf($["${OUTNUM}"="xxxxx"]?System(echo "Ext ${AMPUSER} - ${AMPUSERCIDNAME} just placed a 911 emergency call on ${STRFTIME(%C%m%d%y%H%M)}" | mailx -r "[email protected]" -s "911 Alert from ext ${AMPUSER} - ${AMPUSERCIDNAME}" [email protected]))

(mydomain is of course my actual domain, and xxxxx is my cell phone # for testing)

I think that it’s parsing the pipe symbol as part of the execif, instead of as part of the system command… so maybe I need to “finish” the execif and pass to system, so that it passes the pipe symbol as part of the complete system command?

This is the error I’m getting:

[2018-10-24 12:09:18] WARNING[14422][C-00017b14] pbx.c: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (ExecIf(0?System(echo “Ext 3068 - Greg Baughman just placed a 911 emergency call on Wed Oct 24 12:09:18 2018” | mailx -r "[email protected]" -s “911 Alert from ext 3068 - Greg Baughman” [email protected])))

Well, I’ve been researching this for the past couple of hours… and it seems it’s an unresolved bug that goes back like 5 years.

Of course. Because I’m always the one to find these obscure little things.

If anyone knows of another way; mailx won’t let you specify a mail body (so you can’t just pass it a parameter); however, I could tell it to send it WITHOUT a body, and eliminate the first part before the pipe symbol.

It looks like a bug in the parser, however, that it sees the pipe symbol and dumps out instead of just passing the command on to the OS. I even tried encapsulating the whole thing in single quotes, double quotes (switching the doubles to singles inside) and so forth.

I tried mailx << “some text”
I tried “some text” >> mailx
… it really won’t work without piping, and piping is broken if you execute a system command from the dialplan.

You can ignore that error. It’s still gonna work with pipe.

I think you’re right, but there should be a way to make that work correctly. One thing you can try include “&&” instead of the pipe.

Another would be to set up a script that executes both of these with arguments.

But it doesn’t work.

If I type the command on the command line, it works fine. I immediately get a text.

It doesn’t work when it’s within the dialplan.

That’s not the same thing. && would execute both commands, but it wouldn’t redirect the output of the echo command into the mailx command (the purpose of piping commands)