Your PBX has an extension range where the first digit is zero (0) or you have a Reception or Operator with a target number of 0.
Placing calls to these destinations from other fixed extensions works fine.
Dialling to external numbers from Teams works fine.
However, when dialling these destinations from Teams, the calls cannot be routed.
Teams has a real problem with this and there are elements of the Teams internal dial-plan where there are no workarounds. You simply will not be able to dial extension numbers beginning with zero, Teams was never designed with extension dialling in mind but we cannot rule out that Microsoft will not address this at some point in the future if more customers report the issue to them globally.
A possible solution is to have a digit modification or translation plan on the pbx which strips off an alternate leading digit, something like removing a 5 from a dialled number. Users can then prefix extension dialling with a 5 (e.g. 50050) and the PBX will then route this to 0050.
To be honest, we don't see many customers with leading zeros on extension numbers as zero is often reserved as access to an Operator or Receptionist (although as far as Teams is concerned, dialling a single zero is also restricted)