diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-18 14:31:07 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-18 14:31:07 +0000 |
commit | cfd61537b47387b0fb5c8228baad6cec16d8f6e6 (patch) | |
tree | 108deea65c09c7c273a9b981f8783efcd433eaea /xpp/utils/zt_registration | |
parent | 4391b4a6ee42bdfd8e097c5ee5485e9eb13f19a0 (diff) |
xpp r5151:
* xpd_pri: Basically ready.
* PCM synchronization changes:
- Each Astribank unit ticks independently. Each with its own PLL.
- HOST synchronization is gone. Loading of xpp will no longer cause
useless 250 ticks per second if you have no Astribank.
- Synchronization from the zaptel sync master requires setting
ZAPTEL as sync source (xpp_sync ZAPTEL).
* rx_tasklet is now a parameter of the module xpp, rather than of xpp_usb.
* New FPGA firmware: 5128 (1151) / 5122 (1141, 1131):
- Fixes synchronization issues.
- PRI module: E1 should now work.
* perl module and utilities:
- Modules no longer magically scan system on initialization.
- Scanning is by calling explicit methods.
- "Serial" has been renamed "Label". It is basically unique, but
should be modifieble.
- Some basic documentation of zaptel perl modules.
* Default sort order of zt_registration is back to SORT_CONNCTOR.
* zt_registration proc file now shows the number of span registered to
if registered. Try: grep . /proc/xpp/XBUS-*/XPD-*/zt_registration
* genzaptelconf: Allow using a custom command instead of
/etc/init.d/asterisk to start/stop asterisk.
* Fixed the typo "Slagish".
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3506 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/zt_registration')
-rwxr-xr-x | xpp/utils/zt_registration | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/xpp/utils/zt_registration b/xpp/utils/zt_registration index 1b26f74..3bdc642 100755 --- a/xpp/utils/zt_registration +++ b/xpp/utils/zt_registration @@ -42,11 +42,15 @@ sub myprintf { my @spans = Zaptel::spans; -foreach my $xbus (Zaptel::Xpp::xbuses('SORT_SERIAL')) { - myprintf "%-10s\t%s\t%s\n", $xbus->name, $xbus->serial, $xbus->connector; +foreach my $xbus (Zaptel::Xpp::xbuses('SORT_CONNECTOR')) { + myprintf "%-10s\t%s\t%s\n", $xbus->name, $xbus->label, $xbus->connector; next unless $xbus->status eq 'CONNECTED'; foreach my $xpd ($xbus->xpds()) { my $prev = $xpd->zt_registration($on); + if(!defined($prev)) { # Failure + printf "%s: Failed %s\n", $xpd->fqn, $!; + next; + } myprintf "\t%-10s: ", $xpd->fqn; if(!defined($on)) { # Query only my ($span) = grep { $_->name eq $xpd->fqn } @spans; @@ -54,10 +58,6 @@ foreach my $xbus (Zaptel::Xpp::xbuses('SORT_SERIAL')) { myprintf "%s %s\n", state2str($prev), $spanstr ; next; } - if(!defined($prev)) { # Failure - printf "Failed %s\n", $!; - next; - } myprintf "%3s ==> %3s\n", state2str($prev), state2str($on); } } @@ -74,12 +74,11 @@ zt_registration [on|off] =head1 DESCRIPTION -Without parameters, show all connected XPDs sorted by serial number and -physical connector order. Each one is show to be unregistered (off), or -registered to a specific zaptel span (the span number is shown). +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). -All registerations/deregisterations are sorted by serial number and -(lacking that) physical connector string. +All registerations/deregisterations are sorted by physical connector string. Span registration should generally always succeed. Span unregistration may fail if channels from the span are in use by e.g. asterisk. In such a case @@ -111,10 +110,6 @@ Astribanks: XBUS-01/XPD-20: on Span 9 XBUS-01/XPD-30: on Span 10 -In this example the XBUS-02 has an empty serial number and thus -becomes the first Astribank. The other two are sorted according to their -serial numbers. - =head1 FILES =over |