Islam is not against women going out of the house, and it has not been said about Hazrat Zahar (peace be upon her) was permanently at home; after all, she used to visit relatives and would go to the houses of those women who she was in touch with them. So, Islam has never banned women from going out of the house.
Islam has not banned women from talking to strangers. If it were so, the women could only speak with those intimate people like father, husband, brother uncle and so on, but Islam has put some rules and restrictions on her going out of the house. You can see these rules in the Surah of Noor in the Holy Quran, by referring to such verses, it can be concluded that women should go out of house in a way that does not arise the greedy and lustful eyes of those wicked and mean strangers; this is the best type of Hijab.
source : erfan.ir