[asterisk-users] Tell apart between network disruption and asterisk restart via AMI

Alex Villací­s Lasso a_villacis at palosanto.com
Fri Oct 19 12:31:02 CDT 2012


I have a program that connects to the Asterisk Manager Interface through port 5038 on a remote machine. Suppose I get a TCP disconnection on my program. The program will then attempt to reconnect to the AMI and will eventually succeed. Is there a way to 
check whether the disconnection was caused by a network disruption, or an Astersk restart/crash? In other words, is the Asterisk process I contacted now the same as the one I was connected before, or is it a different one? The reason I want to know is that 
I have a cache of information that is costly to parse (scales linearly with the number of extensions) and I want to know how to realize that the information is now stale.



More information about the asterisk-users mailing list