Forwarding calls in the evening

I have an install of FreePBX that is working great. I am using an AudioCodes MP-118 FXO to take 8 POTS lines, and I use them for the incoming and outgoing calls. They are all in one group.

Now, the client wants to tie an 800 number to the local phone number on port 8, and have the ability to forward calls that come in on that 800 number to a cell phone after hours.

How would I (or do I need to) create a separate trunk just for port 8 on the AudioCodes, and configure it in FreePBX? I would like for that line/trunk to ring the phones just like the main trunk during regular hours. And someone will manually forward that 800# line (on port 8 of the audiocodes) to a physician that is on call for that night.

Any help would be much appreciated.


There will not be an 800 number associated, if that even makes a difference.
They are going to publish the phone number that is plugged in on port 8 as the number to call for a special service.

That number will need to be forwarded (manually by the receptionist) each evening to a cell phone of the doctor that is on call.


There are a few special cases in this scenario:

  1. You are using DAHDI, so you don’t get an inbound DID for the inbound route.
  2. You can remove line 8 from the G0 and make it part of a single extension group G1. Note that this isn’t something you can switch up “on the fly” because DAHDI is actually outside both FreePBX and Asterisk.

If you weren’t using DAHDI for this (and I really don’t recommend it) you could make this a LOT simpler and probably cheaper if you went with a SIP provider for your 800 service. I have several 800 numbers that cost me A LOT less than land-line 800 services, I’m talking 5% of the old costs…

Once you get line 8 differentiated, you have to specify the incoming context, which I would recommend writing specifically to handle the hint (for the forward) and the transfer of the call to your cell phones.

It’s all doable, but I do believe you are going to find that this is, by far, the hardest way to do this.