VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
bilmar_gh at yahoo.com Guest
|
Posted: Sat May 17, 2008 7:00 am Post subject: [asterisk-users] Discover connected Zap lines |
|
|
So no way to discover the status of FXO if a cable
pluged or not?
Regards
Bilal
---------------------
2008/5/2 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:
Quote: | On Fri, May 02, 2008 at 09:06:01AM +0200, Vinz486
| wrote:
Quote: | Quote: | 2008/4/30 Tzafrir Cohen
|
| <tzafrir.cohen at xorcom.com>:
Quote: | Quote: | Quote: | On Wed, Apr 30, 2008 at 09:07:48PM +0200,
|
|
| Vinz486
wrote:
---------------------------------------------------------------------------------------------------------
Quote: | Quote: | [May 2 08:51:00] WARNING[5119]: chan_zap.c:6685
|
| handle_init_event:
Quote: | Quote: | Detected alarm on channel 3: No Alarm
[May 2 08:51:03] NOTICE[5119]: chan_zap.c:6678
|
| handle_init_event:
Quote: | Quote: | Alarm cleared on channel 4
|
|
---------------------------------------------------------------------------------------------------------
Quote: |
This means that you should be able to see it in the
| InAlarm:
field
in
Quote: | '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 |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sat May 17, 2008 8:48 am Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sat, May 17, 2008 at 05:00:43AM -0700, bilal ghayyad wrote:
Quote: | So no way to discover the status of FXO if a cable
pluged or not?
|
What specific card do you use?
What version of Zaptel?
Did you actually read my message you were responding to?
--
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 |
|
Back to top |
|
|
bilmar_gh at yahoo.com Guest
|
Posted: Sat May 17, 2008 1:56 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
Hi Cohen;
I am using TDM22 (2 fxo and 2 fxs) digium card.
I am using zaptel 1.4.10.1
I readed, but not sure if readed all, as alot of
messages were going and coming.
Can u help?
Regadrs
Bilal
------------------
On Sat, May 17, 2008 at 05:00:43AM -0700, bilal
ghayyad wrote:
Quote: | So no way to discover the status of FXO if a cable
pluged or not?
|
What specific card do you use?
What version of Zaptel?
Did you actually read my message you were responding
to?
--
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 |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sat May 17, 2008 5:52 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sat, May 17, 2008 at 11:56:47AM -0700, bilal ghayyad wrote:
Quote: | Hi Cohen;
I am using TDM22 (2 fxo and 2 fxs) digium card.
I am using zaptel 1.4.10.1
I readed, but not sure if readed all, as alot of
messages were going and coming.
Can u help?
|
You should see "(RED)" in /proc/zaptel/1 for the channel if it is
disconnected. Not to mention that the channel will be in alarm (InAlarm
in zap show channel NNN).
--
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 |
|
Back to top |
|
|
jra at baylink.com Guest
|
Posted: Sat May 17, 2008 11:35 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sun, May 18, 2008 at 01:52:03AM +0300, Tzafrir Cohen wrote:
Quote: | You should see "(RED)" in /proc/zaptel/1 for the channel if it is
disconnected. Not to mention that the channel will be in alarm (InAlarm
in zap show channel NNN).
|
Is that true for *all* makes of card? I know the Sangomas put it in
ifconfig, but for pick-it-off-with-SNMP-for-Nagios purposes, that will
make my life a lot easier...
Cheers,
-- jra
--
Jay R. Ashworth Baylink jra at baylink.com
Designer The Things I Think RFC 2100
Ashworth & Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA http://photo.imageinc.us +1 727 647 1274
Those who cast the vote decide nothing.
Those who count the vote decide everything.
-- (Joseph Stalin) |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sat May 17, 2008 11:47 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sun, May 18, 2008 at 12:35:39AM -0400, Jay R. Ashworth wrote:
Quote: | On Sun, May 18, 2008 at 01:52:03AM +0300, Tzafrir Cohen wrote:
Quote: | You should see "(RED)" in /proc/zaptel/1 for the channel if it is
disconnected. Not to mention that the channel will be in alarm (InAlarm
in zap show channel NNN).
|
Is that true for *all* makes of card? I know the Sangomas put it in
ifconfig, but for pick-it-off-with-SNMP-for-Nagios purposes, that will
make my life a lot easier...
|
I don't really think Sangoma can put this in ifconfig for analog ports.
Unless they have a network interface per port.
--
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 |
|
Back to top |
|
|
jra at baylink.com Guest
|
Posted: Sun May 18, 2008 10:44 am Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sun, May 18, 2008 at 07:47:02AM +0300, Tzafrir Cohen wrote:
Quote: | Quote: | Is that true for *all* makes of card? I know the Sangomas put it in
ifconfig, but for pick-it-off-with-SNMP-for-Nagios purposes, that will
make my life a lot easier...
|
I don't really think Sangoma can put this in ifconfig for analog ports.
Unless they have a network interface per port.
|
Well, from some inspection on some of my own boxen later, RED applies
to the spans, not the channels... at least on T-1 cards, and yes, it's
available on both.
I'm not *entirely* happy with the way the Zaptel driver writers
structured the /proc/zaptel 'directory'; I'm going to have to do more
userspace parsing than I'd like to make use of it, but at least it's
there; thanks for the pointer.
Cheers,
-- jra
--
Jay R. Ashworth Baylink jra at baylink.com
Designer The Things I Think RFC 2100
Ashworth & Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA http://photo.imageinc.us +1 727 647 1274
Those who cast the vote decide nothing.
Those who count the vote decide everything.
-- (Joseph Stalin) |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sun May 18, 2008 11:16 am Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sun, May 18, 2008 at 11:44:48AM -0400, Jay R. Ashworth wrote:
Quote: | On Sun, May 18, 2008 at 07:47:02AM +0300, Tzafrir Cohen wrote:
Quote: | Quote: | Is that true for *all* makes of card? I know the Sangomas put it in
ifconfig, but for pick-it-off-with-SNMP-for-Nagios purposes, that will
make my life a lot easier...
|
I don't really think Sangoma can put this in ifconfig for analog ports.
Unless they have a network interface per port.
|
Well, from some inspection on some of my own boxen later, RED applies
to the spans, not the channels... at least on T-1 cards, and yes, it's
available on both.
|
RED applies to ports, not to spans. Or rather, it applies to certain
types of communication lines and the use of it to analog lines is just a
logical extension.
Zaptel terminology of spans has originated from cards in which each span
represents a port. In the analog card in which that applied (the X100P)
a disconnected cable generated a red alarm for as long as I remember
(read: since at least zaptel 1.0).
Quote: |
I'm not *entirely* happy with the way the Zaptel driver writers
structured the /proc/zaptel 'directory'; I'm going to have to do more
userspace parsing than I'd like to make use of it, but at least it's
there; thanks for the pointer.
|
Is /proc the right place? Or /sys ?
Also look at http://bugs.digium.com/12406
(Unfortunetly the submitter has not done a good job at separating
different parts of his patch nd thus you'll have to review ztdynamic
code changes as well)
--
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 |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sun May 18, 2008 12:16 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
On Sun, May 18, 2008 at 11:44:48AM -0400, Jay R. Ashworth wrote:
Quote: | On Sun, May 18, 2008 at 07:47:02AM +0300, Tzafrir Cohen wrote:
Quote: | Quote: | Is that true for *all* makes of card? I know the Sangomas put it in
ifconfig, but for pick-it-off-with-SNMP-for-Nagios purposes, that will
make my life a lot easier...
|
I don't really think Sangoma can put this in ifconfig for analog ports.
Unless they have a network interface per port.
|
Well, from some inspection on some of my own boxen later, RED applies
to the spans, not the channels... at least on T-1 cards, and yes, it's
available on both.
I'm not *entirely* happy with the way the Zaptel driver writers
structured the /proc/zaptel 'directory'; I'm going to have to do more
userspace parsing than I'd like to make use of it, but at least it's
there; thanks for the pointer.
|
Sorry, I misread it. Most of the parsing is already done for you, but it
is indeed slightly broken.
Actually we could use a bit of help with parsing the alarms.
On my system:
Span 1: XBUS-00/XPD-00 "Xorcom XPD #00/00: FXS" (MASTER)
1 XPP_FXS/00/00/0 FXOLS (In use)
2 XPP_FXS/00/00/1 FXOLS (In use)
3 XPP_FXS/00/00/2 FXOLS (In use)
4 XPP_FXS/00/00/3 FXOLS (In use)
5 XPP_FXS/00/00/4 FXOLS (In use)
6 XPP_FXS/00/00/5 FXOLS (In use)
7 XPP_FXS/00/00/6 FXOLS (In use)
8 XPP_FXS/00/00/7 FXOLS (In use)
9 XPP_OUT/00/00/8 FXOLS (In use)
10 XPP_OUT/00/00/9 FXOLS (In use)
11 XPP_IN/00/00/10 FXOLS (In use)
12 XPP_IN/00/00/11 FXOLS (In use)
13 XPP_IN/00/00/12 FXOLS (In use)
14 XPP_IN/00/00/13 FXOLS (In use)
Span 2: XBUS-00/XPD-10 "Xorcom XPD #00/10: FXO"
15 XPP_FXO/00/10/0 FXSKS (In use) RED
16 XPP_FXO/00/10/1 FXSKS (In use) RED
17 XPP_FXO/00/10/2 FXSKS (In use) RED
18 XPP_FXO/00/10/3 FXSKS (In use) RED
19 XPP_FXO/00/10/4 FXSKS (In use) RED
20 XPP_FXO/00/10/5 FXSKS (In use) RED
21 XPP_FXO/00/10/6 FXSKS (In use)
22 XPP_FXO/00/10/7 FXSKS (In use) RED
pan 3: XBUS-01/XPD-00 "Xorcom XPD #01/00: BRI_TE" AMI/CCS
23 XPP_BRI_TE/01/00/0 Clear (In use)
24 XPP_BRI_TE/01/00/1 Clear (In use)
25 XPP_BRI_TE/01/00/2 HDLCFCS (In use)
Span 4: XBUS-01/XPD-01 "Xorcom XPD #01/01: BRI_TE" AMI/CCS
26 XPP_BRI_TE/01/01/0 Clear (In use)
27 XPP_BRI_TE/01/01/1 Clear (In use)
28 XPP_BRI_TE/01/01/2 HDLCFCS (In use)
$ perl -MZaptel -e 'foreach (Zaptel::spans) {
foreach my $chan ($_->chans()) {
print $chan->num.": type: ".$chan->type.", signalling: ". $chan->signalling. ", info: ". $chan->info. ", batt: ".$chan->batt."\n"
}
}'
1: type: FXS, signalling: FXOLS, info: (In use), batt:
2: type: FXS, signalling: FXOLS, info: (In use), batt:
3: type: FXS, signalling: FXOLS, info: (In use), batt:
4: type: FXS, signalling: FXOLS, info: (In use), batt:
5: type: FXS, signalling: FXOLS, info: (In use), batt:
6: type: FXS, signalling: FXOLS, info: (In use), batt:
7: type: FXS, signalling: FXOLS, info: (In use), batt:
8: type: FXS, signalling: FXOLS, info: (In use), batt:
9: type: OUT, signalling: FXOLS, info: (In use), batt:
10: type: OUT, signalling: FXOLS, info: (In use), batt:
11: type: IN, signalling: FXOLS, info: (In use), batt:
12: type: IN, signalling: FXOLS, info: (In use), batt:
13: type: IN, signalling: FXOLS, info: (In use), batt:
14: type: IN, signalling: FXOLS, info: (In use), batt:
15: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
16: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
17: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
18: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
19: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
20: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
21: type: FXO, signalling: FXSKS, info: (In use), batt:
22: type: FXO, signalling: FXSKS, info: (In use) RED, batt:
23: type: BRI_TE, signalling: Clear, info: (In use), batt:
24: type: BRI_TE, signalling: Clear, info: (In use), batt:
25: type: BRI_TE, signalling: HDLCFCS, info: (In use), batt:
26: type: BRI_TE, signalling: Clear, info: (In use), batt:
27: type: BRI_TE, signalling: Clear, info: (In use), batt:
28: type: BRI_TE, signalling: HDLCFCS, info: (In use), batt:
29: type: BRI_NT, signalling: Clear, info: (In use), batt:
Or, slightly better formatted in the following simple per script:
$ /usr/sbin/lszaptel
### Span 1: XBUS-00/XPD-00 "Xorcom XPD #00/00: FXS" (MASTER)
1 FXS FXOLS (In use)
2 FXS FXOLS (In use)
3 FXS FXOLS (In use)
4 FXS FXOLS (In use)
5 FXS FXOLS (In use)
6 FXS FXOLS (In use)
7 FXS FXOLS (In use)
8 FXS FXOLS (In use)
9 Output FXOLS (In use)
10 Output FXOLS (In use)
11 Input FXOLS (In use)
12 Input FXOLS (In use)
13 Input FXOLS (In use)
14 Input FXOLS (In use)
### Span 2: XBUS-00/XPD-10 "Xorcom XPD #00/10: FXO"
15 FXO FXSKS (In use) RED
16 FXO FXSKS (In use) RED
17 FXO FXSKS (In use) RED
18 FXO FXSKS (In use) RED
19 FXO FXSKS (In use) RED
20 FXO FXSKS (In use) RED
21 FXO FXSKS (In use)
22 FXO FXSKS (In use) RED
### Span 3: XBUS-01/XPD-00 "Xorcom XPD #01/00: BRI_TE" AMI/CCS
23 BRI_TE Clear (In use)
24 BRI_TE Clear (In use)
25 BRI_TE HDLCFCS (In use)
### Span 4: XBUS-01/XPD-01 "Xorcom XPD #01/01: BRI_TE" AMI/CCS
26 BRI_TE Clear (In use)
27 BRI_TE Clear (In use)
28 BRI_TE HDLCFCS (In use)
As you can see from the prompt, no special permissions are required.
The parsing code is mostly in [kernel/]xpp/utils/Zconf/Zaptel/Span.pm .
--
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 |
|
Back to top |
|
|
vinz486 at gmail.com Guest
|
Posted: Tue May 20, 2008 2:55 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
2008/5/17 bilal ghayyad <bilmar_gh at yahoo.com>:
Quote: | So no way to discover the status of FXO if a cable
pluged or not?
|
Did you read my previou msg????
Hookstate (FXS only): Offhook <------Cable plugged
Hookstate (FXS only): Onhook <------Cable unplugged
--
PicoStreamer - the real WEB live streaming software
vinz486.com |
|
Back to top |
|
|
cwallace at lodgingcom... Guest
|
Posted: Wed May 21, 2008 8:01 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
At 9:55 PM on 20 May 2008, Vinz486 wrote:
Quote: | 2008/5/17 bilal ghayyad <bilmar_gh at yahoo.com>:
Quote: | So no way to discover the status of FXO if a cable
|
| ^^^
Foxtrot X-ray *Oscar*
Quote: |
Did you read my previou msg????
Hookstate (FXS only): Offhook <------Cable plugged
Hookstate (FXS only): Onhook <------Cable unplugged
| ^^^
Foxtrot X-ray *Sierra*
When it says "FXS only", I think it's reasonable to assume that FXO is
excluded.
--
C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0
Debian Hint #19: If you're interested in building packages from source,
you should consider installing the apt-src package. |
|
Back to top |
|
|
vinz486 at gmail.com Guest
|
Posted: Fri May 23, 2008 3:47 pm Post subject: [asterisk-users] Discover connected Zap lines |
|
|
2008/5/22 C. Chad Wallace <cwallace at lodgingcompany.com>:
Quote: | When it says "FXS only", I think it's reasonable to assume that FXO is
excluded.
|
FXS is the signalling of FXO cards.
I have only FXO cards.
--
PicoStreamer - the real WEB live streaming software
vinz486.com |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|