Yā can be used only for someone distant.
Vocative Particles: Five Forms, Uses and Parsing