While a phone system is not part of my home automation system. it is an immensely useful utility that is part of my house. However, you can monitor activity on your phone system from your home automation system. As of this writing, only Openhab has an add-in component that can directly interface with Asterisk. Home Assistant does not have any official support for interfacing with Asterisk, but I am optimistic about future releases ,as Asterisk support is a requested feature.
Think about it! You can build an entire private branch exchange in your home with an old computer and some used phones you can pick up on Ebay for about $20 a pop. If you live in the United states you can add a Google Voice trunk and make free calls within the US and Canada. I dedicated one (now discontinued) HP stream mini, a mini (good looking) PC as my PBX server. There are many free PBX linux distros like Asterisk, Free PBX and Incredible PBX.
Asterisk, the original PBX is an open source framework that allows building of VOIP. Free PBX and Incredible PBX and several others are both built on Asterisk. I chose Incredible PBX as it has excellent documentation and a vibrant forum. Ward Mundy, its lead developer has a very informative and active blog.
My home phone system is a mix of Nortel, Polycom and Avaya phones(soon), and is incredibly convenient to call into meetings when I work from home.
Based on Ward’s recommendation I purchased a $5 account on the Simonics gateway for Google Voice. After this I was able to setup Incredible PBX through the gateway to Google voice and since then, the PBX has been 100% reliable.
There were challenges in connecting my older Nortel phones with PBX as these were not SIP phones but used a Nortel specific protocol called Unistim.
Connecting with PBX phones also proved a challenge but this link helped facilitate the task. Ward Mundy does recommend using Avaya phones. I will post an update when I attempt to integrate these phones with my PBX.