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

2012-10-19 Thread Christopher Harrington
On Fri, Oct 19, 2012 at 12:31 PM, Alex Villací­s Lasso <
a_villa...@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
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2012-10-19 Thread Jim Dickenson
>From AMI you can get uptime. If the uptime is short likely Asterisk restarted.
-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Oct 19, 2012, at 10:31 AM, Alex Villací­s Lasso 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.
> 
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>  http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

2012-10-19 Thread Alex Villací­s Lasso
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.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users