On one hand you want three groups ... and on the other hand you want each port assigned to one agent ... LOL
1) Welcome to the party!
2) when you post, please post your entire configuration including (but not limited to) your installation method and vicidial version with build.
this IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)
You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "from scratch" you must post your operating system and should also post the .iso version from which you installed your original operating system. If your installation is "Hosted" list the site name of the host.
If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.
Similar to This:
Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600
3) Your settings in your configuration for your dahdi configuration/hardware interface to asterisk will allow you to group your 24 ports into "g1/g2/g3", and you can then have each of those set up with a different dialplan (differing the dial prefix between 7,8,9) and each dialplan on a single campaign which would then have that dial prefix to choose the dialplan. So 71NXXNXXXXXX would route to group1, and 81NXXNXXXXX would route to group 2, etc.
4) But I'm not sure how you intend to "limit those ports" to individual users if they are already in use for these groups. If an agent is "stuck" to a single port, then when that port is busy (in the outbound group it falls into) the agent would not be able to call (or would interrupt the already in progress call ...). Unless you intend to leave some ports out of the groups for this purpose. In that case, each agent could indeed be put into a special context capable of dialing only an individual port or group(with a single port in it ...). Ordinarily each "Phone" is in the Default context, this can be changed. If the agent is moved into a custom context, you would need to create the appropriate dialplan for that agent to dial out ... they would not have access to any other dialplan for outbound calls.