I need to control the number of simultaneous calls an outboud route can handle.
Example :
The limit on my trunk is 10 channels.
Branch office 1 can use a maximum of 2 channels with the limit on the outbound route.
Branch office 2 can use maximum 3 channels with the limit on the outbound route.
Branch office 3 can use maximum 3 channels with the limit on the outbound route.
Define 3 trunks with Maximum Channels set appropriately, all using the same provider credentials. If you are using registration, only one should register.
Then, define 3 outbound routes pointing at the corresponding trunk. Each match pattern should have a pattern in the CallerID field that matches the range of extension numbers used by the corresponding branch office.
I would use @Stewart1’s approach a little different tho.
Use a primary Trunk, let’s say you named it “PrimaryTrunk”
Then create 3 custom trunks, set the channel limit and set the dial string to something like:
SIP/PrimaryTrunk/$OUTNUM$
Or PJSIP
PJSIP/$OUTNUM$@PrimaryTrunk
Then set each outbound route to a dial pattrans to look for the extension CID and connect it to one of the 3 Trunks.
I would go with @PitzKey’s idea. Keep the single normal trunk to your provider with its limit of 10 and make the custom trunks that have the smaller limits.
But Is your provider limiting you to 10 channels total or 10 outbound? Because if it is 10 total, then your imposed limits are meaningless if you have more than 2 inbound calls.