I had to find if users had a phone system licenses in order to assign them a direct routing number.
Get-MsolUser -userprincipalname firstname.lastname@example.org | select-object Licenses
Phone system Licenses = MCOEV
When working with Direct Routing, the user cannot have Calling Plan Licenses installed for the accounts. MCOPSTN2, MCOPSTN1 and MCOPSTN5
If the user has for an example ENTERPRISEPREMIUM This includes phone system so no need to add it.
Reference to Licenses Names