http://www.igniterealtime.org/community/thread/28757
Asterisk-IM should automatically reconnect to Asterisk when it looses the connection due to a restart of Asterisk or a network outage.
It should be possible to enable/disable the auto-reconnect feature.