summaryrefslogtreecommitdiff
path: root/xpp/utils
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-11-07 14:22:02 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-11-07 14:22:02 +0000
commit897694ea9f186e44db769ec1f0983ff2d6cb0178 (patch)
tree212f8c8c3b089597ee066bcdf7ef14ca9141bd37 /xpp/utils
parentfbebb285f6e2dc3cc3f3eed42b5ca1e82e263566 (diff)
* zaptel-perl, genzaptelconf: Detect and list Rhino cards.
* zaptel-perl: Fix reporting of empty slots in analog Digium cards. * genzaptelconf: More readable case-s. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3217 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils')
-rwxr-xr-xxpp/utils/genzaptelconf24
-rw-r--r--xpp/utils/zconf/Zaptel/Chans.pm10
-rw-r--r--xpp/utils/zconf/Zaptel/Hardware/PCI.pm14
3 files changed, 43 insertions, 5 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index d5ce1b9..47ef409 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -674,7 +674,7 @@ detect_digital_channel() {
echo $span_num >$tmp_dir/span_num
case "$line" in
- *ZTHFC*/*|*ztqoz*/*|*XPP_BRI_*/*)
+ *ZTHFC*/* | *ztqoz*/* | *XPP_BRI_*/*)
# BRI channel
echo 'ccs' >$tmp_dir/span_framing
echo 'euroisdn' >$tmp_dir/span_switchtype
@@ -691,7 +691,8 @@ detect_digital_channel() {
#Does this mean anything?
echo 'gsm' >$tmp_dir/span_signalling
;;
- *TE[24]/*|*WCT1/*|*Tor2/*|*TorISA/*|*WP[TE]1/*|*XPP_PRI*)
+ *TE[24]/* | *WCT1/* | *Tor2/* | *TorISA/* | *WP[TE]1/* | \
+ *R[124]T1/* | *XPP_PRI*)
# FIXME: handle cwain around here.
# name: *cwain[12]/* . Always E1.
@@ -951,7 +952,7 @@ EOF
# in case this is a real channel.
chan_num=`echo $line |awk '{print $1}'`
case "$line" in
- *WCTDM/*|*\ WRTDM/*|*OPVXA1200/*)
+ *WCTDM/* | *\ WRTDM/* | *OPVXA1200/*)
# TDM400P/2400P and similar cards (Sangoma A200, OpenVox A1200)
# this can be either FXS or FXO
maybe_fxs=0
@@ -987,6 +988,18 @@ EOF
# Astribank FXS span (regular port)
print_pattern $chan_num fxo $mode
;;
+ *' FXO'/*)
+ # FXO module (probably Rhino)
+ print_pattern $chan_num fxs $mode
+ ;;
+ *' FXS'/*)
+ # FXS module (probably Rhino)
+ print_pattern $chan_num fxo $mode
+ ;;
+ *' ---'/*)
+ # no module (probably Rhino)
+ continue
+ ;;
*XPP_OUT/*)
# Astribank FXS span (output port)
print_pattern -a output $chan_num fxo $mode
@@ -995,7 +1008,10 @@ EOF
# Astribank FXS span (input port)
print_pattern -a input $chan_num fxo $mode
;;
- *ZTHFC*/*|*ztqoz*/*|*ztgsm/*|*TE[24]/*|*WCT1/*|*Tor2/*|*TorISA/*|*XPP_BRI_*/*|*WP[TE]1/*|*XPP_[PB]RI*)
+ *ZTHFC*/* | *ztqoz*/* |*ztgsm/* |*TE[24]/* | \
+ *WCT1/*|*Tor2/* | *TorISA/* | \
+ *XPP_BRI_*/* | *WP[TE]1/* | *R[124]T1/* | \
+ *XPP_[PB]RI*)
detect_digital_channel "$line" "$chan_num" "$span_num"
;;
'') ;; # Empty line (after span header)
diff --git a/xpp/utils/zconf/Zaptel/Chans.pm b/xpp/utils/zconf/Zaptel/Chans.pm
index c364dd5..f105a8c 100644
--- a/xpp/utils/zconf/Zaptel/Chans.pm
+++ b/xpp/utils/zconf/Zaptel/Chans.pm
@@ -39,6 +39,12 @@ sub new($$$$$$) {
my $type;
if($fqn =~ m|\bXPP_(\w+)/.*$|) {
$type = $1; # One of our AB
+ } elsif ($fqn =~ m{\bFXS/.*}) {
+ $type = "FXS"; # likely Rhino
+ } elsif ($fqn =~ m{\bFXO/.*}) {
+ $type = "FXO"; # likely Rhino
+ } elsif ($fqn =~ m{\b---/.*}) {
+ $type = "EMPTY"; # likely Rhino, empty slot.
} elsif ($fqn =~ m{\b(TE[24]|WCT1|Tor2|TorISA|WP[TE]1|cwain[12])/.*}) {
# TE[24]: Digium wct4xxp
# WCT1: Digium single span card drivers?
@@ -74,7 +80,7 @@ sub probe_type($) {
my $num = $self->num;
my $type;
- if($fqn =~ m:WCTDM/|\ WRTDM/|OPVXA1200/:) {
+ if($fqn =~ m:WCTDM/| WRTDM/|OPVXA1200/:) {
my %maybe;
undef %maybe;
@@ -89,6 +95,8 @@ sub probe_type($) {
$type = 'FXS';
} elsif($maybe{fxs}) {
$type = 'FXO';
+ } else {
+ $type = 'EMPTY';
}
} else {
$type = $self->type;
diff --git a/xpp/utils/zconf/Zaptel/Hardware/PCI.pm b/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
index bd6f6e3..d471c1f 100644
--- a/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
+++ b/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
@@ -90,6 +90,20 @@ my %pci_ids = (
'1397:08b4' => { DRIVER => 'qozap', DESCRIPTION => 'Junghanns QuadBRI ISDN card' },
'1397:16b8' => { DRIVER => 'qozap', DESCRIPTION => 'Junghanns OctoBRI ISDN card' },
'1397:2bd0' => { DRIVER => 'zaphfc', DESCRIPTION => 'HFC-S ISDN BRI card' },
+
+ # Rhino cards (based on pci.ids)
+ '0b0b:0105' => { DRIVER => 'r1t1', DESCRIPTION => 'Rhino R1T1' },
+ '0b0b:0205' => { DRIVER => 'r4fxo', DESCRIPTION => 'Rhino R14FXO' },
+ '0b0b:0206' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino RCB4FXO 4-channel FXO analog telphony card' },
+ '0b0b:0305' => { DRIVER => 'r1t1', DESCRIPTION => 'Rhino R1T1' },
+ '0b0b:0405' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino R8FXX' },
+ '0b0b:0406' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino RCB8FXX 8-channel modular analog telphony card' },
+ '0b0b:0505' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino R24FXX' },
+ '0b0b:0506' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino RCB24FXS 24-Channel FXS analog telphony card' },
+ '0b0b:0605' => { DRIVER => 'rxt1', DESCRIPTION => 'Rhino R2T1' },
+ '0b0b:0705' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino R24FXS' },
+ '0b0b:0706' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino RCB24FXO 24-Channel FXO analog telphony card' },
+ '0b0b:0906' => { DRIVER => 'rcbfx', DESCRIPTION => 'Rhino RCB24FXX 24-channel modular analog telphony card' },
);
$ENV{PATH} .= ":/usr/sbin:/sbin:/usr/bin:/bin";