Inbound route depending on dahdi port

Hi, we have a dahdi card with 4 ports

is there any way to have an inbound route that if the call come on the port 3 … goes to extension x?

the only way i have to identify call is by physical port


  1. Create a trunk based on the dahdi channel
  2. Create an inbound route rule that uses the trunk.

Here’s some webpages that discuss it.

K, but i don’t see any option in inbound route about specific trunk …

i see routes based on cid, did, but not trunk …

On the FreePBX side menu, look for an item called “Zap Channel DID’s”. This allows you to set an inbound number (perhaps the directory number of the dahdi trunk) so that you can route the inbound calls from that trunk into your dial plan inbound routes based on the inbound number you have set for the trunk.


May I suggest that you don’t steer readers off to pages that are not related to solving the answers being asked?

If you believe that those pages answer the user’s question, then you probably need to go back and update the information so that it is correct. For ZAP/DAHDI channels, the trunk configuration in FreePBX has nothing to do with the inbound routing. (Though that may change in the near future…)


To add to kenn10’s answer. You will need to make sure that your DAHDI channel has “context=from-zaptel” and that FreePBX is running in DAHDI compatibility mode. (See amportal.conf options if not).

Until 2.8 there is no “native DAHDI” but the compatibility mode translates all your “zapata” configurations to DAHDI.

I’ve been having server problems on the website - ran out of free webspace (100 MB) and haven’t updated the site for a while. Had to delete some stuff to modify the pages. It should be good now.

We have had this issue as well with a TDM804 FXO card. The amportal.conf is configured with the zap2dahdicompat=true (is this required with Freepbx 2.8?), the trunk for channel 5 has been created, the context=from-zaptel set in the chan_dahdi.conf (does this also need to be set in the dahdi-channels.conf as well?) and the zap channel did assigned to this channel. The inbound route has been created but it does not match to this did when called and of course plays the service unavail. msg. I did not restart the box just amportal stop the amportal start.

BTW Thanks for the great product.