If one is standing outside a shul and hears Kadish, Kedushah, Barechu or the 13 Midot, he can answer the proper response even though he is not situated inside the shul. If there is something in the way between him and the shul such as a gentile, an idolatrous object or something unclean – as long as he does not see the person or object, he can also answer “amen” to the berachot. This applies as well if one hears the prayers via telephone.
For example: if a person is ill and unable to come to shul, he can “dial in” and hear the Kadish, Kedushah and Barechu, and can respond to the prayers accordingly.
The same is true if a person listens to a live broadcast of a shiur via telephone, radio or a live feed over the internet. When Kadish is recited following the shiur, one can respond to the Kadish. This is because the Kadish is being recited live. However, one does NOT respond if he hears a recording of Kadish or a berachah. One responds only if he hears the berachah at the time it is being recited live.
Also, one should not answer “amen” to a berachah he hears via telephone or live broadcast if he should have recited the berachah himself. For example: before a person put on his Talit, he should not have his friend in shul recite the berachah on his behalf and then answer “amen” to his friend’s berachah on his OWN behalf. It goes without saying that making a berachah over a Talit should not be done via telephone.