Feature Request - Extension Module PJSIP Different CID and Emergency CID based on Contact or some method of endpoint distinguisher

I would love to see the Extension Module allow PJSIP endpoints to use different outbound CID and Emergency CID based on Contact number(Or some unique identifier maybe like MAC address).

Example:
Extension 101 has max contacts set to 3
Endpoints:
101-1 At Site A
101-2 At Site B
101-3 At Site C

Thus, the Extension Module provides a total of 6 Outbound CID Fields for extension 101 to be filled out appropriately

Contact 101-1
Outbound CID:
Emergency CID:

Contact 101-2
Outbound CID:
Emergency CID:

Contact 101-3
Outbound CID:
Emergency CID:

Result: Respective CID is honored and used based on endpoints assigned contact number making outbound call.

I have seen other users attempt and discuss solutions for this before. It would be very useful to have the ability to give different Outbound CIDs/Emergency Outbound CIDs based on the SIP Contact number assigned to the the specific Endpoint. In my circumstance, as it relates to the Ray Baums Act we currently use a DID-based solution, of giving every extension a unique Emergency Outbound DID. Over the stretch of the thousands of endpoints I have a considerable handful of users that wish to retain the same extension number while working at multiple work sites.

I would be appreciative to hear form others in the community as to their thoughts on this, as well hearing from Sangoma representatives to hear what the likelihood of something like this being looked into or, implemented is.

This is IMO not needed.

Set up extension 101 at site A, 1012 at site B, and 1013 at site C.
Enable Follow Me for ext. 101 so it rings 101, 1012 and 1013.
Set CID Num Alias for 1012 and 1013 to 101.
Set Outbound CID and Emergency CID for each extension as desired.

This scheme also has the advantage of better logging – the CDRs will show from which device calls are placed, and which device answers them.

I appreciate your opinion @Stewart1. Back in the Chan SIP days that was just about the only way to accomplish a similar task. But, why not leverage PJSIP’s ability to support multiple endpoints? It’s ability to do such is at least partially if not fully intended for just that, rather than needing to create a new entire extension(s)? On a system that already has hundreds of extensions, I also feel like this is quite a bit more resource friendly.

Also if you use commercial EPM its interesting to note I believe Sangoma P and S series phones support a similar, but different feature. My understanding is that if a phone is used as a Hotdesk you can statically assign the Emergency CID by associating the phones MAC to an appropriate DID, presumably ignoring the respective extension setting of user that is “hot desking”. I mean could the same logic not be applied to any endpoint in general, just not brand specific?

As far as the logging goes, I feel like that also “could” be addressed like the userfield tab if not simply implementing the contact “-X” in the extension display.

The way I see it is with a new version FreePBX I suppose I hunger for new innovative features that simplify tasks, improve efficiency, and keep FreePBX growing and relevant to how people want/need to communicate.

You are conflating two things here. The ability to have multiple contacts and the requirements of Ray Baum’s. Additionally, your ask it about your specific setup in general which isn’t how everyone else is going to be.

First, generally when you have three users sharing extension 100 they all don’t have individual Outbound CallerIDs because they are all sharing extension 100. So a lot of scenarios won’t require multiple outbound callerIDs equal to the amount of contacts registered to the AoR.

Second, Ray Baum’s is about the location of the actual endpoint and not what extension is registered to. I could have three people sharing 100 all on the same floor, area or space and thus I only need to present the 911 location based on (in your case) a single DID. They can all share the same emergency callerID. If you hotdesk to another extension, again the Ray Baum’s is about the location of the device so the location hasn’t changed. Does the other extension have the same Emergency 911 or different?

Third, the idea that you can use the IPs for each contact because they’ll be on different subnets or public IPs is not going to go far either when every device is on the same subnet. There could be 3 contacts registered to 100 but in physically different parts of the building all requiring their own location entry. They’ll have different IPs (as long as these are phones and not FXS gateways because then they could all have the same IP of the gateway).

The real solution is that the devices need to support something that will identify them for this. Unfortunately it’s not something they do right now and even if some start to support it…we all know people have 10 year old phones that wouldn’t. Luckily though there is one field all these devices would have in common, even on a FXS gateway, for each account…the From Name. Here is how I have solved this:

I use the From Name setting on the devices and I give it an unique name. So 100-1, 100-2, 100-3 or whatever works for you. I make sure all the extensions trust the inbound callerid which means it accepts whatever is presented instead of using the callerid= in the endpoint config. I then do a lookup in AstDB for that From Name in custom family tree I made and it gets that devices details. I use Dynamic Location Routing which is a lot more flexible than the DID method. So basically I have something like this in AstDB:

DLR/DEVICE/100-1/emergency_cid and DLR/DEVICE/100-1/location_id so when a 911 call comes in I just do a look up for the From Name and get those two fields. The CallerID is updated with the emergency_cid (which is actually a 32 character string) and I add a GeoLocation SIP header that using the location_id.

So again, a proper solution for this will require the devices to support it. Or support adding customer headers or sending a MAC during an INVITE that you might be able to use. However, making a solution revolving around IPs or even callid’s (which change on a regular basis) is not the best option and will require more hackery than really needed. Not saying my solution is a bit hackey but I’m using a standard SIP header field that devices all use.

2 Likes

Also, FreePBX should look in to actual Dynamic Location Routing support because it exists and multiple carriers do offer this solution for 911.

1 Like