FreePBX | Register | Issues | Wiki | Portal | Support

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

(Robert White) #1

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.

(Dave Burgess) #2

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.

(Robert White) #3

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

(Dave Burgess) #4

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

(Robert White) #5

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

(Avayax) #6

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

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 "" -s "911 Alert from ext ${AMPUSER} - ${AMPUSERCIDNAME}"
exten => s,n,MacroExit()

In above example, on a 911 call, an email will be sent to "", 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.

(Robert White) #7

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

(Dave Burgess) #8

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.

(EK) #9

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?

(Avayax) #10

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

(EK) #11


(Greg) #12

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 ?

(Greg) #14
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 "" -s "911 Alert from ext ${AMPUSER} - ${AMPUSERCIDNAME}"

(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?

(Greg) #15

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 "" -s “911 Alert from ext 3068 - Greg Baughman”

(Greg) #16

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.

(Avayax) #17

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

(Dave Burgess) #18

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.

(Greg) #19

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.

(Greg) #20

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)