[Asterisk-cvs] asterisk-addons/res_perl/INC config_init.pm, NONE,
1.1 asterisk_init.pm, 1.2, 1.3
anthm at lists.digium.com
anthm at lists.digium.com
Mon Jan 31 09:09:46 CST 2005
- Previous message: [Asterisk-cvs] asterisk/channels chan_vpb.c,1.65,1.66
- Next message: [Asterisk-cvs] asterisk-addons/res_perl AstAPIBase.c, 1.6,
1.7 AstAPIBase_wrap.c, 1.6, 1.7 res_perl.c, 1.6,
1.7 res_perl.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk-addons/res_perl/INC
In directory mongoose.digium.com:/tmp/cvs-serv17094/INC
Modified Files:
asterisk_init.pm
Added Files:
config_init.pm
Log Message:
update to match new config changes and add experimental change to config using a 2nd interpereter
--- NEW FILE: config_init.pm ---
use Socket;
use POSIX;
use AstConfig;
use Data::Dumper;
use AstAPI;#<----- need this to talk to asterisk.
use DBI;
use ARIS::DB;
sub perl_realtime() {
asterisk_verbose(0,sprintf("%s\n",join(":", at _)));
return (name => "fred", age => 12);
}
sub perl_update() {
asterisk_verbose(0,sprintf("%s\n",join(":", at _)));
}
# this function implements the perl config engine gateway
# basicly, you get the name of the config file as the arg
# and you need to init a AstConfig obj ($config) and return the
# $config->return_data() func. this will config queues.conf
# as shown you could also connect to a DB here etc and build any
# config you see fit.
sub perl_config() {
my($db,$table,$arg) = @_;
if($arg eq "queues.conf") {
$config->add_cat("somequeue");
$config->add_var("somequeue","Member","Agent/1000,1234,1");
$config->add_var("somequeue","Member","Agent/1001,1234,1");
$config->add_cat("anotherqueue");
$config->add_var("anotherqueue","Member","Agent/1000,1234,1");
$config->add_var("anotherqueue","Member","Agent/1001,1234,1");
return $config->return_data();
}
}
1;
Index: asterisk_init.pm
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/res_perl/INC/asterisk_init.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- asterisk_init.pm 15 Nov 2004 14:29:21 -0000 1.2
+++ asterisk_init.pm 31 Jan 2005 15:11:11 -0000 1.3
@@ -9,10 +9,10 @@
# <configuration settings>
%PERL_CONFIG = (
- USE_CDR => 0, # enable CDR
- USE_SWITCH => 0, # enable switch
- USE_CONFIG => 0, # enable config
- CLONE_ON_CONFIG => 1
+ USE_CDR => 0, # enable CDR
+ USE_SWITCH => 0, # enable switch
+ USE_CONFIG => 0, # enable config
+ CONFIG_USE_MOD => "config_init" # module to use for config
);
# </configuration settings>
- Previous message: [Asterisk-cvs] asterisk/channels chan_vpb.c,1.65,1.66
- Next message: [Asterisk-cvs] asterisk-addons/res_perl AstAPIBase.c, 1.6,
1.7 AstAPIBase_wrap.c, 1.6, 1.7 res_perl.c, 1.6,
1.7 res_perl.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list