Assuming this is a common-entry setup where you have no access to the actual door lock? I’ve spent a while researching https://www.erentallock.com, until basically building my own.
For common entry phone forwards, perhaps you could just link the dialed number to Google Voice, then script a way to reconfigure the forwarding number there to go to tenant versus you for the time period they’re staying?