You can run an asterisk server and connect the telephone line to it with an FXO device like linksys 3102
EDIT after comment: you connect the 3102 to the asterisk server or to a router with an ethernet cable (like any computer to make a LAN).
For the computers in the LAN you can use a softphone like twinkle for linux or X-lite for windows or you can use a sip phone or a regular phone with an ATA (FXS) (3102 has a FXS too so it can be used).
For remote computers, in my opinion, the best would be to build a VPN and connect to your server and place the call as if you were in LAN).
For smartphones, you can find SIP clients that will work with asterisk easily.
You can also use your asterisk server on a public IP and connect directly without the VPN but you will need to secure it or a lot of people will place calls on your line...