From 48ca4cc864cabbf7bd184a3912138628c7878d66 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 28 Apr 2007 19:27:17 +0000 Subject: [PATCH] updates, cleanups, and clarifications to the sample conf files. Uses more of the preprocessor variables for simplicity. FSBUILD-2 from Mark D. Anderson. Thanks Mark. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5034 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- conf/conference.conf.xml | 10 ++-- conf/default_context.xml | 6 +- conf/dingaling.conf.xml | 13 ++--- conf/enum.conf.xml | 4 +- conf/freeswitch.xml | 120 +++++++++++++++++++++++++++++++++------ conf/sofia.conf.xml | 13 ++--- scripts/combineconf.pl | 49 ++++++++++++++++ 7 files changed, 172 insertions(+), 43 deletions(-) create mode 100644 scripts/combineconf.pl diff --git a/conf/conference.conf.xml b/conf/conference.conf.xml index a5a3744a14..c5d05dabdb 100644 --- a/conf/conference.conf.xml +++ b/conf/conference.conf.xml @@ -1,8 +1,8 @@ - + - + @@ -29,7 +29,7 @@ - + @@ -81,9 +81,9 @@ - + - + diff --git a/conf/default_context.xml b/conf/default_context.xml index 3b450196cd..047d2c3637 100644 --- a/conf/default_context.xml +++ b/conf/default_context.xml @@ -29,7 +29,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/conf/dingaling.conf.xml b/conf/dingaling.conf.xml index de4f699df3..b7b0ae0fc5 100644 --- a/conf/dingaling.conf.xml +++ b/conf/dingaling.conf.xml @@ -8,12 +8,13 @@ - + - + + @@ -23,9 +24,6 @@ - - - @@ -37,11 +35,10 @@ - - + - + diff --git a/conf/enum.conf.xml b/conf/enum.conf.xml index db77758e7d..3ac7841aee 100644 --- a/conf/enum.conf.xml +++ b/conf/enum.conf.xml @@ -4,8 +4,8 @@ - + - + diff --git a/conf/freeswitch.xml b/conf/freeswitch.xml index 0d1fdd128b..2e0027a291 100644 --- a/conf/freeswitch.xml +++ b/conf/freeswitch.xml @@ -13,34 +13,115 @@ Don't modify it while freeswitch is running cos it is mem mapped in most cases =D --> - - - - + + + + + + + + + + + + + + +
- + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + +
@@ -48,6 +129,8 @@ + +
@@ -66,3 +149,4 @@ + diff --git a/conf/sofia.conf.xml b/conf/sofia.conf.xml index 2b78fba146..afcfd6900c 100644 --- a/conf/sofia.conf.xml +++ b/conf/sofia.conf.xml @@ -1,6 +1,6 @@ - + @@ -28,12 +28,12 @@ - + - - + + @@ -60,9 +60,8 @@ - - - + + diff --git a/scripts/combineconf.pl b/scripts/combineconf.pl new file mode 100644 index 0000000000..3119d50bb9 --- /dev/null +++ b/scripts/combineconf.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl -w +use strict; + +=head1 NAME + +combineconf.pl - expand #include PIs in a freeswitch conf file + +=head1 SYNOPSIS + + # cd conf + # ../scripts/combineconf.pl freeswitch.xml > freeswitch_combined.xml + +=head1 DESCRIPTION + +This is recursive, and will take multiple input files on the command line. + +You need to run it from the working directory that the relative include paths +except to be resolved from. + +=head1 AUTHOR + +Mark D. Anderson (mda@discerning.com) +Released under same terms as Perl, or alternatively the MPL. + +=cut + +use IO::File; + +sub filter_file { + my ($f) = @_; + my $fh = $f eq '-' ? \*STDIN : IO::File->new($f, 'r'); + die "ERROR: Can't open $f: $!\n" unless $fh; + while(<$fh>) { + if (m/