My recommendation would be to stay as far away from application dial rule as you possibly can. They are a reminisce of the past.
Why don’t you format the directory number information in +E.163 format and use the same for directory numbers in CM. That way you should not need to use any rules for transformation of the number.
My 2 cents on this.