Force extension range touse TrunkGroup

Can anyone provide a pointer or suggestion on process to configure assterisk 1.4 to route a range of extensions out a Trunkgroup. I have a configuration where I have 2-T1s as Trunkgroup1 and 1-T1 as Trunkgroup2 and 2-T1s as Trunkgroup3. In call center I need extensions 1100-1199 to use Trunkgroup1 and 1200-1299 to use Trunkgroup2 and 1300-1399 to use Trunkgroup3.

Currently I modified my application to prefix a 4,5 or 6 but this is not a very good method. I assumed it was straight forward to route extensions out certain trunkigroups (t1s) owned by each company but after several days of research I must not be searching correctly.

Thanks in advance for any help.

Strictly speaking, extensions only have a meaning to Asterisk for outbound calls.

If your calling phones log into Asterisk, as SIP users, or are defined as individual peers, you should put them into a context that determines the outgoing line.

If they come in on a single SIP trunk, you will need to access the CLI in the dialplan and use that in conditional logic.

If they are not SIP, similar procedures should be possible.