...and, "just to clarify..."
Read my linked post here, explaining many of the circumstances whereby you may lose your Google Voice number and all your access to the service.
https://www.obitalk.com/forum/index.php?topic=14006.0Google doesn't care
how you access the service, as long as it is using the official OAUTH 2.0 authentication method, and you're not doing so from a prohibited country over a VPN.
Google
does care about
what you do with that access; its automation can, and will, shut down the service for a given Google account, if it detects calling patterns that indicate abuse, or for any of the other reasons I documented in the linked post.
Bottom line: use your PBX for your personal/hobby use, at your own risk, and NOT for commercial use. Every single week, on the Google Voice forum, we have to explain this to people who whine about how they got a box of business cards printed, and flyers sent out, and now their number doesn't work. I'm always tempted to send them a link to Vistaprint, to get another box of business cards, but I just let them wallow in their despair.