Multiple DID / CID on 1 extension


We are a new Freepbx Distro 1.812.210.57-1 user and have a sip trunk with a DID trunk number say 123456700 to 123456709.

We would like to register a PBX with 1 trunk (=extension 700 on the FreePBX.

A incomming route was created on FreePBX for the did’s and forwarded to extension 700.

The PBX does recieve all the calls (number 700 to 709) but not the DID. PBX recieves only 700, even when a call is made to 123456709.

Is there a way to configure this on freepbx so we can route call to extensions and groups on the PBX?

And of course, can this also work for outsides call (multiple outgoing did with 1 registration on freebpx)

If understood correctly, you should go at the inbound routes and add as DID 12345670X and destination 700. That should work for incoming.

For outbound, you need to be able to choose the DID you want to call outside?


We have already got this inbound rule.

The problem is that the destination (ext) only see incomming calls for 700 = extension number (and not the DID number). So it is not possible to reroute from the destination based on the DID.

The situation we woul’d like is to register ext 700 and not only recieve the call but also the DID called so we can reroute.


Lets say I call 123456701. What will happen?

Extension 700 rings. Only does not know that 123456701 is called.

Did you create an inbound route for EACH DID?

No, one inbound rule to forward all did’s to ext 700

Inbound route: any did / any CID -> ext 700

Ext 700: Assigned DID/CID: any did / any CID

Try to add the route I said

Inbound route:

DID Number: 12345670X
Set Destination: Extension -> 700

Save and apply settings.

Okay, delete your wildcard entry and set up a inbound route for EACH DID. Put the number the provider is sending (probably the 10 digit DID) in the DID field, leave CID blank. Then you can chose the destination for each in the dropdown toward the bottom.

This is not wat we want. All DID must go to the same destination.
Destination must know what did was called so reroute based on DID is possible from that destination.

Try making your context in the trunk setup from-pstn-toheader, it is possible that your SIP Provider is putting the DID in a different part of the SIP header. You may also find you need to add trustrpid=yes and sendrpid=yes to your trunk setup.

Can you have your SIP provider send you 10 digits instead of 3?

I’m obviously misunderstanding:

If all calls are routing to the same extension how can the PBX reroute them. And to where? VM if not answered, a ring group?

If all calls ring on one extension (line key) and are manually rerouted, do you simply need an indication of which DID was called? In that case create a separate inbound route for each DID and simply enter a Route Prefix (for example the last 4 digits)

Either way, I believe you need a separate route for each DID. Otherwise, a better explanation of what you are trying to accomplish.

My sip provider sends a invite [email protected]_freepbx_ip
Freepbx has in incomming route with destination Extension 700
Freepbx sends to device a invite [email protected]_internal_extension

What we want is to register extension 700 and that freepbx sends a invite [email protected]_internal_extension.

When our provider sends a invite [email protected]_freepbx_ip the freepbx must send [email protected]_internal_extension the the same registered device (ext 700) and not a invite [email protected]_internal_extension
So we can register 1 device to freepbx and revieve more did’s from Freepbx using a single registration.

We tried (under connectivity -> trunks) to add from-pstn-toheader in the USER context and added trustrpid=yes sendrpid=yes under peer details.

No results, i’m not sure that we did that correctly.