I have always handled situations like this by setting up seperate Calling Search Spaces for each group of extensions. So have the 16xx group use a 16XX-Outbound CSS and have the 17XX group use a 17XX-Outbound CSS. Have each CSS point to their own partition with its own outbound route patterns. Have the route patterns point at seperate Route Lists. And in one of the groups route lists drop the standard trunk access code and prefix a different one.
for example if 17XX makes a call using 9 as trunk access like 95551212 drop the 9 and add an 8 so when it is sent to the router it goes as 85551212.
This way you can have dial peers using port 1-4 with a destionation pattern such as 9T for the 16XX extensions and ports 5-8 with a destination pattern of 8T for the 17XX extensions.
there might be a cleaner way but this has always done the trick.