diff options
Diffstat (limited to 'xpp/utils/lszaptel')
-rwxr-xr-x | xpp/utils/lszaptel | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/xpp/utils/lszaptel b/xpp/utils/lszaptel index ecb8ced..3126c8a 100755 --- a/xpp/utils/lszaptel +++ b/xpp/utils/lszaptel @@ -8,7 +8,8 @@ # $Id$ # use strict; -BEGIN { my $dir = $0; $dir =~ s:/[^/]+$::; unshift(@INC, "$dir", "$dir/zconf"); } +use File::Basename; +BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/zconf"); } use Zaptel; use Zaptel::Span; @@ -20,7 +21,7 @@ foreach my $span (Zaptel::spans()) { OUT => 'Output', IN => 'Input' ); - my ($type) = map { $type_map{$_} or $_ } $chan->type; + my ($type) = map { $type_map{$_} or $_ } $chan->type || ("unknown"); printf "%3d %-10s %-10s %s\n", $chan->num, $type, $chan->signalling, $chan->info; } } @@ -39,18 +40,53 @@ lszaptel Example output: - ### Span 1: XBUS-03/XPD-00 "Xorcom XPD #3/0: FXS" - 1 FXS - 2 FXS - 3 FXS - 4 FXS - 5 FXS - 6 FXS - 7 FXS - 8 FXS - 9 Output - 10 Output - 11 Input - 12 Input - 13 Input - 14 Input + ### Span 1: WCTDM/0 "Wildcard TDM400P REV E/F Board 1" + 1 FXO FXOLS (In use) + 2 FXS FXSKS + 3 FXS FXSKS + 4 FXS FXSKS + ### Span 2: XBUS-00/XPD-00 "Xorcom XPD #00/00: FXO" + 5 FXO FXSKS (In use) + 6 FXO FXSKS (In use) (no pcm) + 7 FXO FXSKS (In use) (no pcm) + 8 FXO FXSKS (In use) (no pcm) + 9 FXO FXSKS (In use) (no pcm) + 10 FXO FXSKS (In use) (no pcm) + 11 FXO FXSKS (In use) (no pcm) + 12 FXO FXSKS (In use) (no pcm) + ### Span 3: XBUS-00/XPD-10 "Xorcom XPD #00/10: FXO" + 13 FXO FXSKS (In use) (no pcm) + 14 FXO FXSKS (In use) (no pcm) + 15 FXO FXSKS (In use) (no pcm) + 16 FXO FXSKS (In use) (no pcm) + 17 FXO FXSKS (In use) (no pcm) + 18 FXO FXSKS (In use) (no pcm) + 19 FXO FXSKS (In use) (no pcm) + 20 FXO FXSKS (In use) (no pcm) + + ... + + ### Span 6: XBUS-01/XPD-00 "Xorcom XPD #01/00: FXS" + 37 FXS FXOLS (In use) + 38 FXS FXOLS (In use) (no pcm) + 39 FXS FXOLS (In use) (no pcm) + 40 FXS FXOLS (In use) (no pcm) + 41 FXS FXOLS (In use) (no pcm) + 42 FXS FXOLS (In use) (no pcm) + 43 FXS FXOLS (In use) (no pcm) + 44 FXS FXOLS (In use) (no pcm) + 45 Output FXOLS (In use) (no pcm) + 46 Output FXOLS (In use) (no pcm) + 47 Input FXOLS (In use) (no pcm) + 48 Input FXOLS (In use) (no pcm) + 49 Input FXOLS (In use) (no pcm) + 50 Input FXOLS (In use) (no pcm) + +The first column is the type of the channel (port, for an analog device) +and the second one is the signalling (if set). + +=head1 FILES + +lszaptel is a somewhat glorified 'cat /proc/zaptel/*' . Unlike that +command, it sorts the spans with the proper order. It also formats the +output slightly differently. |