Multiple Trunks to go to different extensions

Hey guys,
Im having a difficult time trying to wrap my brain around this, I’m sure its possible but Im not sure how to set it up.

My customer wants to have individual external numbers to each of his extensions.
for example:
555-555-2810 goes to extension 100
555-555-2811 goes to extension 101
555-555-2812 goes to extension 102
555-555-2813 goes to extension 103
555-555-2814 goes to extension 104

I have connected each number as its own trunk and they are registering properly.
Now when i call the 2810 number how can I tell the PBX to go to extension 100?

I have tried putting in an inbound route to say DID 2810 goes to 100 but then it says the number is out of service. I realize now that a DID is not a trunk.

Any suggestions on how to make this happen?

Set a single trunk from the provider.
Set up 5 Inbound Routes.
Set the Inbound DID to the DID the provider is sending.
At the bottom of the Inbound Route screen, choose “Extensions: 1xx” where 1XX matches the DID to the extension.

Trunks get the call delivered to the PBX. Inbound Routes differentiate the calls based on inbound DID or caller’s CID.

I see what you are saying but unfortunately that is not how the numbers are set up with the provider.

All the numbers are individual numbers and not a DID under a single SIP trunk.

Is there no way to make a trunk go directly to an extention.
I have it working now with the inbound route of any/any —> ext 100 BUT all calls go 100. there is no way to route the call to 101.

No. Trunks enter the system and are routed to the Inbound Routes. You have to go through the IR to get into the system.

What context are you using for your inbound route? It’s possible that you’re simply not seeing the inbound DID because it isn’t coming in via a method that exposed in your inbound context.

My inbound routes i have tried this.

The top one works. I can call the number 2813 and it goes to extenstion 105
The one where I have the DID in there, it does not work. It tells me the number is not in service.

I have also tried putting 2814 into the CID, but that also doesnt work, but that was more of a give it a shot and see… i know that shouldnt have worked.

Check the CDR, DID column for an inbound call. If the provider gives you a DID, it will be recorded there, and that is the value you want to populate the DID field in the inbound route with.

Thanks for the help guys, but I think im just going to go the long route and try to get these numbers all converted into a SIP Trunk with DID’s.
In the long run I think that would be better.

One trunk on the PBX, and then i know the Inbound route with the DID will work.

Lorne’s instructions are still correct. If the call is coming in with a DID, it will be recording in the CDR report and in the /var/log/asterisk/full log file. You’ll need that differentiator regardless of whether you have one trunk or five.

This is not normal behavior. When you call xxxxxx2814, if the route didn’t match, it should have gone to extension 105. And if it did match, extension 101. Paste the log for a failing call at and post the link here.

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