Code Search for Developers
 
 
  

retrieve_parse_amportal_conf.pl from freePBX at Krugle


Show retrieve_parse_amportal_conf.pl syntax highlighted

#!/usr/bin/perl -w
# amportal config parser for retrieve_*.pl
#
# Julien BLACHE <julien.blache@linbox.com>
#
# Released under the terms of the GNU General Public License *v2* as published by
# the Free Software Foundation.

sub parse_amportal_conf
{
	my $filename = $_[0];
	my %ampconf = (
		AMPDBENGINE => "mysql",
		AMPDBNAME => "asterisk",
		AMPENGINE => "asterisk",
	);
	
	open(AMPCONF, $filename) or die "Cannot open $filename ($!)";
	
	while (<AMPCONF>)
	{
		if ($_ =~ /^\s*([a-zA-Z0-9_]+)\s*=\s*(.*)\s*([;#].*)?/)
		{
			$ampconf{$1} = $2;
		}
	}
	close(AMPCONF);
	
	return \%ampconf;
}

# perl depends on this
1;




See more files for this project here

freePBX

FreePBX is the most powerful GUI (Web Based) configuration tool for Asterisk. It provides everything that a standard legacy phone system can, plus a huge amount of new features. All documentation and information is avalable from http://www.freepbx.org

Project homepage: http://sourceforge.net/projects/amportal
Programming language(s): PHP,Shell Script,SQL
License: other

  archive_recordings
  bounce_op.sh
  freepbx-cron-scheduler.php
  freepbx_engine
  libfreepbx.confgen.php
  module_admin
  retrieve_conf
  retrieve_op_conf_from_mysql.pl
  retrieve_parse_amportal_conf.pl