When phone numbers are assigned to Team Endpoints, the EnterpriseVoice flag will automatically be set to true, and Cloud Voice Mail is also automatically provisioned. Additional information can be found in the Microsoft documentation.
•https://docs.microsoft.com/en-us/powershell/module/teams/set-csphonenumberassignment?view=teams-ps