It is the consensus of scholars that the father is the wali in the presence of the son. The other relatives are derived from the distribution of inheritance and how they classified the brother to be closer than paternal uncle and that the uncle is closer than the cousin etc.