Edit: I would recommend this solution with Apache web server http://www.openvbx.org/ .
For native sip project you may wanna check http://code.google.com/p/csipsimple/ as well as this may be good starting point.
For further reading I would suggest this article, which may be useful for how to start with VoIP on bigger scale and the costs of it.
For simple solution