Multiple trunks and extensions

Hello.

I have a multiple trunks (16 pcs) and multiple extensions (also 16 pcs) from this same provider.
This is some kind of “must have”, in few companies I have made one trunk for the many extensions, but in my company I must have something like uppon.

The number are from 700 at the end to the 715.

The point is, I must have each extension “connected” to their trunk, for example trunk with name 0715 must be assigned to extension 0715.
When I call to my company from for example mobile phone all is fine (the call from each number is forwarded to the adequate extension), but when I try to call from Asterisk, there is always picked a trunk, which is on the top of the list (the user have a telephone number with the ending 0715, and on the clients phone is showing for example 0704 :slight_smile: ).
I know, that I can make a different outgoing routes for the each trunk, but this have no sense for me (what with situations, when I will be have 100 trunks? :wink: ).
Is there a possibility to direct connect those trunks with extensions?

The problem occured, when I have installed a freepbx version 2.9.0.7.
On the version 2.7.0.5 all is okey, and works fine.
Please advice.
Thank you.

If you have 16 separate trunks, create 16 outbound routes, one for each trunk and put the extensions CID that corresponds to that trunk in the CID field for each Dial Pattern you define on the trunk.

On the incoming side I assume you have either created a separate inbound route for each extension or used the Assigned DID/CID option for each extension.

A much cleaner way of doing this is to have one trunk from your provider which allows a certain number of concurrent calls, you won’t need ability for 16 unless everyone is on the phone 24/7! Actual number of concurrent calls will depend on the amount of usage you have. You then put the full outbound CID of each extension in the Outbound CID field of each extension.

You will need to assign the inbound DID for each extension in Assigned DID/CID options for each extension or create an inbound route for each extension with the appropriate DID.

Not all providers offer this facility, however, it is much more economical because you can limit the number of concurrent calls you pay for. Check with your provider.

Hope this solves your problem.

This not clearly resolves my problem.

  1. My provider do not support something about you have wroten,
  2. Costs of the 16 numbers are exactly this same as one number - there is no any additional costs at my provider,

This thing with 16 outgoing routes - I want to dial number in the same way on the each phone, I don’t want to make any prefixes before numbers.

You will dial the same from each extension, you will set each outgoing route up with only one trunk and identical dial patterns except for the CID field which will contain the CID of the extension associated with that particular trunk. Asterisk will then use the appropriate outgoing route associated with the extensions CID to route calls to the associated trunk.

Unfortunetely, I can only do that with the first route. When I make second outgoing route and I try to connect from the other phone, I always get “all circuits are busy now, please try again later”.

If the extension number you are calling from matches the caller ID set in the last field of the dial pattern the call should route properly. Remember you should only have one trunk associated with each route and the caller ID should be the extension number you wish to use on that route not the OG CID set for the extension, route or trunk (wherever you have chosen to set it).

If you mouse over the heading Dial Patterns that will use this Route you will get a full explanation of how this is set up.

Unfortunately, I have tryied many, many times and I can not achieve this.
Should I also make a separate port numbers for each extension?
Can you please tell me from beginning to the end how this can be resolved?
Thank you.

I think you may be confusing trunks with DIDs.

A DID is a phone number. A trunk is a connection to a service provider. You can have multiple DIDs with one trunk. One trunk can support multiple channels (i.e. multiple calls at the same time) or just one channel. If you are getting an all circuits busy message, that suggests that you have used all the available channels on a trunk (either because you limited the # of channels in the trunk configuration or your service provider does).

Are you asking how to make each of 16 extensions use their own trunks, or how to make each of 16 extesions use their own DIDs?

If the former, just set up 16 trunks and setup an inbound route for the DID associated with each trunk. This will cause calls coming into that trunk to ring to the proper extension. To setup outbound calls to use the proper extension, setup a separate outbound route for each extension. In the dial pattern rules put the extension # of the user whose calls will use that route after the /. For example, if you want extension 701 to call out on trunk 701 no matter what he dials, create an outbound route just for him and use this dial pattern rule in the outbound route:

()+|[./701]

That outbound route should point to trunk 701.

If the latter, then set the Called ID for each user to match his DID in the extensions module, and create inbound routes for each of the DIDs to route directly to the extension #.