Use FreePBX for Cellphone Voicemail - One DID, Multiple Cellphons

Hi,

Does anyone know if this scenario is possible?

  1. Have one DID as the “access” number;
  2. Change conditional call forwarding on multiple cellphones to point to the “DID access number”.
  3. When a call is forwarded from the cellphone to the DID (e.g., if no answer or out of service), FreePBX through an inbound route knows which voicemail box to route the call to.

Thanks

It should be possible, depending on what CallerID is presented from the cellphone company when the phone in question is not answering. Assuming the presented CallerID matches the actual number of the cellphone, and assuming your FreePBX incoming lines have CallerID detection enabled, you can create one inbound route for each cellphone number, define the expected CallerID in the inbound route and route the call accordingly.

The issue is my cell provider (and I think most cell providers) pass through the originating caller … so the caller-ID coming in is always different.

I don’t understand the problem, unless you are confusing CID (Caller ID from the calling phone) and DID (the number you dial to call).

Calling into a DID is easy.
Setting up an inbound route based on Caller ID and DID is easy.
Sending the call to an extension is easy.
Sending the call to the associated VM box is easy.

If you want to manipulate the Caller ID, there’s a special function for that called “SetCallerID”. That’s easy to use too.

At this point, I don’t know which part of this relatively simple process you’re having trouble with. I suspect that the problem is that you aren’t familiar with the CID option on the Inbound Route, which you can then route to almost anywhere.

Assuming this is true, you might need to do a SIP DEBUG to see what other information we can glean from the call. There’s no way around what the cell phone and associated carrier send, so we might have to do some creative context work on the way in. There should be other headers sent with your SIP traffic that tell you what phone was actually called in the first place.

I think you didn’t understand my question (or maybe I wasn’t clear, but in any event…). I can accomplish what I want to do by having a unique DID for each cellphone. That part is easy.

What I want to do is have one DID for multiple cellphones. Somehow the call would be routed to the correct voicemail box based on the cellphone’s DID - not the incoming callerid (which would be the callerid from the person calling the cellphone, that is passed to FreePBX by my SIP trunk, voip.ms).

I will try the SIP debug and see what’s being passed through.

The problem you describe is intractable unless the SIP DEBUG passes more information than just the Caller ID and the incoming DID (which would be the DID on the FreePBX server).

DID means something very specific, and the way you are using it is confusing. The DID of your cell phone is only meaningful on your cell phone, and we have no control over that. We have control of the DID in FreePBX and we can work with the Caller ID that is passed by your provider. Using the term DID in conjunction with the phone that is calling your PBX

There are several other SIP headers that might be of interest to us. For example, there is a SIP header called (IIRC) P-Asserted-ID, which may give us more information about where the call was routed from. I don’t know if we’re going to get any good information to help you from the SIP DEBUG, but we can certainly try.

What you need is RDNIS; see https://www.voip-info.org/rdnis/ . On a SIP trunk, the forwarding number and reason are placed in the Diversion header. The incoming INVITE From header contains the number of the original caller (as usual), the Diversion header has the number from which the call was forwarded and the To header contains your DID number (as usual).

Most (though not all) providers support RDNIS. I’m not a VoIP.ms customer and don’t know whether they do, but you can determine this with a simple test. At the Asterisk command prompt type
sip set debug on
for chan_sip or
pjsip set logger on
for pjsip.
Make a forwarded test call into your system and check the Asterisk log for a Diversion header.

If no luck, open a ticket with VoIP.ms and ask whether they can enable it.

My US DIDs are with AnveoDirect and RDNIS is fully supported. They also provide the P-Asserted-Identity header which gives the calling number if blocked by *67 or per-line blocking (though it’s of no use against spoofers). I don’t know whether their Canada DIDs support RDNIS, but suspect that they do; open a ticket with them if that’s of interest.

But it’s not his SIP carrier that is doing the call forward. It’s his cell phone so his cell carrier would need to pass that information.

Sure, it’s true that for RDNIS to work, both forwarding and forwarded-to carriers must support it. However, the OP stated that he’s using VoIP.ms so it’s reasonably certain that his system is in US or Canada. Given that VZ, AT&T, T-Mo, Sprint, Bell, Rogers and Telus all support RDNIS, I decided to chance a simplified answer.

This is really helpful information. A bit of digging and, unfortunately it doesn’t look like voip.ms supports RDNIS - but can switch to Anveo for this.

Question. How would you define the inbound route in FreePBX to take into consideration the RDNIS information? Doesn’t look like anything in the GUI gives that functionality.

That has been my experience as well.

You need a block of custom dialplan. Examine the existing context from-pstn-toheader for ideas, it basically does the same thing for the To: header:

*CLI> dialplan show from-pstn-toheader
[ Context 'from-pstn-toheader' created by 'pbx_config' ]
  '_.' =>           1. NoOp(Attempting to extract DID from SIP To header) [extensions.conf:127]
                    2. gotoif($["${CHANNEL(channeltype)}"="SIP"]?SIP) [extensions.conf:128]
                    3. gotoif($["${CHANNEL(channeltype)}"="PJSIP"]?PJSIP) [extensions.conf:129]
                    4. NoOp(Unable to determine SIP channel type) [extensions.conf:130]
                    5. goto(from-pstn,${EXTEN},1))                [extensions.conf:131]
     [SIP]          6. Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1) [extensions.conf:132]
     [PJSIP]        7. Goto(from-pstn,${CUT(CUT(PJSIP_HEADER(read,To),@,1),:,2)},1) [extensions.conf:133]

-= 1 extension (7 priorities) in 1 context. =-
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.