Whenever it's possible it's better to avoid calling a person 'it'.
Look at this example:
- John, there's somebody at the door!
- Who is it?
- I don't know.
- Tell them to wait, I'm coming.
When somebody knocks at our door we often say, "Who is it?" or, "Who's
there?".
Both aren't considered rude and are practically used everywhere.
If someone calls you on the phone and you ask "Who is it?", "Who's this?" it will be considered quite rude.
"Who is this?" is considered to be an idiomatic way to ask, "Who is on
the other end of this phone conversation?" (or, much more stiltedly,
"With whom am I speaking?") Yet, I personally consider it to be rude
too.
It is better to say:
- Who's calling?
- Who's speaking?
Or if in a more formal way then:
- May I ask who's calling?
- Could you please introduce yourself?
But it wouldn't be considered rude if somebody afterwards asks you "Who was it?" or asks you while you are speaking "Who is it?"
In most circumstances, you could say that 'this' is used as a way of
'pointing', either with your finger or just verbally. 'It' is used
when there is no need to point because it has already been established
what thing or person is being talked about.