I'm using a perl daemon i wrote to connect to AMI and perform actions. The daemon connects to asterisk via AMI at start up. Is there anyway to check if the AMI connection is still alive, for example every 2 seconds. if the connection is not alive, re-connect to AMI? Also, does AMI timeout after a certain amount of time of not sending commands?