PJSIP and 911 location

Searching trying to find the “most up to date” method of dealing with clients that have 1 extension number registering from 3 different physical office locations, using PJSIP. Need to pass the correct e911 info if 911 is dialed from any of the offices.

PJSIP extensions with address location

Here is how we solved this issue, using Yealink phones.

  1. Create an e911 DID, per location, that is properly registered with the correct physical address of each unique location.

  2. Create a unique EPM template per physical location. Each template has a dial string change in the basefile with its “designator”. Meaning this: Location 1 is 10, location 2 is 20, etc. We then make the following basefile edits:

     dialplan.replace.replace.1 = 10911
     dialplan.replace.prefix.1 = 911
     dialplan.replace.replace.2 = 10933
     dialplan.replace.prefix.2 = 933
     dialnow.item.1 = 911
     dialnow.item.2 = 933
    

    This tells the phone, if a user dials 911 (or 933 for test) change what is sent to the PBX to be 10911 for the location 1 template (location 2 would be 20911, location 3 would be 30911, etc)

  3. Create an outbound route for only 911 and 933 dialed calls, per location. So, emergency outbound route for location 1 looks for 10911 or 10933 only, in the accepted dial patterns. That route is NOT marked Emergency in the route settings, this allows us to specify the outbound caller ID for the whole route. We then specify the “Route CID” to be the e911 specified DID as the outbound caller ID number (using the DID we setup in step 1 with the correct physical address, for that location, in e911). We replicate this for all other locations, looking for 20911 in the next route, etc.

  4. We specify the dialnow variable for 911 and 933 that ensure a user dialing just 911 or 933 allows the call to immediately process without the need to have the user pressing dial, #, etc.

It takes a small bit of planning and detail, but it does provide for multiple correct e911 data being transmitted for the same extension that has physical devices located across multiple physical offices.

2 Likes

I didn’t know this was possible with Yealink phones. Nice work, I’m going to implement this on my phone and test it out since this would solve a problem that we’ve had with PJSIP contacts and e911.

Configure your PBX to assign Emergency Location Identification Numbers (ELINs) to each physical office location and map them to the corresponding extension numbers. This allows for accurate e911 routing when 911 is dialed from any office.

This doesn’t solve the problem presented in this post. The issue is that PJSIP can have multiple contacts that register from different physical locations, but the extension can only have a single emergency caller ID. You can’t inherently assign multiple emergency caller IDs to individual PJSIP contacts

In the US now we have Kari’s Law and Ray Baum’s Act that need to be complied to. This basically makes it so the 911 is bound to the actual device not the extension. Having an extension with only one device makes it easy, having an extension with multiple devices makes it harder. Additionally, you just can’t send the general location details unless the location is small enough to meet those requirements.

If Phone A is at a location and it’s on the second floor in an office, the 911 location for Phone A must send the exact location down to FL2 RM104. If Phone B is at another location that is just a small open space, maybe one office space then you can send just the standard location details. If Phone C is actually at the same location as Phone A but on the first floor you need to have Phone C send the location down to FL1 RM10.

It doesn’t matter if extension 100 has 3 devices connected to it and they are all in the same building on different floors or in different locations within the building. All three need to have specific locations based on where the device is actually sitting.

So there are quite a few things to keep in mind when thinking about how to come up with a solution for this. One other thing to keep in mind not everyone uses DIDs to deal with their 911 locations, Dynamic Location Routing has been a thing since the new 911 laws have been in place.

Again, the key here now for those trying to do Kari’s Law/Ray Baum’s is the 911 details are not an extension thing, they are a device thing. So the 1-to-many thing has been a monkey wrench in FreePBX logic for a while now.

Oh yeah, hot desking. I would need to see what is happening in FreePBX but now if I log into a phone at another location…the 911 details of the phone should not change it should not use the 911 details of whatever extension is logged into said phone.

Hot desking is only possible in FreePBX (barring any custom dialplan) by using Sangoma Phones or Device and User mode. I can’t speak to how the Sangoma phones do it, but Device and User mode has a value for emergency caller ID set for each device, so it doesn’t matter which user logs in.

The original point of this post is to solve a problem that FreePBX has not solved, which is what to do if you have multiple registrations on the same PJSIP extension. This is caused by the fact that an extension can only have 1 emergency caller ID, but PJSIP can have multiple contacts.

1 Like

This is not cut and dry. You could have 4 phones sitting in a bullpen all registered to extension 100. In that case all of those phones can use the same 911 location because they are in the same location. You can have 10 phones in an building with 5 offices but all the offices exit into one room that is the ingress/egress for the entire building. Again, you can have the same location for all the phones.

This is more an ICB situation and there is no global solution for it. Just because PJSIP can allow multiple contacts on a single AOR doesn’t mean everyone will use that feature. It is something that will be determined by each deployment needs/requirements. It is up to the PBX admin to determine what are the best options for their deployment. There are a lot of factors in play here from legal requirements (size of building, placement of phones, ingress/egress), multiple locations, multiple users sharing an extension and even what kind of phones are being used and what they support.

One method would be use switch to Auth User/ID for authentication which should allow the device to register against the AOR in question but allow the From user to be unique and you could play with the headers coming on on the INVITE to identify the phone (each phone have its own From User but share the Auth User). That can get messy and requires the phones to play nice as well.

Another method is to give each user their own extension, have both on the phone. Again, this will depend on the phones capabilities but most decent ones should allow what was shown in the early post and force specific digits to go out a specific account. The secondary account doesn’t even need a line appearance on the phone. It just needs to be the account used when the digits 911/933 are entered. Then it will use that specific extension’s emergency caller id.

Again, this is more a PBX admin issue that needs a solution based on that specific deployment and legal requirements for 911.