[asterisk-users] Discover connected Zap lines
Vinz486
vinz486 at gmail.com
Mon May 12 05:55:05 CDT 2008
2008/5/2 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:
> On Fri, May 02, 2008 at 09:06:01AM +0200, Vinz486 wrote:
> > 2008/4/30 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:
> > > On Wed, Apr 30, 2008 at 09:07:48PM +0200, Vinz486 wrote:
> >
> > ---------------------------------------------------------------------------------------------------------
> > [May 2 08:51:00] WARNING[5119]: chan_zap.c:6685 handle_init_event:
> > Detected alarm on channel 3: No Alarm
> > [May 2 08:51:03] NOTICE[5119]: chan_zap.c:6678 handle_init_event:
> > Alarm cleared on channel 4
> > ---------------------------------------------------------------------------------------------------------
>
> This means that you should be able to see it in the InAlarm: field in
> 'zap show channel 3'
>
Ok. Made some experiments.
InAlarm field show 1 if cable unplugged *BUT* only if in previouos
time cable was plugged.
In few words, at boot, InAlarm is 0, Cable plugged: 0, Cable unplugged: 1
If i use this field, after a boot without cable, my software will
think that the cable is plugged.
I found another useful field: Hookstate (FXS only).
It tell me if the cable is plugged ever after a boot without cable.
Hookstate (FXS only): Offhook <------Cable plugged
Hookstate (FXS only): Onhook <------Cable unplugged
I hope this can help other people (and make to think at Zaptel
developing to insert a field exactly for this purpose, eg: Cable:
plugged or Cable: unplugged).
Bye.
--
PicoStreamer - the real WEB live streaming software
vinz486.com
More information about the asterisk-users
mailing list