summaryrefslogtreecommitdiff
path: root/xpp/utils/zt_registration
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/utils/zt_registration')
-rwxr-xr-xxpp/utils/zt_registration41
1 files changed, 39 insertions, 2 deletions
diff --git a/xpp/utils/zt_registration b/xpp/utils/zt_registration
index d6d0278..9a8323f 100755
--- a/xpp/utils/zt_registration
+++ b/xpp/utils/zt_registration
@@ -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;
@@ -73,7 +74,7 @@ zt_registration [on|off]
=head1 DESCRIPTION
-Without parameters, show all connected XPD's sorted by physical connector order.
+Without parameters, show all connected XPDs sorted by physical connector order.
Each one is show to be unregistered (off), or registered to a specific zaptel span
(the span number is shown).
@@ -84,3 +85,39 @@ All registerations/deregisterations are sorted by physical connector string.
off -- deregisters all XPD's from zaptel.
on -- registers all XPD's to zaptel.
+
+=head2 Sample Output
+
+ $ zt_registration
+ XBUS-02 usb-0000:00:1d.7-3
+ XBUS-02/XPD-00: on Span 9
+ XBUS-02/XPD-10: on Span 10
+ XBUS-02/XPD-20: on Span 11
+ XBUS-02/XPD-30: on Span 12
+ XBUS-01 usb-0000:00:1d.7-4
+ XBUS-01/XPD-00: on Span 13
+ XBUS-01/XPD-10: on Span 14
+ XBUS-01/XPD-20: on Span 15
+ XBUS-01/XPD-30: on Span 16
+ XBUS-00 usb-0000:00:1d.7-5
+ XBUS-00/XPD-00: on Span 17
+ XBUS-00/XPD-10: on Span 18
+ XBUS-00/XPD-20: on Span 19
+ XBUS-00/XPD-30: on Span 20
+
+=head1 FILES
+
+=over
+
+=item /proc/xpp/XBUS-nn/XPD-mm/zt_registration
+
+Reading from this file shows if if the if the specific XPD is
+registered. Writing to it 0 or 1 registers / unregisters the device.
+
+This should allow you to register / unregister a specific XPD rather
+than all of them.
+
+Unregistering an XPD will fail if the span is in use (has some channels
+that are in use by e.g. Asterisk).
+
+=back