Seeking Permission to enter by telling one’s Name
Umm Hani (radi Allahu anha) said, I went to the Prophet (sal Allahu alaihi wa sallam) who was taking a bath while Fatimah was screening him. He (sal Allahu alaihi wa sallam) asked, “Who is there?” I replied: “I am Umm Hani.” In another narration Jabir (radi Allahu anhu) said: I went to the Prophet (sal Allahu alaihi wa sallam) and knocked at the door (to seek permission). He (sal Allahu alaihi wa sallam) asked, “Who is there?” I said: “I”. He repeated, ” I, I?!” as if he disliked it.
[Sahih Al-Bukhari and Muslim]
We benefit from the above Hadith that at the doorstep, the visitor should disclose his identity to the host.
Secondly, to knock on the door is practically the same as seeking permission to enter the house.
When the host comes out, the visitor should first offer him As-Salam.
And Allah knows best!