[asterisk-users] Discover connected Zap lines
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Apr 30 15:29:53 CDT 2008
On Wed, Apr 30, 2008 at 09:07:48PM +0200, Vinz486 wrote:
> Hi,
> i have 2 FXO ports on my host (Asterisk 1.4 on Debian)..
>
> In the production env i will not know if will be analog cable plugged
> in port 1, 2 or both.
>
> How can i discover this programmatically?
>
> I see NOTICE messages on CLI upon plug and unplug lines: ho get these info?
What device do you use? wcfxo has always reported this as RED alarm on
the span. The drivers of the Astribank also did so for quite some time.
In recent versions of Zaptel all the Digium analog cards' drivers do so
as well.
So a quick look at /proc/zaptel/1 will show you that the channel is RED
(yes, there are also channel alarms for that in latest Zaptel versions).
And then in Asterisk 'zap show channel 1' will show you that the channel
is "InAlarm". Hence it won't accept calls. Thus you can safely include
it in a group of channels. Maybe this is what you were after in the
first place.
--
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