How I send PSTN (extension) call to FreePBX SIP extension automatically?

How can I make a call that is being forwarded from the legacy pbx hit the correct extension on FreePBX so that it goes to that person’s voicemail? For example: suppose there is an extension on the legacy pbx 2111. When someone calls the legacy 2111, if no answer, the call is (rolled over) transferred to FreePBX. Now on FreePBX, there is a SIP extension with the same number 2111. How can the transferred call (2111) automatically go to the the SIP extension 2111, so that a voicemail can be left?

Thanks in advance?

You would set up the legacy PBX to forward to a specific inbound route in the FreePBX. That inbound route would activate the desired FreePBX extension.

Really no different than setting up an inbound trunk.

Bill/W5WAF

Thanks so very much for your answer. I’m a complete newbie in this so, please excuse my greenness.

While I understand the inbound route, does it not mean the inbound route has to be from each of the zap trunks, which is where each POTS/PSTN number (line) is connected via the fxo port? If yes, then does it not restrict the number of extensions I can have, since on each zap truck you have to specify a channel (number)?

Here is my situation:

Let us say, I have a legacy pbx where there are 100 extensions. Presently, there is a very old unix based proprietary voicemail system that is interfaced with the legacy pbx. When an extension in this pbx is unavailable or busy, the call is transferred to the voicemail system where is connects to the corresponding extension/mailbox. The voicemail system, I believe have some fxo cards, and about 20 lines coming into it. Yet there over at least 100 mailboxes (extensions) on it.

Now if, I want to replace this voicemail system with AsteriskNow/FreePBX, are you suggesting that I will need 100 fxo ports coming in, so that each extension of the legacy pbx can be forwarded/routed to the correct extension on FreePBX? That doesn’t sound right to me, because I was talking to somebody the other day where this person told me that they have 50 SIP extension on their AssteriskNow, yet only 10 POTS/PSTN lines coming into it.

I hope I have been able to make myself clear. Thanks again.

You will have to find out how the FXO lines signal. The are called DID or Direct Inward Dial trunks. Your PBX sends the extension as part of the signaling, more than likely via DTMF.

The trunks can be either loop or wink started.

You can then use the inbound routes module to route the calls to the VM box.

If your PBX supports it you should also look at SMDI configuration so you can light the message waiting lamp.

Asterisk can be a VM replacement, however you need to understand your legacy system and how telephony works to accomplish the task.

I forget the actual telco “term” for this (could be over-subscribe) but it is a ratio thing.

Lets us say you have a single T1 with 23 Channels (23 Bearer + 1 Data) with which you can have 23 calls in or out. Not 23 calls in and out at the same time. However, an aggregate of 23 with 12 in and 11 out is possible. As is 1 in and 22 out or whatever. The 24th call is going to fail.

As a reference - same thing with 23 analog channels.

These 23 channels can potentially be over-subscribed to allow a 100 extension system to operate with no one getting a busy signal calling in or out… Because the number of simultaneous calls at any given time does not exceed 11 or so.

I have seen 500 extension systems run on a single T1. However, no one system is exactly the same as far as usage goes.

Sounds like they have gotten by with 20 channels, which I would investigate for any failure rate before you pass up a chance to widen the bandwidth.

Otherwise a 20/100 ratio may be perfectly acceptable.

I changed the T1 definition to from-internal instead of from-trunk (or from-pstn) in /etc/asterisk/zapata.conf (or chan_dahdi_custom.conf), then Asterisk treats the incoming calls as an extension and outbound rules apply.

You would set up the legacy PBX to forward to a specific inbound route in the >FreePBX. That inbound route would activate the desired FreePBX extension.

Really no different than setting up an inbound trunk.

Bill/W5WAF

Thanks for your reply. Since I’m new to the world of telephony, I must be failing to grasp things here. I tried what you suggest but it does not appear to function the way it would be expected.

I created a specific inbound route with a DID # 6743. This 6743 is actually an live extension on our legacy pbx (Centrex). I set the destination for 6743 to go to the voicemail of 6743 which also happens to be a SIP extension on freepbx. Now when I call 6743, from our regular phones (extensions on legacy pbx), if nobody answers 6743, it rolls over to 4398 which is a POTS line connected to my Sangoma FXO on channel 1. FreePBX answer the call but instead of sending it to the 6743 voicemail, it sends it to IVR.

Basically, what I need to accomplish is that any legacy PBX extension, when not answered, would be send to FreePBX, and FreePBX would send it to that matching extension’s voicemail.

I would greatly appreciate if you could be more specific. Thanks.