How did Eli know that Hashem is calling him?
Radak: One could say that he erred twice. He would not err three times. Malbim - imagination rules over a healthy person only a little.
Radak citing Ibn Ezra: Since Shmuel heard the voice, but Eli did not, he knew that Hashem causes those whom He wants to hear it. Similarly, "va'Yishma Es ha'Kol Medaber Elav" (Bamidbar 7:89) - Moshe heard it, but Yisrael did not hear (Yuma 4b).
Why did Hashem call to Shmuel in a situation [and tone of voice] in which he would err to think that Eli calls to him?
Malbim citing Mahari: In this way, Eli would force Shmuel to tell the prophecy to him. If not, Shmuel would have hid it from him. We see that he was afraid to tell Eli (verse 15)! It seems that Hashem merely informed Shmuel what will happen to Bnei Eli. If his prophecy were a Shelichus to tell him, he would be forced to tell him. Eli would not need to make him shows that to tell him. A Navi who refrains from telling his prophecy is Chayav Misah bi'Ydei Shamayim! Hashem did not make Shmuel a Shali'ach to tell him, for in such cases the recipient of the prophecy puts it to his heart and repents, and the decree is nullified. Here, the decree was sealed with a Shevu'ah (verse 14) that Teshuvah will not help. Therefore, there was no need for Shelichus. Shmuel had the option to tell, or not to tell. Eli forced him to tell. 1
What would be the purpose of the prophecy, if Shmuel will not tell it? And is it not better to make him a Shali'ach, so that Eli will repent, even if it will not nullify the decree? Perhaps Hashem did not want that people see that Eli repented and it did not help, lest people 'learn' from this that Teshuvah cannot nullify decrees. Alternatively, Hashem arranged that Eli command Shmuel to tell him, so Eli would not feel any resentment towards him. (PF)