[Pkg-voip-commits] r1083 - zaptel/trunk/debian
Tzafrir Cohen
tzafrir-guest at costa.debian.org
Wed Dec 14 09:47:05 UTC 2005
Author: tzafrir-guest
Date: 2005-12-14 09:47:04 +0000 (Wed, 14 Dec 2005)
New Revision: 1083
Modified:
zaptel/trunk/debian/genzaptelconf
Log:
up to date version of genzaptelconf (0.4.0).
* Better support of zapbri.
* however relies on text from span header (for TE/NT mode)
Modified: zaptel/trunk/debian/genzaptelconf
===================================================================
--- zaptel/trunk/debian/genzaptelconf 2005-12-09 22:17:47 UTC (rev 1082)
+++ zaptel/trunk/debian/genzaptelconf 2005-12-14 09:47:04 UTC (rev 1083)
@@ -38,7 +38,7 @@
# Don't override variables here. Override them in /etc/default/zaptel
# /etc/default/zaptel may override the following variables
-VERSION=0.3.7
+VERSION=0.4.0
lc_country=us
#method=ls
#method=ks
@@ -65,6 +65,11 @@
# and deleted in the end on update_extensions_defs
tmp_dir=
+# A list of all modules. This is:
+# - the list of modules which will be unloaded (in this order)
+# - the list of modules which will be probed (in this order)
+ALL_MODULES="zaphfc qozap wctdm wctdm24xxp wcfxo wcfxs pciradio tor2 torisa wct1xxp wct4xxp wcte11xp wcusb ztd_eth ztdummy xpp_usb xpp"
+
# read default configuration from /etc/default/zaptel
if [ -r $ZAPTEL_BOOT ]; then . $ZAPTEL_BOOT; fi
@@ -74,7 +79,6 @@
# work around a bug (that was already fixed) in the installer:
if [ "$lc_country" = '' ]; then lc_country=us; fi
-ALL_MODULES="zaphfc qozap wctdm wcfxo wcfxs pciradio tor2 torisa wct1xxp wct4xxp wcte11xp wcusb ztd_eth ztdummy xpp_usb xpp"
force_stop_ast=no
do_detect=no
do_unload=no
@@ -274,6 +278,10 @@
else # we have may have set it. So reset it:
echo "callerid=\"\" <0>"
echo "mailbox="
+ if [ "$group_manual" != "yes" ]
+ then
+ echo "group=$group_lines"
+ fi
if [ "$context_manual" != "yes" ]
then
echo "context=$context_lines"
@@ -497,7 +505,16 @@
echo 'ami' >$tmp_dir/span_coding
echo '' >$tmp_dir/span_switchtype
echo '' >$tmp_dir/span_signalling
-
+
+ if echo $title | egrep -q '((quad|octo)BRI PCI ISDN Card.* \[NT\]\ |octoBRI \[NT\] |HFC-S PCI A ISDN.* \[NT\] )'
+ then
+ echo 'nt' >$tmp_dir/span_termtype
+ else
+ if echo $title | egrep -q '((quad|octo)BRI PCI ISDN Card.* \[TE\]\ |octoBRI \[TE\] |HFC-S PCI A ISDN.* \[TE\] )'
+ then
+ echo 'te' >$tmp_dir/span_termtype
+ fi
+ fi
# The rest of the lines are per-channel lines
sed -e 1,2d $procfile | \
while read line
@@ -530,7 +547,12 @@
*ZTHFC*/*|*ztqoz*/*)
echo 'ccs' >$tmp_dir/span_framing
echo 'euroisdn' >$tmp_dir/span_switchtype
- echo 'bri_net_ptmp' >$tmp_dir/span_signalling
+ if [ "`cat $tmp_dir/span_termtype`" = 'nt' 2>/dev/null ]
+ then
+ echo 'bri_net' >$tmp_dir/span_signalling
+ else
+ echo 'bri_cpe' >$tmp_dir/span_signalling
+ fi
;;
*WCT1/*)
echo 'esf' >$tmp_dir/span_framing
@@ -563,7 +585,7 @@
then # write PRI span ocnfig:
# read files to variables:
for suffix in num begin end timing lbo framing \
- coding switchtype signalling yellow
+ coding switchtype signalling yellow termtype
do
eval span_$suffix=`cat $tmp_dir/span_$suffix 2>/dev/null`
done
@@ -583,10 +605,42 @@
case "$mode" in
zaptel)
echo span=$span_num,$span_timing,$span_lbo,$span_framing,$span_coding$span_yellow
+ if [ "$span_termtype" != '' ]
+ then echo "# termtype: $span_termtype"
+ fi
echo bchan=$bchans
echo dchan=$dchan
;;
zapata)
+ if [ "$span_termtype" != '' ]
+ then
+ # an ISDN card's span that we know if it is in NT mode or TE mode.
+ # NT is the same as FXS for us and TE is the same as FXO
+ if [ "$span_termtype" = 'nt' ]
+ then
+ #echo "callerid=\"Channel $chan\" <$exten>"
+ #echo "mailbox=$exten"
+ if [ "$group_manual" != "yes" ]
+ then
+ echo "group=$group_phones"
+ fi
+ if [ "$context_manual" != "yes" ]
+ then
+ echo "context=$context_phones"
+ fi
+ else # we have may have set it. So reset it:
+ #echo "callerid=\"\" <0>"
+ #echo "mailbox="
+ if [ "$group_manual" != "yes" ]
+ then
+ echo "group=$group_lines"
+ fi
+ if [ "$context_manual" != "yes" ]
+ then
+ echo "context=$context_lines"
+ fi
+ fi
+ fi
echo "switchtype = $span_switchtype"
echo "signalling = $span_signalling"
echo "channel => $bchans"
More information about the Pkg-voip-commits
mailing list