summaryrefslogtreecommitdiff
path: root/xpp/utils/genzaptelconf
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-15 13:52:45 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-15 13:52:45 +0000
commit833b602248b2b6ef5efe9e9d80811b03c5d63d75 (patch)
tree4cb2dc27911736cca79a1354bdb8499bf35b32ec /xpp/utils/genzaptelconf
parent682b58e73f6fb59978e3b82932795c2708795781 (diff)
r1719@boole: tzafrir | 2006-12-15 15:50:57 +0200
Sync to xpp RELEASE-1.2.0 2933. r2847@boole: diego | 2006-12-03 10:33:00 +0200 added documentation which explains which packages are needed to build the drivers on different distributions. r2862@boole: tzafrir | 2006-12-05 08:43:50 +0200 README.Astribank: A typo in the sample config (changeset:2861). r2891@boole: tzafrir | 2006-12-08 01:11:45 +0200 Re-accept changeset:2832 after all. r2892@boole: tzafrir | 2006-12-08 02:46:07 +0200 Merge genzaptelconf changeset:2866 from trunk: * Zapata comment on unidentified channel goes to $zapata_file * Correct pattern for Sangoma A200 card's channels. r2893@boole: tzafrir | 2006-12-08 03:11:37 +0200 genzaptelconf: * Add options xpp_fxo_rxgain: add a custom rxgain for every XPP FXO channel. * Do print the original line for every channel. r2909@boole: tzafrir | 2006-12-10 20:03:59 +0200 Add some sleeps in older kernels in the firmware loading script. r2932@boole: tzafrir | 2006-12-14 17:30:12 +0200 Make the warning about a call to off-hook FXO debug. At least if we cannot suppress it at module load time. r2933@boole: tzafrir | 2006-12-14 17:32:00 +0200 Don't redefine 'bool' on newer kerenls to fix building with kernel 2.6.19. Taken from Digium tree. (from changeset:2930) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1720 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/genzaptelconf')
-rwxr-xr-xxpp/utils/genzaptelconf24
1 files changed, 16 insertions, 8 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index a000ec0..3e89915 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -295,6 +295,9 @@ print_pattern() {
# sadly, both input ports and output ports go into the same span as
# the FXS ports. Thus we need to separate between them. See also
# the zapata.conf section:
+
+ echo ";;; line=\"$line\"" >> $zapata_file
+
if [ "$astbank_type" != '' ];
then echo "# astbanktype: $astbank_type" >>$zaptel_file;
fi
@@ -369,7 +372,14 @@ print_pattern() {
esac
reset_values="$reset_values cidsignalling cidstart"
fi
- echo ";;; line=\"$line\"" >> $zapata_file
+ case "$line" in
+ *XPP_FXO*)
+ if [ "$xpp_fxo_rxgain" != '' ]; then
+ echo "rxgain=$xpp_fxo_rxgain" >> $zapata_file
+ reset_values="$reset_values rxgain"
+ fi
+ ;;
+ esac
# if kewlstart is not used, busydetect has to be employed:
if [ "$method" = 'ls' ]
then
@@ -576,13 +586,11 @@ reset_zapata_entry() {
for arg in "$@"; do
case "$arg" in
busydetect) echo "busydetect=no" >>$conf_file;;
- callerid) echo "callerid=" >>$conf_file;;
- cidstart) echo "cidstart=" >>$conf_file;;
- cidsignalling) echo "cidsignalling=" >>$conf_file;;
context) echo "context=default" >>$conf_file;;
- group) echo "group=" >>$conf_file;;
immediate) echo "immediate=no" >>$conf_file;;
- mailbox) echo "mailbox=" >>$conf_file;;
+ rxgain) echo "rxgain=0" >>$conf_file;;
+ txgain) echo "txgain=0" >>$conf_file;;
+ *) echo "$arg=" >>$conf_file;;
esac
done
}
@@ -692,7 +700,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
@@ -812,7 +820,7 @@ EOF
list) echo "# ??: $line";;
files)
echo "# ??: $line" >>$zaptel_file
- echo "; ??: $line" >>$zaptel_file
+ echo "; ??: $line" >>$zapata_file
esac
;;
esac