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

Christopher Harrington chris at acsdi.com
Fri Oct 19 12:59:54 CDT 2012


On Fri, Oct 19, 2012 at 12:31 PM, Alex Villací­s Lasso <
a_villacis at palosanto.com> wrote:

> 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.
>
>
In the CLI, you can run `core show settings` which will tell you the
startup time of the server.


-- 
-Chris Harrington
ACSDi Office: 763.559.5800
Mobile Phone: 612.326.4248
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121019/d6ea4c3f/attachment.htm>


More information about the asterisk-users mailing list