or use an ATA device with a FXO port such as the Iaxy, or Sipura 3000 or the countless others, then connect to your Asterisk box using ethernet.
or you can connect a channel bank of fxo ports and connect to your Asterisk server using a T1 line.
There are countless ways to do all of what you suggest.
Once you have an Asterisk server up and running the SIP phone is pretty straight forward. I lean towards the PBX in a Flash distribution but there are many other prebuilt ISOs that you can download that will do the same thing, You don’t have to compile the system yourself - others have done the work and troubleshooting for you.