Setting up an IVR and voicemail for an existing PBX (non VOIP)

With Centrex and analog lines into the Asterisk, you generally need to install an SMDI interface (SMDI=Simplified Message Desk Interface) provided by the phone company into your Asterisk. This is used to link Centrex systems into standalone voice mail or other systems. See: http://www.dialogic.com/support/helpweb/mg/tn943.aspx and here is some detail about how to use SMDI with Asterisk: http://www.voip-info.org/wiki/view/Asterisk+Documentation+1.6.0+smdi.txt

The Centrex will need a hunt group set up. Your no-answer Centrex calls will forward to the Centrex hunt group whose members terminate onto the Asterisk box. The SMDI link from the Centrex is a serial link which must connect to a serial port on the Asterisk. The data stream is usually at 9600 baud or less. The data will tell the Asterisk that on port X, there is a call for extension XXXX and the Asterisk must know how to deal with it. This will likely require some custom programming.

Now if you have the Centrex hunt grup terminate into the Asterisk with a PRI connection, the Centrex (especially one based on Lucent 5ESS) can indicate that the call is forwarded and who it was for. Again, some custom programming would be needed to handle this.

Asterisk has the ability to do all of this but you will likely need to hire someone to program and coordinate it.

If your existing legacy system is not Centrex but a local box of some sort, there are many more variables to address but the general principles still apply.