summaryrefslogtreecommitdiff
path: root/xpp/utils/genzaptelconf
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/genzaptelconf
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/genzaptelconf')
-rwxr-xr-xxpp/utils/genzaptelconf24
1 files changed, 20 insertions, 4 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)