Sorry, Asterisk does not currently support use as part of an infrastructure, only hacked-together telemarketing systems. The current version (1.2) requires the use of at least 3 paper clips and 8" of duct tape when installing, although the pending 1.4 release removes the requirement that the paper clips be straightened. There are real technical reasons for this.
…Just kidding, Asterisk will do what you want quite nicely.
Get a zap card (digium tdm400 or sangoma a200) with at least two FXO (red) modules. Connect these to your phone lines.
In zapata.conf put them in a context, and also in a group. We’ll call the context [incoming] and the group 1.
in [incoming] put your IVR and whatever else happens to incoming calls
In whatever context your phones are in, put something like
exten => _NXXXXXX,1,Dial(Zap/g1/${EXTEN}) ; this will process 7 digit phone numbers
exten => _1NXXNXXXXXX,1,Dial(Zap/g1/${EXTEN}) ; this will process Long Distance numbers.
As you can see the above patterns use Zap/g1 (zaptel group 1, it will pick a free channel) and dial ${EXTEN}, which is whatever was dialed in the first place (that matches the NXX thing).
You will also want to have extensions. These can be analog zap channels (add FXS (green) modules to the card you bought above), ATAs (has a SIP connection to asterisk, but gives you analog FXS ports to use a phone with) or IP phones.
Personally I recommend IP phones- they are more expensive but they can better control asterisk features like transfer/conference/etc without doing funny things like hookflash and star codes. You just push the button for the feature you want and it happens (with some exceptions).
As for IP phones, if you are on a budget look @ the Grandstream 2000. Pretty easy to configure, it works pretty well if you have the right firmware. Inexpensive too- $90 or so. Ignore the ‘line’ buttons, just set up one SIP account to it and the other line buttons take effect if you handle more than one call at a time. Good support for *, and active wiki page @ voip-info.org. Manufacturer supports * use.
Also look @ AAstra phones, they are very well built and pretty easy to configure. Also very easy to remote administer using config files (helps if you have more than 2 or 3 of em). Good quality speakerphone (full duplex). Good support for *, excellent user / administrator documentation (very complete). Vendor supports * use; documentation includes * example configurations.
SNOM phones are pretty good too. I use a Snom 360 on my desk. Lots of configuration options can be confusing, but it is an awesome workhorse. Good speakerphone (full duplex). Vendor supports * use and has an active wiki @ snom.com. Get the latest beta firmware. Many * administrators use Snom phones.
Hope that helps!