For most Instant Messenger programs, a firewall will prevent things like direct-chat and file-transfer in two ways:

1) Blocked ports (as you already surmised), but more importantly, it can also be caused by:

2) NAT (Network Address Translation). Many of the Instant-messenger programs won't tolerate a layer of NAT between two clients trying to directly connect to each other for certain features.

If it's simply a question of blocked ports, you can open those up at your own risk. But if it's a NAT issue, you might be out of luck.
_________________________
Tony Fabris