3
# Written by Oron Peled <oron@actcom.co.il>
4
# Copyright (C) 2007, Xorcom
5
# This program is free software; you can redistribute and/or
6
# modify it under the same terms as Perl itself.
8
# $Id: lszaptel 3793 2008-02-04 23:00:48Z tzafrir $
12
BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/zconf"); }
17
use Zaptel::Xpp::Xbus;
20
my @xbuses = Zaptel::Xpp::xbuses("SORT_CONNECTOR");
21
my @xpds = map { $_->xpds } @xbuses;
23
foreach my $span (Zaptel::spans()) {
24
my $spanno = $span->num;
29
@lines = @{$xpd->lines} if defined $xpd;
30
printf "### Span %2d: %s %s\n", $span->num, $span->name, $span->description;
31
foreach my $chan ($span->chans()) {
36
my ($type) = map { $type_map{$_} or $_ } $chan->type || ("unknown");
38
$batt = "(battery)" if $chan->battery;
39
printf "%3d %-10s %-10s %s %s\n",
40
$chan->num, $type, $chan->signalling, $chan->info, $batt;
49
lszaptel - List all zaptel channels with their types and spans.
59
### Span 1: WCTDM/0 "Wildcard TDM400P REV E/F Board 1"
64
### Span 2: XBUS-00/XPD-00 "Xorcom XPD #00/00: FXO"
66
6 FXO FXSKS (In use) (no pcm)
67
7 FXO FXSKS (In use) (no pcm)
68
8 FXO FXSKS (In use) (no pcm)
69
9 FXO FXSKS (In use) (no pcm)
70
10 FXO FXSKS (In use) (no pcm)
71
11 FXO FXSKS (In use) (no pcm)
72
12 FXO FXSKS (In use) (no pcm)
73
### Span 3: XBUS-00/XPD-10 "Xorcom XPD #00/10: FXO"
74
13 FXO FXSKS (In use) (no pcm)
75
14 FXO FXSKS (In use) (no pcm)
76
15 FXO FXSKS (In use) (no pcm)
77
16 FXO FXSKS (In use) (no pcm)
78
17 FXO FXSKS (In use) (no pcm)
79
18 FXO FXSKS (In use) (no pcm)
80
19 FXO FXSKS (In use) (no pcm)
81
20 FXO FXSKS (In use) (no pcm)
85
### Span 6: XBUS-01/XPD-00 "Xorcom XPD #01/00: FXS"
87
38 FXS FXOLS (In use) (no pcm)
88
39 FXS FXOLS (In use) (no pcm)
89
40 FXS FXOLS (In use) (no pcm)
90
41 FXS FXOLS (In use) (no pcm)
91
42 FXS FXOLS (In use) (no pcm)
92
43 FXS FXOLS (In use) (no pcm)
93
44 FXS FXOLS (In use) (no pcm)
94
45 Output FXOLS (In use) (no pcm)
95
46 Output FXOLS (In use) (no pcm)
96
47 Input FXOLS (In use) (no pcm)
97
48 Input FXOLS (In use) (no pcm)
98
49 Input FXOLS (In use) (no pcm)
99
50 Input FXOLS (In use) (no pcm)
101
The first column is the type of the channel (port, for an analog device)
102
and the second one is the signalling (if set).
106
lszaptel is a somewhat glorified 'cat /proc/zaptel/*' . Unlike that
107
command, it sorts the spans with the proper order. It also formats the
108
output slightly differently.