If someone needs to enter a Synagogue or a Beth Midrash (study hall), for a purpose not connected with prayer or Torah study, such as to call someone, he should enter and first read a Mizmor of Tehillim (Psalm), or some other words of Torah.
After that he may go call the person he was looking for. If he doesn't know how to read, he should enter and pause a while there, either standing or sitting. This is because pausing is also considered to be a Miswah (Mitzvah), as it says in Tehillim, "Ashrei Yoshbei Bethekha" (happy are those who dwell in Your house). Dwelling also means pausing a while.
(See Ben Ish Hai, yr 1, Parashath Wayiqra, Oth Zahn)