Two Trunks, two Inbound Routes?

Hello All,
I am setting up FreePBX for a small office that actually runs two different business.
So I setup two Trunks and two Outbound Routes, but how can I divide incoming traffic?
I guess I should setup two Inbound Routes, but I do not really know what to enter…
Thanks for reading,

Create an inbound route for each DID.

if I add my Provider account number, I get an error message (the number you have dialed…) when calling in

FreePBX is not really set up for multi-tenant operations, and that’s what you’re doing. There are lots of things in here that are not going to work the way you want them to.

You need to set up your Inbound Routes to differentiate the traffic. This is most often accomplished through a “DID” value that grabs the incoming traffic (regardless of which trunk it comes in on) and routes the traffic through the system to appropriate endpoints.

In fact, unless you’re doing something really tricky, setting up a single “any/any” (blank DID and blank CID) will yield a setup where every calls gets processed to a specific destination. Adding inbound DID (the number that was dialed to get to you) that matches the DID the provider is sending should be enough to route the calls to the right destination.

thanks, Dave!

This document (in Italian) provided a solution:

See section “Riconoscimento del numero geografico chiamato”, where the trunk has a “regexten” like:
tcp://5xxxxxx:[email protected]/ 5xxxxxx

Then context must be from-pstn-toheader as explained in the wiki:
“from-trunk” means that incoming calls from this trunk will be treated as if they are coming from an outside line, and will be routed using the rules that you setup in the Inbound Routes Module. If there is no matching Inbound Route, Asterisk will deliver a “not in service message.” “from-pstn-e164-us” is the same as “from-trunk,” except that any leading + in the Caller ID will be removed. “from-pstn-toheader” is the same as “from-trunk,” but that the called number (the DID) will be derived from the to: header instead of the From-DID header. “from-internal” means that incoming calls from this trunk will be treated as if they were made by an internal phone, and will be routed directly to an extension number, a feature code, or through the outbound routes module.

it works!

thank you All for your help,

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