[asterisk-users] OT - Do analog gateways detect a phone is plugged in or out ?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Jul 22 14:55:53 CDT 2009


On Wed, Jul 22, 2009 at 12:40:23PM -0500, Tilghman Lesher wrote:

> 
> Yes, but on the other side of the switch, a station can detect battery.  This
> is what the Digium analog cards do in order to report whether a line is in
> "red alarm" status or not.  Whether the analog gateways do this or not is
> another question entirely, but it's certainly possible.

Xorcom "gateways" certainly do. Again, that's for FXOs 

And generally 

  perl -MDahdi -e '
    my @chans = map {$_->chans()} Dahdi::spans();
    foreach (@chans) {
      next unless $_->type() eq 'FXO'; 
      printf "%3d %s\n",$_->num, $_->battery;
    }'

The "battery" method ATM only implemented on Astribanks in the perl
modules, however this should be soon fixed.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list