Gateways are not detecting disconnection

Hi!

I am using the Botz library to run a bot on Openfire 3.6.0a.

The problem is that all protocols except G-Talk fall off line after a few days of up time.

On the Gateway Registrations page all protocols are indicated as online (green bullet in the left-most column and the protocol icon is colored (bot greyed out)

I tried maxing out the number of reconnection attempts in the gateway config but that doesnt help.

This has been happening since I started using open fire on version 3.5.0.

Please help!

Btw, the protocols that are loosing connection are not getting any traffic at all at this time. This suggests the NAT firewall is dropping the connections after a certain time because of lack of activity. Is there a way to enable somekind of keep-alive pinging?