summaryrefslogtreecommitdiff
path: root/xpp/utils/zapconf
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-06 22:54:16 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-06 22:54:16 +0000
commit3b3d8f7b1186f672e16cd7e4ded2f405ec43cb1c (patch)
tree5e592d92e3030b4eb28cab7585f769dbbeab2d74 /xpp/utils/zapconf
parent07b404b68141bc981adbc1f5a00cbe90116fb9c1 (diff)
xpp.r5512:
* Build: - Zaptel >= 1.4.9 is migrating to storing kernel stuff in zaptel/kernel/* - We conditionally use old/new directory scheme: In xpp/Kbuild and xpp/utils/Makefile use ZAP_KERNEL variable, so it's not confused with ZAPTEL_DIR (which appears in zaptel/Makefile as well). - Fix compile warnings on 64 bit systems. - Compile fixes for kernel-2.6.24 * UDEV: - /etc/udev/rules.d/xpp.rules now uses XPP_INIT_DIR to find astribank_hook. - astribank_hook: Modify to do nothing. Add some documentation. * Autoconfiguration -- zapconf: - Don't fail zapconf et.al. if no config file was found. - Skip the 'IRQ Missing:' line in /proc/zaptel/nnn for wcte1xp(?). - Add some newer Digium cards to our hardware inventory. - Partially handle cases where the /proc/zaptel strings does not contain info about E1/T1/J1 or NT/TE. * Better SYNC: - Finer tuning of PLL (New firmware). - Change calculation algorithm of sync offset. It now copes better with the variance in USB frame reception timing. - Statistics: . The view of results was moved from /proc/xpp/XBUS-*/summary to a new /sys/bus/astribanks/devices/xbus-*/timing and enhanced. . A new xpp_timing script shows all astribanks. . A new write only /sys/bus/astribanks/devices/xbus-*/cls is used to clear statistics. Eventually, clearing of XBUS related statistics should be done here. One that was migrated is the clearing of 'PCM [TR]X:' numbers currently appearing in /proc/xpp/XBUS-*/summary (they should be moved too later). - Shorten the strings representation sync_mode ("SYNC_MODE_AB" -> "AB") adapted their use in printk and /proc so the text is clear. - Added a command line parameter xpp.disable_pll_sync to stop all adjustments command to AB (calculations still continue as usual). * PRI: - 4 port support - set clocking master span via ztcfg, like other zaptel devices. * FXO: - Fix false hangups in some countries (voltage fluctuations). - Some countries send caller-id before first ring. Added code to handle caller-id PCM pass through according to a new command line parameter (xpd_fxo.caller_id_style). - No longer sends an event on zt_open. See #12160 . * Misc: - Adapt to zaptel-1.4.8 and above ztscan: added fields returend by new ZT_SPANSTAT_V2 ioctl() - Document sysfs and waitfor_xpds. - Miscelaneous optimizations and bugfixes. - Remove deprecated pcm_tasklet parameter. The rx_tasklet parameter has replaced it a long time ago. - Add RX_CMD counter to /proc/xpp/XBUS-*/summary - Unclutter some of the usb disconnect messages. - xpp_usb: minor preformance improvements in receive. Expose the number of pending receive URB's in /proc/xpp/XBUS-*/xpp_usb git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3952 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/zapconf')
-rwxr-xr-xxpp/utils/zapconf29
1 files changed, 28 insertions, 1 deletions
diff --git a/xpp/utils/zapconf b/xpp/utils/zapconf
index dd6ab1f..7f94f6b 100755
--- a/xpp/utils/zapconf
+++ b/xpp/utils/zapconf
@@ -67,6 +67,7 @@ my $lc_country = 'us';
my $loadzone = $lc_country;
my $defaultzone = $lc_country;
my $bri_sig_style = 'bri_ptmp';
+my $brint_overlap = 'no';
my %zaptel_default_vars = (
base_exten => \$base_exten,
@@ -87,6 +88,7 @@ my %zaptel_default_vars = (
],
group_lines => \$default_group{FXO},
ZAPBRI_SIGNALLING => \$bri_sig_style,
+ brint_overlap => \$brint_overlap,
);
sub map_zaptel_defaults {
@@ -246,6 +248,25 @@ TAIL
select $old;
}
+my %DefaultConfigs = (
+ context => 'default',
+ group => '63', # FIXME: should not be needed.
+ overlapdial => 'no',
+ busydetect => 'no',
+ rxgain => 0,
+ txgain => 0,
+);
+
+sub reset_zapata_values {
+ foreach my $arg (@_) {
+ if (exists $DefaultConfigs{$arg}) {
+ print "$arg = $DefaultConfigs{$arg}\n";
+ } else {
+ print "$arg =\n";
+ }
+ }
+}
+
sub gen_zapata_digital($) {
my $span = shift || die;
my $num = $span->num() || die;
@@ -254,6 +275,7 @@ sub gen_zapata_digital($) {
my $termtype = $span->termtype() || die "$0: Span #$num -- unkown termtype [NT/TE]\n";
my $group = $default_group{"$type"};
my $context = $default_context{"$type"};
+ my @to_reset = qw/context group/;
die "$0: missing default group (termtype=$termtype)\n" unless defined($group);
die "$0: missing default context\n" unless $context;
@@ -263,13 +285,18 @@ sub gen_zapata_digital($) {
if($span->is_bri() and $bri_sig_style eq 'bri_ptmp') {
$sig .= '_ptmp';
}
+ if ($span->is_bri() && $termtype eq 'NT' && $brint_overlap eq 'yes') {
+ print "overlapdial = yes\n";
+ push(@to_reset, qw/overlapdial/);
+ }
+
$group .= "," . (10 + $num); # Invent unique group per span
printf "group=$group\n";
printf "context=$context\n";
printf "switchtype = %s\n", $span->switchtype;
printf "signalling = %s\n", $sig;
printf "channel => %s\n", bchan_range($span);
- printf "group=\ncontext=default\n";
+ reset_zapata_values(@to_reset);
}
sub gen_zapata_channel($) {