Asterisk is your cheapest most flexible solution here, yes.
You'll need minimal hardware to support 6 analog lines.
To really answer your question in full however, you should provide some more details as to your requirements. Are you replacing the existing analog phones with voip phones...