astpp-commit Mailing List for ASTPP - Open Source Voip Billing (Page 2)
Brought to you by:
darrenkw
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(1) |
Nov
(34) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(8) |
Oct
(3) |
Nov
(11) |
Dec
(6) |
| 2009 |
Jan
(9) |
Feb
(11) |
Mar
(6) |
Apr
(3) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(14) |
Oct
(32) |
Nov
(2) |
Dec
|
| 2010 |
Jan
(1) |
Feb
(11) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
|
Dec
(5) |
| 2011 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <dar...@us...> - 2010-06-05 21:26:35
|
Revision: 2313
http://astpp.svn.sourceforge.net/astpp/?rev=2313&view=rev
Author: darrenkw
Date: 2010-06-05 21:26:28 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
Added support to rate cdrs from multiple hosts. You just run astpp-rate-engine.pl as follows:
astpp-rate-engine.pl cdr_db=remotedatabase cdr_dbpass=password cdr_dbhost=1.1.1.1 cdr_dbuser=remoteuser.
Modified Paths:
--------------
trunk/scripts/astpp-rate-engine.pl
Modified: trunk/scripts/astpp-rate-engine.pl
===================================================================
--- trunk/scripts/astpp-rate-engine.pl 2010-03-24 18:32:47 UTC (rev 2312)
+++ trunk/scripts/astpp-rate-engine.pl 2010-06-05 21:26:28 UTC (rev 2313)
@@ -41,8 +41,16 @@
sub initialize() {
$SIG{INT} = \&catch_zap;
$config = &load_config();
+
+ foreach my $param ( param() ) {
+ $config->{$param} = param($param);
+ }
+
$astpp_db = &connect_db( $config, @output );
$config = &load_config_db($astpp_db,$config);
+ foreach my $param ( param() ) {
+ $config->{$param} = param($param);
+ }
$cdr_db = &cdr_connect_db( $config, @output );
open( LOGFILE, ">>$config->{log_file}" )
|| die "Log Error - could not open $config->{log_file} for writing\n";
@@ -52,8 +60,8 @@
close("LOGFILE");
}
################# Program Starts HERE #################################
-$uniqueid = param('uniqueid'); #$ARGV[0];
-$run_type = param('runtype'); # realtime,batch,price_only
+$uniqueid = param('uniqueid');
+$run_type = param('runtype');
&initialize();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-03-24 18:32:54
|
Revision: 2312
http://astpp.svn.sourceforge.net/astpp/?rev=2312&view=rev
Author: darrenkw
Date: 2010-03-24 18:32:47 +0000 (Wed, 24 Mar 2010)
Log Message:
-----------
Fixed incorrect sql.
Added Paths:
-----------
trunk/sql/astpp-2010-03-24.sql
Added: trunk/sql/astpp-2010-03-24.sql
===================================================================
--- trunk/sql/astpp-2010-03-24.sql (rev 0)
+++ trunk/sql/astpp-2010-03-24.sql 2010-03-24 18:32:47 UTC (rev 2312)
@@ -0,0 +1,1406 @@
+DROP TABLE IF EXISTS `routes`;
+CREATE TABLE routes (
+id INTEGER NOT NULL AUTO_INCREMENT,
+pattern CHAR(40),
+comment CHAR(80),
+connectcost INTEGER NOT NULL,
+includedseconds INTEGER NOT NULL,
+cost INTEGER NOT NULL,
+pricelist CHAR(80),
+inc INTEGER,
+reseller CHAR(50) default NULL,
+precedence INT(4) NOT NULL DEFAULT 0,
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`),
+KEY `pattern` (`pattern`),
+KEY `pricelist` (`pricelist`),
+KEY `reseller` (`reseller`),
+KEY `status` (`status`)
+);
+
+DROP TABLE IF EXISTS `pricelists`;
+CREATE TABLE pricelists (
+name CHAR(40) NOT NULL,
+markup INTEGER NOT NULL DEFAULT 0,
+inc INTEGER NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 1 NOT NULL,
+reseller CHAR(50) default NULL,
+PRIMARY KEY (`name`)
+);
+
+DROP TABLE IF EXISTS `callingcardbrands`;
+CREATE TABLE callingcardbrands (
+name CHAR(40) NOT NULL,
+reseller CHAR(40) NOT NULL DEFAULT '',
+language CHAR(10) NOT NULL DEFAULT '',
+pricelist CHAR(40) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+validfordays CHAR(4) NOT NULL DEFAULT '',
+pin INTEGER NOT NULL DEFAULT 0,
+maint_fee_pennies INTEGER NOT NULL DEFAULT 0,
+maint_fee_days INTEGER NOT NULL DEFAULT 0,
+disconnect_fee_pennies INTEGER NOT NULL DEFAULT 0,
+minute_fee_minutes INTEGER NOT NULL DEFAULT 0,
+minute_fee_pennies INTEGER NOT NULL DEFAULT 0,
+min_length_minutes INTEGER NOT NULL DEFAULT 0,
+min_length_pennies INTEGER NOT NULL DEFAULT 0,
+PRIMARY KEY (`name`),
+ KEY `reseller` (`reseller`),
+ KEY `pricelist` (`pricelist`)
+);
+
+DROP TABLE IF EXISTS `callingcardcdrs`;
+CREATE TABLE callingcardcdrs (
+id INTEGER NOT NULL AUTO_INCREMENT,
+cardnumber CHAR(50) NOT NULL DEFAULT '',
+clid CHAR(80) NOT NULL DEFAULT '',
+destination CHAR(40) NOT NULL DEFAULT '',
+disposition CHAR(20)NOT NULL DEFAULT '',
+callstart CHAR(40) NOT NULL DEFAULT '',
+seconds INTEGER NOT NULL DEFAULT 0,
+debit DECIMAL(20,6) NOT NULL DEFAULT 0.00000,
+credit DECIMAL(20,6) NOT NULL DEFAULT 0.00000,
+status INTEGER DEFAULT 0 NOT NULL,
+uniqueid VARCHAR(60) NOT NULL DEFAULT '',
+notes CHAR(80) NOT NULL DEFAULT '',
+pricelist CHAR(80) NOT NULL DEFAULT '',
+pattern CHAR(80) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `cardnumber` (`cardnumber`)
+);
+
+DROP TABLE IF EXISTS `trunks`;
+CREATE TABLE trunks (
+name VARCHAR(30) NOT NULL,
+tech CHAR(10) NOT NULL DEFAULT '',
+path CHAR(40) NOT NULL DEFAULT '',
+provider CHAR(100) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+dialed_modify TEXT NOT NULL DEFAULT '',
+resellers TEXT NOT NULL DEFAULT '',
+precedence INT(4) NOT NULL DEFAULT 0,
+maxchannels INTEGER DEFAULT 0 NOT NULL,
+ PRIMARY KEY (`name`),
+ KEY `provider` (`provider`),
+ KEY `provider_2` (`provider`)
+);
+
+DROP TABLE IF EXISTS `outbound_routes`;
+CREATE TABLE outbound_routes (
+pattern CHAR(40),
+id INTEGER NOT NULL AUTO_INCREMENT,
+comment CHAR(80) NOT NULL DEFAULT '',
+connectcost INTEGER NOT NULL DEFAULT 0,
+includedseconds INTEGER NOT NULL DEFAULT 0,
+cost INTEGER NOT NULL DEFAULT 0,
+trunk CHAR(80) NOT NULL DEFAULT '',
+inc CHAR(10) NOT NULL DEFAULT '',
+strip CHAR(40) NOT NULL DEFAULT '',
+prepend CHAR(40) NOT NULL DEFAULT '',
+precedence INT(4) NOT NULL DEFAULT 0,
+resellers TEXT NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `trunk` (`trunk`),
+ KEY `pattern` (`pattern`)
+);
+
+DROP TABLE IF EXISTS `dids`;
+CREATE TABLE dids (
+number CHAR(40) NOT NULL,
+account CHAR(50) NOT NULL DEFAULT '',
+connectcost INTEGER NOT NULL DEFAULT 0,
+includedseconds INTEGER NOT NULL DEFAULT 0,
+monthlycost INTEGER NOT NULL DEFAULT 0,
+cost INTEGER NOT NULL DEFAULT 0,
+inc CHAR(10) NOT NULL DEFAULT '',
+extensions CHAR(180) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+provider CHAR(40) NOT NULL DEFAULT '',
+country CHAR (80)NOT NULL DEFAULT '',
+province CHAR (80) NOT NULL DEFAULT '',
+city CHAR (80) NOT NULL DEFAULT '',
+prorate int(1) NOT NULL default 0,
+setup int(11) NOT NULL default 0,
+limittime int(1) NOT NULL default 1,
+disconnectionfee INT(11) NOT NULL default 0,
+variables TEXT NOT NULL DEFAULT '',
+options varchar(40) default NULL,
+maxchannels int(4) NOT NULL default 0,
+chargeonallocation int(1) NOT NULL default 1,
+allocation_bill_status int(1) NOT NULL default 0,
+dial_as CHAR(40) NOT NULL DEFAULT '',
+PRIMARY KEY (`number`),
+ KEY `account` (`account`)
+);
+
+DROP TABLE IF EXISTS `accounts`;
+CREATE TABLE accounts (
+accountid INTEGER NOT NULL AUTO_INCREMENT,
+cc CHAR(20) NOT NULL DEFAULT '',
+number CHAR(50) NOT NULL,
+reseller CHAR(40) NOT NULL DEFAULT '',
+pricelist CHAR(24) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+credit INTEGER NOT NULL DEFAULT 0,
+sweep INTEGER NOT NULL DEFAULT 0,
+creation TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+pin INTEGER NOT NULL DEFAULT 0,
+credit_limit INTEGER NOT NULL DEFAULT 0,
+posttoexternal INTEGER NOT NULL DEFAULT 0,
+balance DECIMAL(20,6) NOT NULL DEFAULT 0,
+password CHAR(80) NOT NULL DEFAULT '',
+first_name CHAR(40) NOT NULL DEFAULT '',
+middle_name CHAR(40) NOT NULL DEFAULT '',
+last_name CHAR(40) NOT NULL DEFAULT '',
+company_name CHAR(40) NOT NULL DEFAULT '',
+address_1 CHAR(80) NOT NULL DEFAULT '',
+address_2 CHAR(80) NOT NULL DEFAULT '',
+address_3 CHAR(80) NOT NULL DEFAULT '',
+postal_code CHAR(12) NOT NULL DEFAULT '',
+province CHAR(40) NOT NULL DEFAULT '',
+city CHAR(80) NOT NULL DEFAULT '',
+country CHAR(40) NOT NULL DEFAULT '',
+telephone_1 CHAR(40) NOT NULL DEFAULT '',
+telephone_2 CHAR(40) NOT NULL DEFAULT '',
+fascimile CHAR(40) NOT NULL DEFAULT '',
+email CHAR(80) NOT NULL DEFAULT '',
+language CHAR(2) NOT NULL DEFAULT '',
+currency CHAR(3) NOT NULL DEFAULT '',
+maxchannels INTEGER DEFAULT 1 NOT NULL,
+routing_technique INT(4) NOT NULL DEFAULT 0,
+dialed_modify TEXT NOT NULL DEFAULT '',
+type INTEGER DEFAULT 0,
+tz CHAR(40) NOT NULL DEFAULT '',
+PRIMARY KEY (`accountid`),
+ KEY `number` (`number`),
+ KEY `pricelist` (`pricelist`),
+ KEY `reseller` (`reseller`)
+);
+
+DROP TABLE IF EXISTS `counters`;
+CREATE TABLE counters (
+id INTEGER NOT NULL AUTO_INCREMENT,
+package CHAR(40) NOT NULL DEFAULT '',
+account VARCHAR(50) NOT NULL,
+seconds INTEGER NOT NULL DEFAULT 0,
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`)
+);
+
+DROP TABLE IF EXISTS `callingcards`;
+CREATE TABLE callingcards (
+id INTEGER NOT NULL AUTO_INCREMENT,
+cardnumber CHAR(20) NOT NULL DEFAULT '',
+language CHAR(10) NOT NULL DEFAULT '',
+value INTEGER NOT NULL DEFAULT 0,
+used INTEGER NOT NULL DEFAULT 0,
+brand VARCHAR(20) NOT NULL DEFAULT '',
+created DATETIME,
+firstused DATETIME,
+expiry DATETIME,
+validfordays CHAR(4) NOT NULL DEFAULT '',
+inuse INTEGER NOT NULL DEFAULT 0,
+pin CHAR(20),
+account VARCHAR(50) NOT NULL DEFAULT '',
+maint_fee_pennies INTEGER NOT NULL DEFAULT 0,
+maint_fee_days INTEGER NOT NULL DEFAULT 0,
+maint_day INTEGER NOT NULL DEFAULT 0,
+disconnect_fee_pennies INTEGER NOT NULL DEFAULT 0,
+minute_fee_minutes INTEGER NOT NULL DEFAULT 0,
+minute_fee_pennies INTEGER NOT NULL DEFAULT 0,
+min_length_minutes INTEGER NOT NULL DEFAULT 0,
+min_length_pennies INTEGER NOT NULL DEFAULT 0,
+timeused INTEGER NOT NULL DEFAULT 0,
+invoice CHAR(20) NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `brand` (`brand`)
+);
+
+CREATE TABLE charge_to_account (
+id INTEGER NOT NULL AUTO_INCREMENT,
+charge_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(50) NOT NULL DEFAULT '',
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE queue_list (
+id INTEGER NOT NULL AUTO_INCREMENT,
+queue_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(20) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE pbx_list (
+id INTEGER NOT NULL AUTO_INCREMENT,
+pbx_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(20) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE extension_list (
+id INTEGER NOT NULL AUTO_INCREMENT,
+extension_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(20) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE cdrs (
+id INTEGER NOT NULL AUTO_INCREMENT,
+uniqueid varchar(60) NOT NULL DEFAULT '',
+cardnum CHAR(50),
+callerid CHAR(80),
+callednum varchar(80) NOT NULL DEFAULT '',
+billseconds INT DEFAULT 0 NOT NULL,
+trunk VARCHAR(30),
+disposition varchar(45) NOT NULL DEFAULT '',
+callstart varchar(80) NOT NULL DEFAULT '',
+debit DECIMAL (20,6) NOT NULL DEFAULT 0,
+credit DECIMAL (20,6) NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 0 NOT NULL,
+notes CHAR(80),
+provider CHAR(50),
+cost DECIMAL(20,6) NOT NULL DEFAULT 0,
+pricelist CHAR(80) NOT NULL DEFAULT '',
+pattern CHAR(80) NOT NULL DEFAULT '',
+type tinyint(1) NOT NULL default '1',
+invoiceid INT(11) DEFAULT 0 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `cardnum` (`cardnum`),
+ KEY `provider` (`provider`),
+ KEY `trunk` (`trunk`),
+ KEY `uniqueid` (`uniqueid`),
+ KEY `status` (`status`)
+);
+
+CREATE TABLE packages (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name CHAR(40) NOT NULL DEFAULT '',
+pricelist CHAR(40) NOT NULL DEFAULT '',
+pattern CHAR(40) NOT NULL DEFAULT '',
+includedseconds INTEGER NOT NULL DEFAULT 0,
+reseller VARCHAR(50) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `pricelist` (`pricelist`),
+ KEY `reseller` (`reseller`)
+);
+
+CREATE TABLE ani_map (
+number char(20) NOT NULL,
+account char(50) NOT NULL default '',
+status int(11) NOT NULL default '0',
+context varchar(20) NOT NULL,
+ PRIMARY KEY (`number`),
+KEY `account` (`account`)
+);
+
+CREATE TABLE `ip_map` (
+ip char(15) NOT NULL default '',
+account char(20) NOT NULL default '',
+prefix varchar(20) NULL,
+context varchar(20) NOT NULL,
+PRIMARY KEY (`ip`,`prefix`),
+KEY `account` (`account`)
+);
+
+CREATE TABLE charges (
+id INTEGER NOT NULL AUTO_INCREMENT,
+pricelist CHAR(40) NOT NULL DEFAULT '',
+description VARCHAR(80) NOT NULL DEFAULT '',
+charge INTEGER NOT NULL DEFAULT 0,
+sweep INTEGER NOT NULL DEFAULT 0,
+reseller CHAR(40) NOT NULL DEFAULT '',
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`),
+ KEY `pricelist` (`pricelist`)
+);
+
+CREATE TABLE manager_action_variables (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name CHAR(60) NOT NULL DEFAULT '',
+value CHAR(60) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE callingcard_stats (
+uniqueid VARCHAR(60) NOT NULL,
+total_time VARCHAR(48) NOT NULL,
+billable_time VARCHAR(48) NOT NULL,
+timestamp DATETIME NULL,
+PRIMARY KEY (`uniqueid`)
+);
+
+CREATE TABLE system (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name VARCHAR(48) NULL,
+value VARCHAR(255) NULL,
+comment VARCHAR(255) NULL,
+timestamp DATETIME NULL,
+reseller VARCHAR(48) NULL,
+brand VARCHAR(48) NULL,
+PRIMARY KEY (`id`),
+ KEY (`name`),
+ KEY `reseller` (`reseller`),
+ KEY `brand` (`brand`)
+);
+
+
+INSERT INTO system (name, value, comment) VALUES (
+'log_file','/var/log/astpp/astpp.log','Where do I log to?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'callout_accountcode','admin','Call Files: What accountcode should we use?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'lcrcontext','astpp-outgoing','This is the Local context we use to route our outgoing calls through esp for callbacks');
+
+INSERT INTO system (name, value, comment) VALUES (
+'maxretries','3','Call Files: How many times do we retry?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'retrytime','30','Call Files: How long do we wait between retries?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'waittime','15','Call Files: How long do we wait before the initial call?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'clidname','Private','Call Files: Outgoing CallerID Name');
+
+INSERT INTO system (name, value, comment) VALUES (
+'clidnumber','0000000000','Call Files: Outgoing CallerID Number');
+
+INSERT INTO system (name, value, comment) VALUES (
+'callingcards_callback_context','astpp-callingcards','Call Files: For callingcards what context do we end up in?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'callingcards_callback_extension', 's','Call Files: For callingcards what extension do we use?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'openser_dbengine', 'MySQL','For now this must be MySQL');
+
+INSERT INTO system (name, value, comment) VALUES (
+'openser', '0','Use OPENSER? 1 for yes or 0 for no');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbname', 'openser','OPENSER Database Name', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbuser', 'root','OPENSER Database User', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbhost', 'localhost','OPENSER Database Host', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbpass', 'Passw0rd','OPENSER Database Password', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_domain', NULL,'OPENSER Domain', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_email', 'em...@as...','Email address that email should appear to be from', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'asterisk_dir', '/etc/asterisk','Which directory are asterisk configuration files stored in?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_website', 'http://www.astpp.org','Link to your company website', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_name', 'ASTPP.ORG','The name of your company. Used in emails.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'email', '1','Send out email? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'user_email', '1','Email user on account changes? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'debug', '1','Enable debugging output? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'emailadd', 'em...@as...','Administrator email address', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'startingdigit', '0','The digit that all calling cards must start with. 0=disabled', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'enablelcr', '1','Use least cost routing 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'log_file', '/var/log/astpp/astpp.log','ASTPP Log file', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'key_home', 'http://www.astpp.org/astpp.pub','Asterisk RSA Key location (optional)', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rate_engine_csv_file', '/var/log/astpp/astpp.csv','CSV File for call rating data', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'csv_dir', '/var/log/astpp/','CSV File Directory', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'default_brand', 'default','Default pricelist. If a price is not found in the customers pricelist we check this one.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'new_user_brand', 'default','What is the default pricelist for new customers?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'default_context', 'custom-astpp','What is the default context for new devices?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cardlength', '10','Number of digits in calling cards and cc codes.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'asterisk_server', 'voip.astpp.org','Your default voip server. Used in outgoing email.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'currency', 'CAD','Name of the currency you use', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'iax_port', '4569','Default IAX2 Port', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'sip_port', '5060','Default SIP Port', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'ipaddr', 'dynamic','Default IP Address for new devices', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'key', 'astpp.pub','Asterisk RSA Key Name (Optional)', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'pinlength', '6','For those calling cards that are using pins this is the number of digits it will have.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'credit_limit', '0','Default credit limit in dollars.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'decimalpoints', '4','How many decimal points do we bill to?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'decimalpoints_tax', '2','How many decimal points do we calculate taxes to?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'decimalpoints_total', '2','How many decimal points do we calculate totals to?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'max_free_length', '100','What is the maximum length (in minutes) of calls that are at no charge?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'trackvendorcharges', '0','Do we track the amount of money we spend with specific providers? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_logo', 'http://www.astpp.org/logo.png','The location of our company logo.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_slogan', 'Welcome to ASTPP','Company slogan', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'version', '1.5Beta', 'ASTPP Version', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'default_language', 'en', 'Default ASTPP Language','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'card_retries','3', 'How many retries do we allow for calling card numbers?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'pin_retries','3', 'How many retries do we allow for pins?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'number_retries','3','How many retries do we allow calling card users when dialing a number?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'booth_context','callshop_booth','Please enter the default context for a callshop booth.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'callingcards_max_length','9000','What is the maximum length (in ms) of a callingcard call?','');
+
+INSERT INTO system (name,value,comment,timestamp) VALUES (
+'template_die_on_bad_params','0','Should HTML::Template die on bad parameters?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'results_per_page','30','How many results per page do we should in the web interface?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astpp_dir','/var/lib/astpp','Where do the astpp configs live?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'auth','Passw0rd!','This is the override authorization code and will allow access to the system.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_dbengine','MySQL','Database type for Asterisk(tm) -Realtime','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbengine','MySQL','Database type for the cdr database','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_dbengine','MySQL','Database type for OSCommerce','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_dbengine','MySQL','Database type for AgileBill(tm)','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_dbengine','MySQL','Database type for FreePBX','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'externalbill','oscommerce','Please specify the external billing application to use. If you are not using any then leave it blank. Valid options are "agile" and "oscommerce".','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'callingcards','1','Do you wish to enable calling cards? 1 for yes and 2 for no.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astcdr','1','Change this one at your own peril. If you switch it off, calls will not be marked as billed in asterisk once they are billed.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'posttoastpp','1','Change this one at your own peril. If you switch it off, calls will not be written to astpp when they are calculated.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'sleep','10','How long shall the rating engine sleep after it has been notified of a hangup? (in seconds)','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'users_dids_amp','0','If this is enabled, ASTPP will create users and DIDs in the FreePBX (www.freepbx.org) database.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'users_dids_rt','1','If this is enabled, ASTPP will create users and DIDs in the Asterisk Realtime database.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'users_dids_freeswitch','0','If this is enabled, ASTPP will create SIP users in the freeswitch database.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'softswitch','0','What softswitch are we using? 0=asterisk, 1=freeswitch','');
+
+INSERT INTO system (name, value, comment) VALUES (
+'service_prepend','778','');
+INSERT INTO system (name, value, comment) VALUES (
+'service_length,','7','');
+INSERT INTO system (name, value, comment) VALUES (
+'service_filler','4110000','');
+
+INSERT INTO system (name, value, comment) VALUES (
+'asterisk_cdr_table','cdr','Which table of the Asterisk(TM) database are the cdrs in?');
+
+-- AgileBill(Trademark of AgileCo) Settings:
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_db','agile','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_pass','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_site_id','1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_charge_status','0','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_taxable','1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_dbprefix','_','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_service_prepend','778','','');
+
+-- OSCommerce Settings (www.oscommerce.org)
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_db','oscommerce','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_pass','password','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_product_id','99999999','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_payment_method','"Charge"','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_order_status','1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_post_nc','0','Do we post "free" items to the oscommerce invoice? 0=No 1=Yes','');
+
+-- FreePBX Settings (www.freepbx.org)
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_db','asterisk','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_pass','passw0rd','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_table','iax','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_table','sip','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_extensions_table','extensions','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_codec_allow','g729,ulaw,alaw','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_codec_disallow','all','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_mailbox_group','default','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_nat','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_canreinvite','no','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_dtmfmode','rfc2833','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_qualify','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_type','friend','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_callgroup','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_pickupgroup','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_notransfer','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_type','friend','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_qualify','yes','','');
+
+-- Asterisk -realtime Settings
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_db','realtime','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_pass','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_iax_table','iax','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_table','sip','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_extensions_table','extensions','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_insecure','very','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_nat','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_canreinvite','no','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_codec_allow','g729,ulaw,alaw','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_codec_disallow','all','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_mailbox_group','default','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_qualify','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_type','friend','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_iax_qualify','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_iax_type','friend','','');
+INSERT INTO system (name, value, comment) VALUES (
+'rt_voicemail_table','voicemail_users','');
+
+
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_rate_announce','1','Do we want the calling cards script to announce the rate on calls?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_timelimit_announce','1','Do we want the calling cards script to announce the timelimit on calls?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_cancelled_prompt','1','Do we want the calling cards script to announce that the call was cancelled?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_menu','1','Do we want the calling cards script to present a menu before exiting?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_connection_prompt','1','Do we want the calling cards script to announce that it is connecting the call?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_pin_input_timeout','15000','How long do we wait when entering the calling card pin? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_number_input_timeout','15000','How long do we wait when entering the calling card number? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_dial_input_timeout','15000','How long do we wait when entering the destination number in calling cards? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_general_input_timeout','15000','How long do we wait for input in general menus? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_welcome_file','silence/1','What do we play for a welcome file?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'sip_ext_prepend','10','What should every autoadded SIP extension begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'iax2_ext_prepend','10','What should every autoadded IAX2 extension begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'cc_prepend','','What should every autoadded callingcard begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'pin_cc_prepend','','What should every autoadded callingcard pin begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'pin_act_prepend','','What should every autoadded account pin begin with?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_directory','/usr/local/freeswitch','What is the Freeswitch root directory?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_password','ClueCon','Freeswitch event socket password');
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_host','localhost','Freeswitch event socket host');
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_port','8021','Freeswitch event socket port');
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_timeout','30','Freeswitch seconds to expect a heartbeat event or reconnect');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_dbengine', 'MySQL','For now this must be MySQL');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbname', 'freeswitch','Freeswitch Database Name', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbuser', 'root','Freeswitch Database User', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbhost', 'localhost','Freeswitch Database Host', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbpass', 'Passw0rd','Freeswitch Database Password', '');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_cdr_table','fscdr','Which table of the cdr database are the Freeswitch cdrs in?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_domain','$${local_ip_v4}','This is entered as the Freeswitch domain.');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_context','default','This is entered as the Freeswitch user context.');
+INSERT INTO system (name,value,comment) VALUES (
+'freeswitch_sound_files','/en/us/callie','Where are our sound files located?'
+);
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbname', 'asteriskcdrdb',
+'CDR Database Name', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbuser', 'root',
+'CDR Database User', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbhost', 'localhost',
+'CDR Database Host', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbpass', 'Passw0rd',
+'CDR Database Password', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astman_user', 'admin','Asterisk(tm) Manager Interface User', '');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astman_host', 'localhost','Asterisk(tm) Manager Interface Host', '');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astman_secret', 'amp111','Asterisk(tm) Manager Interface Secret', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'call_max_length','1440000','What is the maximum length (in ms) of a LCR call?','');
+
+-- 3rd Party PBX Mods
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'thirdlane_mods','0','Provides a few different modifications across the rating code to work better with Thirdlane(tm) cdrs.','');
+
+--
+-- Enough Configuration settings
+--
+
+DROP TABLE IF EXISTS `countrycode`;
+CREATE TABLE `countrycode` (
+ `country` varchar(255) NOT NULL,
+ PRIMARY KEY (`country`),
+ KEY `country` (`country`)
+);
+
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Afghanistan'),
+ ('Alaska'),
+ ('Albania'),
+ ('Algeria'),
+ ('AmericanSamoa'),
+ ('Andorra'),
+ ('Angola'),
+ ('Antarctica'),
+ ('Argentina'),
+ ('Armenia'),
+ ('Aruba'),
+ ('Ascension'),
+ ('Australia'),
+ ('Austria'),
+ ('Azerbaijan'),
+ ('Bahrain'),
+ ('Bangladesh'),
+ ('Belarus'),
+ ('Belgium'),
+ ('Belize'),
+ ('Benin'),
+ ('Bhutan'),
+ ('Bolivia'),
+ ('Bosnia & Herzegovina'),
+ ('Botswana'),
+ ('Brazil'),
+ ('Brunei Darussalam'),
+ ('Bulgaria'),
+ ('Burkina Faso'),
+ ('Burundi'),
+ ('Cambodia'),
+ ('Cameroon'),
+ ('Canadda'),
+ ('Cape Verde Islands'),
+ ('Central African Republic'),
+ ('Chad'),
+ ('Chile'),
+ ('China'),
+ ('Colombia'),
+ ('Comoros'),
+ ('Congo'),
+ ('Cook Islands'),
+ ('Costa Rica'),
+ ('Croatia'),
+ ('Cuba'),
+ ('Cuba Guantanamo Bay'),
+ ('Cyprus'),
+ ('Czech Republic'),
+ ('Denmark'),
+ ('Diego Garcia'),
+ ('Djibouti'),
+ ('Dominican Republic'),
+ ('East Timor'),
+ ('Ecuador'),
+ ('Egypt'),
+ ('El Salvador'),
+ ('Equatorial Guinea'),
+ ('Eritrea'),
+ ('Estonia'),
+ ('Ethiopia'),
+ ('Faroe Islands');
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Fiji Islands'),
+ ('Finland'),
+ ('France'),
+ ('French Guiana'),
+ ('French Polynesia'),
+ ('Gabonese Republic'),
+ ('Gambia'),
+ ('Georgia'),
+ ('Germany'),
+ ('Ghana'),
+ ('Gibraltar'),
+ ('Greece'),
+ ('Greenland'),
+ ('Guadeloupe'),
+ ('Guam'),
+ ('Guatemala'),
+ ('Guinea'),
+ ('Guyana'),
+ ('Haiti'),
+ ('Honduras'),
+ ('Hong Kong'),
+ ('Hungary'),
+ ('Iceland'),
+ ('India'),
+ ('Indonesia'),
+ ('Iran'),
+ ('Iraq'),
+ ('Ireland'),
+ ('Israel'),
+ ('Italy'),
+ ('Jamaica'),
+ ('Japan'),
+ ('Jordan'),
+ ('Kazakstan'),
+ ('Kenya'),
+ ('Kiribati'),
+ ('Kuwait'),
+ ('Kyrgyz Republic'),
+ ('Laos'),
+ ('Latvia'),
+ ('Lebanon'),
+ ('Lesotho'),
+ ('Liberia'),
+ ('Libya'),
+ ('Liechtenstein'),
+ ('Lithuania'),
+ ('Luxembourg'),
+ ('Macao'),
+ ('Madagascar'),
+ ('Malawi'),
+ ('Malaysia'),
+ ('Maldives'),
+ ('Mali Republic'),
+ ('Malta'),
+ ('Marshall Islands'),
+ ('Martinique'),
+ ('Mauritania'),
+ ('Mauritius'),
+ ('MayotteIsland'),
+ ('Mexico'),
+ ('Midway Islands'),
+ ('Moldova'),
+ ('Monaco'),
+ ('Mongolia'),
+ ('Morocco');
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Mozambique'),
+ ('Myanmar'),
+ ('Namibia'),
+ ('Nauru'),
+ ('Nepal'),
+ ('Netherlands'),
+ ('Netherlands Antilles'),
+ ('New Caledonia'),
+ ('New Zealand'),
+ ('Nicaragua'),
+ ('Niger'),
+ ('Nigeria'),
+ ('Niue'),
+ ('Norfolk Island'),
+ ('North Korea'),
+ ('Norway'),
+ ('Oman'),
+ ('Pakistan'),
+ ('Palau'),
+ ('Palestinian Settlements'),
+ ('Panama'),
+ ('PapuaNew Guinea'),
+ ('Paraguay'),
+ ('Peru'),
+ ('Philippines'),
+ ('Poland'),
+ ('Portugal'),
+ ('Puerto Rico'),
+ ('Qatar'),
+ ('RéunionIsland'),
+ ('Romania'),
+ ('Russia'),
+ ('Rwandese Republic'),
+ ('San Marino'),
+ ('São Tomé and Principe'),
+ ('Saudi Arabia'),
+ ('Senegal '),
+ ('Serbia and Montenegro'),
+ ('Seychelles Republic'),
+ ('Sierra Leone'),
+ ('Singapore'),
+ ('Slovak Republic'),
+ ('Slovenia'),
+ ('Solomon Islands'),
+ ('Somali Democratic Republic'),
+ ('South Africa'),
+ ('South Korea'),
+ ('Spain'),
+ ('Sri Lanka'),
+ ('St Kitts - Nevis'),
+ ('St. Helena'),
+ ('St. Lucia'),
+ ('St. Pierre & Miquelon'),
+ ('St. Vincent & Grenadines'),
+ ('Sudan');
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Suriname'),
+ ('Swaziland'),
+ ('Sweden'),
+ ('Switzerland'),
+ ('Syria'),
+ ('Taiwan'),
+ ('Tajikistan'),
+ ('Tanzania'),
+ ('Thailand'),
+ ('Togolese Republic'),
+ ('Tokelau'),
+ ('Tonga Islands'),
+ ('Trinidad & Tobago'),
+ ('Tunisia'),
+ ('Turkey'),
+ ('Turkmenistan'),
+ ('Tuvalu'),
+ ('Uganda'),
+ ('Ukraine'),
+ ('United Arab Emirates'),
+ ('United Kingdom'),
+ ('United States of America'),
+ ('Uruguay'),
+ ('Uzbekistan'),
+ ('Vanuatu'),
+ ('Venezuela'),
+ ('Vietnam'),
+ ('Wake Island'),
+ ('Wallisand Futuna Islands'),
+ ('Western Samoa'),
+ ('Yemen'),
+ ('Zambia'),
+ ('Zimbabwe');
+
+DROP TABLE IF EXISTS `currency`;
+CREATE TABLE `currency` (
+ `Currency` varchar(3) NOT NULL default '',
+ `CurrencyName` varchar(40) NOT NULL default '',
+ PRIMARY KEY (`Currency`)
+);
+
+INSERT INTO `currency` (`Currency`,`CurrencyName`) VALUES
+ ('USD','US Dollars'),
+ ('CAD','Canadian Dollars'),
+ ('AUD','Australian Dollars');
+
+CREATE TABLE `language` (
+ `language` varchar(5) NOT NULL,
+ `languagename` varchar(40) NOT NULL,
+ `active` tinyint(1) NOT NULL default '1',
+ PRIMARY KEY (`language`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+INSERT INTO `language` (`language`,`languagename`,`active`) VALUES
+ ('en','English',1),
+ ('fr','French',1),
+ ('de','German',1);
+
+CREATE TABLE `resellers` (
+ name varchar(40) NOT NULL default '',
+ status int(11) NOT NULL default '1',
+ posttoexternal int(11) NOT NULL default '0',
+ agile_site_id int(11) NOT NULL default '0',
+ config_file char(80) NOT NULL default 'reseller.conf',
+ companyname varchar(255) default NULL,
+ slogan varchar(255) default NULL,
+ footer varchar(255) default NULL,
+ pricelist varchar(255) default NULL,
+ currency varchar(255) default NULL,
+ logo varchar(255) default NULL,
+ website varchar(255) default NULL,
+ adminemail varchar(255) default NULL,
+ salesemail varchar(255) default NULL,
+ phone varchar(45) default NULL,
+ fax varchar(45) default NULL,
+ address1 varchar(255) default NULL,
+ address2 varchar(255) default NULL,
+ city varchar(255) default NULL,
+ state varchar(255) default NULL,
+ postcode varchar(255) default NULL,
+ country varchar(255) default NULL,
+ defaultbrand varchar(45) NOT NULL default 'default',
+ defaultcurrency varchar(45) NOT NULL default 'USD',
+ defaultcredit varchar(45) NOT NULL default '0.00',
+ externalbill varchar(45) NOT NULL default '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+CREATE TABLE templates (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name VARCHAR(45) NOT NULL default '',
+reseller VARCHAR(45) NOT NULL default '',
+template TEXT NOT NULL default '',
+ PRIMARY KEY (`id`),
+ KEY `reseller` (`reseller`)
+);
+
+INSERT INTO templates (name,template) VALUES
+('voip_account_refilled','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP account with $config->{company_name} has been refilled.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('voip_reactivate_account','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP account with $config->{company_name} has been reactivated.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_add_user','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP account with $config->{company_name} has been added.
+Your Username is -- $vars->{extension} --
+Your Password is -- $vars->{secret} --
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('add_sip_device','Attention: $vars->{title} $vars->{first} $vars->{last}
+A new device has been enabled on your account. Here
+is the necessary configuration information.
+------- $config->{company_name} Configuration Info --------
+In sip.conf:
+[$config->{company_name}-in]
+type=user
+username=$config->{company_name}-in
+auth=rsa
+inkeys=$config->{key} ;This key may be downloaded from $config->{key_home}
+host=$config->{asterisk_server}
+context=from-pstn
+accountcode=$config->{company_name}
+[$config->{company_name}]
+type=peer
+username=$vars->{extension}
+secret=$vars->{secret}
+host=$config->{asterisk_server}
+callerid= <555-555-5555>
+qualify=yes
+accountcode=$config->{company_name} ; for call tracking in the cdr
+In the [globals] section add:
+register => $vars->{user}:password@$config->{asterisk_server}');
+
+INSERT INTO templates (name,template) VALUES
+('add_iax_device','Attention: $vars->{title} $vars->{first} $vars->{last}
+A new device has been enabled on your account. Here
+is the necessary configuration information.
+------- $config->{company_name} Configuration Info --------
+In iax.conf:
+At the bottom of the file add:
+[$config->{company_name}-in]
+;trunk=yes ;optional .. only works if you have a zaptel or ztdummy driver running
+type=user
+username=$config->{company_name}-in
+auth=rsa
+inkeys=$config->{key} ;This key may be downloaded from $config->{key_home}
+host=$config->{asterisk_server}
+context=incoming
+accountcode=$config->{company_name} ;for call tracking in the cdr
+[$config->{company_name}]
+;to simplify and config outgoing calls
+;trunk=yes ;optional .. only works if you have a zaptel driver running
+type=peer
+username=$vars->{extension}
+secret=$vars->{secret}
+host=$config->{asterisk_server}
+callerid=<555-555-5555> ;only the number will really be used
+qualify=yes
+accountcode=$config->{company_name} ; for call tracking in the cdr
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_remove_user','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP Termination with $config->{company_name} has been removed
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_calling_card','You have added a $vars->{pricelist} callingcard in the amount of $vars->{pennies} cents.
+Card Number $cc Pin: $pin
+Thanks for your patronage.
+The $config->{company_name} sales team');
+
+INSERT INTO templates (name,template) VALUES
+('email_add_did','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your DID with $config->{company_name} has been added
+The number is: $did
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team
+Here is a sample setup which would call a few sip phones with incoming calls:
+[incoming]
+exten => _1$did,1,Wait(2)
+exten => _1$did,2,Dial(SIP/2201&SIP/2202,15,Ttm) ; dial a couple of phones for 15 secs
+exten => _1$did,3,Voicemail(u1000) ; go to unavailable voicemail (vm box 1000)
+exten => _1$did,103,Voicemail(b1000) ; go to busy voicemail (vm box 1000)');
+
+INSERT INTO templates (name,template) VALUES
+('email_remove_did','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your DID with $config->{company_name} has been removed
+The number was: $did
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_new_invoice','Invoice # $invoice in the amount of \$$total has been added to your account.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_low_balance','Your VOIP account with $config->{company_name} has a balance of \$$balance.
+Please visit our website to refill your account to ensure uninterrupted service.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+CREATE TABLE `sweeplist` (
+ `Id` int(10) unsigned NOT NULL default '0',
+ `sweep` varchar(45) NOT NULL default '',
+ PRIMARY KEY (`Id`)
+);
+
+INSERT INTO sweeplist (Id,sweep) VALUES
+(0,'daily'),
+(1,'weekly'),
+(2,'monthly'),
+(3,'quarterly'),
+(4,'semi-annually'),
+(5,'annually')
+;
+
+CREATE TABLE userlevels (
+userlevelid int(11) NOT NULL,
+userlevelname varchar(50) NOT NULL,
+PRIMARY KEY (`userlevelid`)
+);
+
+INSERT INTO `userlevels` (`userlevelid`,`userlevelname`) VALUES
+ (-1,'Administrator'),
+ (0,'Anonymous'),
+ (1,'Reseller'),
+ (2,'Admin'),
+ (3,'Vendor'),
+ (4,'Customer Service'),
+ (5,'Users');
+
+CREATE TABLE reseller_pricing (
+id INTEGER NOT NULL AUTO_INCREMENT,
+reseller VARCHAR(50) NOT NULL,
+type INTEGER NOT NULL DEFAULT 1,
+monthlycost INTEGER NOT NULL DEFAULT 0,
+prorate INTEGER NOT NULL DEFAULT 0,
+setup INTEGER NOT NULL DEFAULT 0,
+cost INTEGER NOT NULL DEFAULT 0,
+connectcost INTEGER NOT NULL DEFAULT 0,
+includedseconds INTEGER NOT NULL DEFAULT 0,
+note VARCHAR(50) NOT NULL DEFAULT '',
+disconnectionfee INTEGER NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 1 NOT NULL,
+inc CHAR(10) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`),
+ KEY `reseller` (`reseller`)
+);
+
+CREATE TABLE callshops (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name VARCHAR(50) NOT NULL,
+osc_dbname VARCHAR(50) NOT NULL DEFAULT '',
+osc_dbpass VARCHAR(50) NOT NULL DEFAULT '',
+osc_dbuser VARCHAR(50) NOT NULL DEFAULT '',
+osc_dbhost VARCHAR(50) NOT NULL DEFAULT '',
+osc_site VARCHAR(50) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+KEY `name` (`name`)
+);
+
+CREATE TABLE extensions_status (
+id INTEGER NOT NULL AUTO_INCREMENT,
+tech VARCHAR(6) NULL,
+extension VARCHAR(20) NULL,
+number VARCHAR(255) NULL,
+status VARCHAR(255) NULL,
+timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+Privilege VARCHAR(255) NULL,
+Channel VARCHAR(255) NULL,
+Cause VARCHAR(255) NULL,
+Causetxt VARCHAR(255) NULL,
+PeerStatus VARCHAR(255) NULL,
+Peer VARCHAR(255) NULL,
+Context VARCHAR(255) NULL,
+Application VARCHAR(255) NULL,
+AppData VARCHAR(255) NULL,
+Priority VARCHAR(255) NULL,
+Uniqueid VARCHAR(255) NULL,
+Event VARCHAR(255) NULL,
+State VARCHAR(255) NULL,
+CallerIDName VARCHAR(255) NULL,
+CallerID VARCHAR(255) NULL,
+AstExtension VARCHAR(255) NULL,
+PRIMARY KEY (`id`),
+KEY `extension` (`extension`));
+
+CREATE TABLE activity_logs (
+id INTEGER NOT NULL AUTO_INCREMENT,
+timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+message TEXT NOT NULL DEFAULT '',
+user VARCHAR(50),
+PRIMARY KEY (`id`));
+
+-- CREATE TABLE sql_commands (
+-- id INTEGER NOT NULL AUTO_INCREMENT,
+-- name VARCHAR(45) NOT NULL default '',
+-- sql TEXT NOT NULL default '',
+-- comment TEXT NOT NULL default '',
+-- timestamp TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+-- PRIMARY KEY (`id`));
+
+CREATE TABLE `invoices` (
+`invoiceid` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`accountid` INT( 11 ) NOT NULL ,
+`date` DATE NOT NULL ,
+`status` TINYINT NOT NULL DEFAULT '0',
+`external_id` INT( 11 ) NOT NULL DEFAULT '0'
+) ENGINE = MYISAM;
+
+CREATE TABLE `invoices_total` (
+`invoices_total_id` int(10) unsigned NOT NULL auto_increment,
+`invoices_id` int(11) NOT NULL,
+`title` varchar(255) NOT NULL,
+`text` varchar(255) NOT NULL,
+`value` decimal(15,4) NOT NULL,
+`class` varchar(32) NOT NULL,
+`sort_order` int(11) NOT NULL,
+PRIMARY KEY (`invoices_total_id`)
+);
+
+ CREATE TABLE `payments` (
+`id` INT( 11 ) NOT NULL ,
+`accountid` INT( 11 ) NOT NULL ,
+`credit` DECIMAL NOT NULL DEFAULT '0',
+`status` TINYINT NOT NULL DEFAULT '0',
+`type` INT NOT NULL ,
+`notes` TEXT NOT NULL ,
+PRIMARY KEY ( `id` )
+) ENGINE = MYISAM;
+
+ CREATE TABLE `taxes` (
+`taxes_id` int(11) NOT NULL auto_increment,
+`taxes_priority` int(5) default '1',
+`taxes_amount` decimal(7,4) NOT NULL,
+`taxes_rate` decimal(7,4) NOT NULL,
+`taxes_description` varchar(255) NOT NULL,
+`last_modified` datetime default NULL,
+`date_added` datetime NOT NULL,
+PRIMARY KEY (`taxes_id`)
+);
+
+ CREATE TABLE `taxes_to_accounts` (
+`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`accountid` VARCHAR( 11 ) NOT NULL ,
+`taxes_id` VARCHAR( 11 ) NOT NULL
+) ENGINE = MYISAM ;
+
+
+-- Create Views Here
+--
+
+CREATE VIEW taxes_to_accounts_view AS SELECT
+taxes_to_accounts.id,
+taxes_to_accounts.accountid,
+taxes.taxes_id,
+taxes.taxes_priority,
+taxes.taxes_amount,
+taxes.taxes_rate,
+taxes.taxes_description
+FROM taxes_to_accounts, taxes
+WHERE taxes.taxes_id = taxes_to_accounts.taxes_id;
+
+
+CREATE VIEW invoice_list_view AS SELECT
+invoices.invoiceid,
+invoices.accountid,
+invoices.date,
+invoices.status,
+invoices_total.value,
+invoices_total.class
+FROM invoices, invoices_total
+WHERE invoices_total.class = 9
+AND invoices.invoiceid = invoices_total.invoices_id;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-03-06 02:30:00
|
Revision: 2311
http://astpp.svn.sourceforge.net/astpp/?rev=2311&view=rev
Author: darrenkw
Date: 2010-03-06 02:29:53 +0000 (Sat, 06 Mar 2010)
Log Message:
-----------
Added sounds for Freeswitch.
Modified Paths:
--------------
trunk/Makefile
Added Paths:
-----------
trunk/sounds/GSM/
trunk/sounds/GSM/astcc-badphone.GSM
trunk/sounds/GSM/astpp-accountnum.GSM
trunk/sounds/GSM/astpp-badaccount.GSM
trunk/sounds/GSM/astpp-badphone.GSM
trunk/sounds/GSM/astpp-busy-tryagain.GSM
trunk/sounds/GSM/astpp-call-completed.GSM
trunk/sounds/GSM/astpp-callingcard-menu.GSM
trunk/sounds/GSM/astpp-card-has-expired.GSM
trunk/sounds/GSM/astpp-card-is-empty.GSM
trunk/sounds/GSM/astpp-card-to-empty.GSM
trunk/sounds/GSM/astpp-card-to-refill.GSM
trunk/sounds/GSM/astpp-cent.GSM
trunk/sounds/GSM/astpp-cents.GSM
trunk/sounds/GSM/astpp-congested-tryagain.GSM
trunk/sounds/GSM/astpp-connectcharge.GSM
trunk/sounds/GSM/astpp-dollar.GSM
trunk/sounds/GSM/astpp-dollars.GSM
trunk/sounds/GSM/astpp-down.GSM
trunk/sounds/GSM/astpp-in-use.GSM
trunk/sounds/GSM/astpp-invalidpin.GSM
trunk/sounds/GSM/astpp-menu.GSM
trunk/sounds/GSM/astpp-minute.GSM
trunk/sounds/GSM/astpp-no-enough-credit.GSM
trunk/sounds/GSM/astpp-noanswer-tryagain.GSM
trunk/sounds/GSM/astpp-not-enough-money.GSM
trunk/sounds/GSM/astpp-per.GSM
trunk/sounds/GSM/astpp-phonenum.GSM
trunk/sounds/GSM/astpp-please-wait-while-i-connect.GSM
trunk/sounds/GSM/astpp-pleasepin.GSM
trunk/sounds/GSM/astpp-second.GSM
trunk/sounds/GSM/astpp-seconds.GSM
trunk/sounds/GSM/astpp-this-call-will-last.GSM
trunk/sounds/GSM/astpp-this-card-has-a-balance-of.GSM
trunk/sounds/GSM/astpp-will-apply.GSM
trunk/sounds/GSM/astpp-willcost.GSM
trunk/sounds/GSM/cent.GSM
trunk/sounds/GSM/is-suspended.GSM
trunk/sounds/GSM/of-local-credit.GSM
trunk/sounds/GSM/of-longdistance-credit.GSM
trunk/sounds/GSM/per.GSM
trunk/sounds/GSM/please-wait-while-i-connect.GSM
trunk/sounds/GSM/press_one_if_you_wish.GSM
trunk/sounds/GSM/this-call-will-last.GSM
trunk/sounds/GSM/this-card-has-a-balance-of.GSM
trunk/sounds/wav/
trunk/sounds/wav/astcc-badphone.wav
trunk/sounds/wav/astpp-accountnum.wav
trunk/sounds/wav/astpp-badaccount.wav
trunk/sounds/wav/astpp-badphone.wav
trunk/sounds/wav/astpp-busy-tryagain.wav
trunk/sounds/wav/astpp-call-completed.wav
trunk/sounds/wav/astpp-callingcard-menu.wav
trunk/sounds/wav/astpp-card-has-expired.wav
trunk/sounds/wav/astpp-card-is-empty.wav
trunk/sounds/wav/astpp-card-to-empty.wav
trunk/sounds/wav/astpp-card-to-refill.wav
trunk/sounds/wav/astpp-cent.wav
trunk/sounds/wav/astpp-cents.wav
trunk/sounds/wav/astpp-congested-tryagain.wav
trunk/sounds/wav/astpp-connectcharge.wav
trunk/sounds/wav/astpp-dollar.wav
trunk/sounds/wav/astpp-dollars.wav
trunk/sounds/wav/astpp-down.wav
trunk/sounds/wav/astpp-in-use.wav
trunk/sounds/wav/astpp-invalidpin.wav
trunk/sounds/wav/astpp-menu.wav
trunk/sounds/wav/astpp-minute.wav
trunk/sounds/wav/astpp-noanswer-tryagain.wav
trunk/sounds/wav/astpp-not-enough-credit.wav
trunk/sounds/wav/astpp-not-enough-money.wav
trunk/sounds/wav/astpp-per.wav
trunk/sounds/wav/astpp-phonenum.wav
trunk/sounds/wav/astpp-please-wait-while-i-connect.wav
trunk/sounds/wav/astpp-pleasepin.wav
trunk/sounds/wav/astpp-second.wav
trunk/sounds/wav/astpp-seconds.wav
trunk/sounds/wav/astpp-this-call-will-last.wav
trunk/sounds/wav/astpp-this-card-has-a-balance-of.gsm
trunk/sounds/wav/astpp-this-card-has-a-balance-of.wav
trunk/sounds/wav/astpp-willapply.wav
trunk/sounds/wav/astpp-willcost.wav
trunk/sounds/wav/cent.wav
trunk/sounds/wav/is-suspended.wav
trunk/sounds/wav/of-local-credit.wav
trunk/sounds/wav/of-longdistance-credit.wav
trunk/sounds/wav/per.wav
trunk/sounds/wav/please-wait-while-i-connect.wav
trunk/sounds/wav/press_one_if_you_wish.wav
trunk/sounds/wav/this-call-will-last.wav
trunk/sounds/wav/this-card-has-a-balance-of.wav
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-02-27 03:56:44 UTC (rev 2310)
+++ trunk/Makefile 2010-03-06 02:29:53 UTC (rev 2311)
@@ -92,10 +92,14 @@
done
install_sounds_freeswitch:
- for x in sounds/*.gsm; do \
+ for x in sounds/GSM/*.GSM; do \
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
done
+ for x in sounds/wav/*.wav; do \
+ echo $$x;\
+ install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
+ done
install_templates:
Added: trunk/sounds/GSM/astcc-badphone.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astcc-badphone.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-accountnum.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-accountnum.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-badaccount.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-badaccount.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-badphone.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-badphone.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-busy-tryagain.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-busy-tryagain.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-call-completed.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-call-completed.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-callingcard-menu.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-callingcard-menu.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-card-has-expired.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-card-has-expired.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-card-is-empty.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-card-is-empty.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-card-to-empty.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-card-to-empty.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-card-to-refill.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-card-to-refill.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-cent.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-cent.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-cents.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-cents.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-congested-tryagain.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-congested-tryagain.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-connectcharge.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-connectcharge.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-dollar.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-dollar.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-dollars.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-dollars.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-down.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-down.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-in-use.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-in-use.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-invalidpin.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-invalidpin.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-menu.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-menu.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-minute.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-minute.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-no-enough-credit.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-no-enough-credit.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-noanswer-tryagain.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-noanswer-tryagain.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-not-enough-money.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-not-enough-money.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-per.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-per.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-phonenum.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-phonenum.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-please-wait-while-i-connect.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-please-wait-while-i-connect.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-pleasepin.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-pleasepin.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-second.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-second.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-seconds.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-seconds.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-this-call-will-last.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-this-call-will-last.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-this-card-has-a-balance-of.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-this-card-has-a-balance-of.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-will-apply.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-will-apply.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/astpp-willcost.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/astpp-willcost.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/cent.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/cent.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/is-suspended.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/is-suspended.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/of-local-credit.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/of-local-credit.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/of-longdistance-credit.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/of-longdistance-credit.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/per.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/per.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/please-wait-while-i-connect.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/please-wait-while-i-connect.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/press_one_if_you_wish.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/press_one_if_you_wish.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/this-call-will-last.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/this-call-will-last.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/GSM/this-card-has-a-balance-of.GSM
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/GSM/this-card-has-a-balance-of.GSM
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astcc-badphone.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astcc-badphone.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-accountnum.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-accountnum.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-badaccount.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-badaccount.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-badphone.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-badphone.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-busy-tryagain.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-busy-tryagain.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-call-completed.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-call-completed.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-callingcard-menu.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-callingcard-menu.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-card-has-expired.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-card-has-expired.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-card-is-empty.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-card-is-empty.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-card-to-empty.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-card-to-empty.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-card-to-refill.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-card-to-refill.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-cent.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-cent.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-cents.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-cents.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-congested-tryagain.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-congested-tryagain.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-connectcharge.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-connectcharge.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-dollar.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-dollar.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-dollars.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-dollars.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-down.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-down.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-in-use.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-in-use.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-invalidpin.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-invalidpin.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-menu.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-menu.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-minute.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-minute.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-noanswer-tryagain.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-noanswer-tryagain.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-not-enough-credit.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-not-enough-credit.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-not-enough-money.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-not-enough-money.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-per.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-per.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-phonenum.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-phonenum.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-please-wait-while-i-connect.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-please-wait-while-i-connect.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-pleasepin.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-pleasepin.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-second.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-second.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-seconds.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-seconds.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-this-call-will-last.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-this-call-will-last.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-this-card-has-a-balance-of.gsm
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-this-card-has-a-balance-of.gsm
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-this-card-has-a-balance-of.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-this-card-has-a-balance-of.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-willapply.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-willapply.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/astpp-willcost.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/astpp-willcost.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/cent.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/cent.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/is-suspended.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/is-suspended.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/of-local-credit.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/of-local-credit.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/of-longdistance-credit.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/of-longdistance-credit.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/per.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/per.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/please-wait-while-i-connect.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/please-wait-while-i-connect.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/press_one_if_you_wish.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/press_one_if_you_wish.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/this-call-will-last.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/this-call-will-last.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/sounds/wav/this-card-has-a-balance-of.wav
===================================================================
(Binary files differ)
Property changes on: trunk/sounds/wav/this-card-has-a-balance-of.wav
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-27 03:56:50
|
Revision: 2310
http://astpp.svn.sourceforge.net/astpp/?rev=2310&view=rev
Author: darrenkw
Date: 2010-02-27 03:56:44 +0000 (Sat, 27 Feb 2010)
Log Message:
-----------
Adjust modules that load.
Modified Paths:
--------------
trunk/freeswitch/conf/modules.conf.xml
Modified: trunk/freeswitch/conf/modules.conf.xml
===================================================================
--- trunk/freeswitch/conf/modules.conf.xml 2010-02-27 02:45:25 UTC (rev 2309)
+++ trunk/freeswitch/conf/modules.conf.xml 2010-02-27 03:56:44 UTC (rev 2310)
@@ -72,11 +72,11 @@
<!-- Timers -->
<!-- Languages -->
- <load module="mod_spidermonkey"/>
+ <!-- <load module="mod_spidermonkey"/> -->
<load module="mod_perl"/>
<!-- <load module="mod_python"/> -->
<!-- <load module="mod_java"/> -->
- <!-- <load module="mod_lua"/> -->
+ <load module="mod_lua"/>
<!-- ASR /TTS -->
<!-- <load module="mod_cepstral"/> -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-27 02:45:33
|
Revision: 2309
http://astpp.svn.sourceforge.net/astpp/?rev=2309&view=rev
Author: darrenkw
Date: 2010-02-27 02:45:25 +0000 (Sat, 27 Feb 2010)
Log Message:
-----------
Corrected the freeswitch sound handling.
Modified Paths:
--------------
trunk/freeswitch/astpp-callingcards.pl
trunk/scripts/astpp-common.pl
Added Paths:
-----------
trunk/sql/astpp-2010-02-26.sql
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2010-02-20 07:06:27 UTC (rev 2308)
+++ trunk/freeswitch/astpp-callingcards.pl 2010-02-27 02:45:25 UTC (rev 2309)
@@ -47,7 +47,7 @@
}
$cdr_db = &cdr_connect_db( $config, @output );
$ASTPP->set_cdr_db($cdr_db);
- $sound = &define_sounds($astpp_db);
+ $sound = &define_sounds($astpp_db,$config->{freeswitch_sound_files});
}
sub set_in_use()
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2010-02-20 07:06:27 UTC (rev 2308)
+++ trunk/scripts/astpp-common.pl 2010-02-27 02:45:25 UTC (rev 2309)
@@ -3879,83 +3879,68 @@
#Map sound files to variable names. Ultimately this should probably be done in the database.
sub define_sounds() {
- my ($astpp_db) = @_;
+ my ($astpp_db,$location) = @_;
+ $location = "" if !$location;
my $sound;
- $sound->{no_responding} =
- "astpp-down.gsm"; #The calling card platform is down, please try again later.
-$sound->{cardnumber} =
- "astpp-accountnum.gsm"; #Please enter your card number followed by pound.
-$sound->{cardnumber_incorrect} = "astpp-badaccount.gsm"; #Incorrect card number.
-$sound->{pin} = "astpp-pleasepin.gsm"; #Please enter your pin followed by pound.
-$sound->{pin_incorrect} = "astpp-invalidpin.gsm"; #Incorrect pin.
-$sound->{goodbye} = "goodbye.gsm"; #Goodbye.
-$sound->{destination} =
- "astpp-phonenum.gsm"; #Please enter the number you wish to dial followed by pound.
-$sound->{destination_incorrect} = "astcc-badphone.gsm"; #Phone number not found!
-$sound->{card_inuse} = "astpp-in-use.gsm"; #This card is presently being used.
-$sound->{call_will_cost} = "astpp-willcost.gsm"; #This call will cost:
-$sound->{main_currency} = "astpp-dollar.gsm"; #Dollar
-$sound->{sub_currency} = "astpp-cent.gsm"; #Cent
-$sound->{main_currency_plural} = "astpp-dollars.gsm"; #Dollars
-$sound->{sub_currency_plural} = "astpp-cents.gsm"; #cents
-$sound->{per} = "astpp-per.gsm"; #per
-$sound->{minute} = "astpp-minute.gsm"; #Minute
-$sound->{minutes} = "astpp-minutes.gsm"; #Minutes
-$sound->{second} = "astpp-second.gsm"; #Second
-$sound->{seconds} = "astpp-seconds.gsm"; #Seconds
-$sound->{a_connect_charge} = "astpp-connectcharge.gsm"; #A connect charge of
-$sound->{will_apply} = "astpp-willapply.gsm"; #Will apply
-$sound->{please_wait_will_connect} =
- "astpp-please-wait-while-i-connect.gsm"; #Please wait while I connect your call
-$sound->{card_is_empty} = "astpp-card-is-empty.gsm"; #This card is empty.
-$sound->{card_has_balance_of} =
- "astpp-this-card-has-a-balance-of.gsm"; #Card has a balance of:
-$sound->{card_has_expired} = "astpp-card-has-expired.gsm"; #This card has expired.
-$sound->{call_will_last} = "astpp-this-call-will-last.gsm"; #This call will last:
-$sound->{not_enough_credit} =
- "astpp-not-enough-credit.gsm"; #You do not have enough credit
-$sound->{call_completed} =
- "astpp-call-completed.gsm"; #This call has been completed.
-$sound->{astpp_callingcard_menu} =
- "astpp-callingcard-menu.gsm"
+ $sound->{no_responding} = $location . "astpp-down.gsm"; #The calling card platform is down, please try again later.
+$sound->{cardnumber} = $location . "astpp-accountnum.gsm" ; #Please enter your card number followed by pound.
+$sound->{cardnumber_incorrect} = $location . "astpp-badaccount.gsm"; #Incorrect card number.
+$sound->{pin} = $location . "astpp-pleasepin.gsm"; #Please enter your pin followed by pound.
+$sound->{pin_incorrect} = $location . "astpp-invalidpin.gsm"; #Incorrect pin.
+$sound->{goodbye} = $location . "goodbye.gsm"; #Goodbye.
+$sound->{destination} = $location . "astpp-phonenum.gsm"; #Please enter the number you wish to dial followed by pound.
+$sound->{destination_incorrect} = $location . "astcc-badphone.gsm"; #Phone number not found!
+$sound->{card_inuse} = $location . "astpp-in-use.gsm"; #This card is presently being used.
+$sound->{call_will_cost} = $location . "astpp-willcost.gsm"; #This call will cost:
+$sound->{main_currency} = $location . "astpp-dollar.gsm"; #Dollar
+$sound->{sub_currency} = $location . "astpp-cent.gsm"; #Cent
+$sound->{main_currency_plural} = $location . "astpp-dollars.gsm"; #Dollars
+$sound->{sub_currency_plural} = $location . "astpp-cents.gsm"; #cents
+$sound->{per} = $location . "astpp-per.gsm"; #per
+$sound->{minute} = $location . "astpp-minute.gsm"; #Minute
+$sound->{minutes} = $location . "astpp-minutes.gsm"; #Minutes
+$sound->{second} = $location . "astpp-second.gsm"; #Second
+$sound->{seconds} = $location . "astpp-seconds.gsm"; #Seconds
+$sound->{a_connect_charge} = $location . "astpp-connectcharge.gsm"; #A connect charge of
+$sound->{will_apply} = $location . "astpp-willapply.gsm"; #Will apply
+$sound->{please_wait_will_connect} = $location . "astpp-please-wait-while-i-connect.gsm"; #Please wait while I connect your call
+$sound->{card_is_empty} = $location . "astpp-card-is-empty.gsm"; #This card is empty.
+$sound->{card_has_balance_of} = $location . "astpp-this-card-has-a-balance-of.gsm"; #Card has a balance of:
+$sound->{card_has_expired} = $location . "astpp-card-has-expired.gsm"; #This card has expired.
+$sound->{call_will_last} = $location . "astpp-this-call-will-last.gsm"; #This call will last:
+$sound->{not_enough_credit} = $location . "astpp-not-enough-credit.gsm"; #You do not have enough credit
+$sound->{call_completed} = $location . "astpp-call-completed.gsm"; #This call has been completed.
+$sound->{astpp_callingcard_menu} = $location . "astpp-callingcard-menu.gsm"
; #Press one if you wish to place another call, press 2 for your card balance, or press 3 to hangup
-$sound->{busy} = "astpp-busy-tryagain.gsm"; #Number was busy, Press 1 to try again.
-$sound->{cancelled} = "astpp-cancelled-tryagain.gsm"; #Call was cancelled.
-$sound->{congested} =
- "astpp-congested-tryagain.gsm"; #Number was congested, Press 1 to try again.
-$sound->{noanswer} =
- "astpp-noanswer-tryagain.gsm"; #There was no answer, Press 1 to try again.
-$sound->{badnumber} =
- "astpp-badnumber.gsm"; # "Calls from this location are blocked!"
-$sound->{used_elsewhere} =
- "astpp-used-elsewhere.gsm"; # "This location has been used already."
-$sound->{goodbye} = "goodbye.gsm"; # "Goodbye"
-$sound->{callback_performed} =
- "astpp-callback-performed.gsm"; # "This callback has been performed please disconnect now"
-$sound->{cardnumber} =
- "astpp-accountnum.gsm"; #Please enter your card number followed by pound.
-$sound->{cardnumber_incorrect} = "astpp-badaccount.gsm"; #Incorrect card number.
-$sound->{pin} = "astpp-pleasepin.gsm"; #Please enter your pin followed by pound.
-$sound->{pin_incorrect} = "astpp-invalidpin.gsm"; #Incorrect pin.
-$sound->{point} = "astcc-point.gsm"; #point.
-$sound->{register_ani} =
- "astpp-register.gsm"
- ; # "Register ANI to this card? Press 1 for yes or any other key for no."
-$sound->{card_has_expired} = "astpp_expired.gsm"; #"This card has expired"
-$sound->{card_is_empty} = "astpp-empty.gsm"; #This card is empty
-$sound->{where_to_call} =
+$sound->{busy} = $location . "astpp-busy-tryagain.gsm"; #Number was busy, Press 1 to try again.
+$sound->{cancelled} = $location . "astpp-cancelled-tryagain.gsm"; #Call was cancelled.
+$sound->{congested} = $location . "astpp-congested-tryagain.gsm"; #Number was congested, Press 1 to try again.
+$sound->{noanswer} = $location . "astpp-noanswer-tryagain.gsm"; #There was no answer, Press 1 to try again.
+$sound->{badnumber} = $location . "astpp-badnumber.gsm"; # "Calls from this location are blocked!"
+$sound->{used_elsewhere} = $location . "astpp-used-elsewhere.gsm"; # "This location has been used already."
+$sound->{goodbye} = $location . "goodbye.gsm"; # "Goodbye"
+$sound->{callback_performed} = $location . "astpp-callback-performed.gsm"; # "This callback has been performed please disconnect now"
+$sound->{cardnumber} = $location . "astpp-accountnum.gsm"; #Please enter your card number followed by pound.
+$sound->{cardnumber_incorrect} = $location . "astpp-badaccount.gsm"; #Incorrect card number.
+$sound->{pin} = $location . "astpp-pleasepin.gsm"; #Please enter your pin followed by pound.
+$sound->{pin_incorrect} = $location . "astpp-invalidpin.gsm"; #Incorrect pin.
+$sound->{point} = $location . "astcc-point.gsm"; #point.
+$sound->{register_ani} = $location . "astpp-register.gsm"; # "Register ANI to this card? Press 1 for yes or any other key for no."
+$sound->{card_has_expired} = $location . "astpp_expired.gsm"; #"This card has expired"
+$sound->{card_is_empty} = $location . "astpp-empty.gsm"; #This card is empty
+$sound->{where_to_call} = $location .
"astpp-where-to-call.gsm"
; #Press 1 to receive a call at the number you called from or registered
#Otherwise enter the number you wish to be called at.
-$sound->{number_to_register} =
+$sound->{number_to_register} = $location .
"astpp-number-to-register.gsm"; #Press 1 to register the number you called from.
#Otherwise enter the number you wish to register.
-$sound->{card_has_been_refilled} = "astpp-card-has-been-refilled.gsm"; # Your card has been refilled.
-$sound->{card_to_refill} = "astpp-card-to-refill.gsm"; #please enter the card number you wish to refill followed
+$sound->{card_has_been_refilled} = $location . "astpp-card-has-been-refilled.gsm"; # Your card has been refilled.
+$sound->{card_to_refill} = $location . "astpp-card-to-refill.gsm"; #please enter the card number you wish to refill followed
# by the pound sign.
-$sound->{card_to_empty} = "astpp-card-to-empty.gsm"; #please enter the card number you wish to empty into your card
+$sound->{card_to_empty} = $location . "astpp-card-to-empty.gsm"; #please enter the card number you wish to empty into your card
# followed by the pound sign.
-$sound->{astpp_please_pin_card_empty} = "astpp-please-pin-card-empty.gsm"; #please enter the pin number for the card
+$sound->{astpp_please_pin_card_empty} = $location . "astpp-please-pin-card-empty.gsm"; #please enter the pin number for the card
# you wish to empty followed by the pound
# sign.
return $sound;
Added: trunk/sql/astpp-2010-02-26.sql
===================================================================
--- trunk/sql/astpp-2010-02-26.sql (rev 0)
+++ trunk/sql/astpp-2010-02-26.sql 2010-02-27 02:45:25 UTC (rev 2309)
@@ -0,0 +1,1406 @@
+DROP TABLE IF EXISTS `routes`;
+CREATE TABLE routes (
+id INTEGER NOT NULL AUTO_INCREMENT,
+pattern CHAR(40),
+comment CHAR(80),
+connectcost INTEGER NOT NULL,
+includedseconds INTEGER NOT NULL,
+cost INTEGER NOT NULL,
+pricelist CHAR(80),
+inc INTEGER,
+reseller CHAR(50) default NULL,
+precedence INT(4) NOT NULL DEFAULT 0,
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`),
+KEY `pattern` (`pattern`),
+KEY `pricelist` (`pricelist`),
+KEY `reseller` (`reseller`),
+KEY `status` (`status`)
+);
+
+DROP TABLE IF EXISTS `pricelists`;
+CREATE TABLE pricelists (
+name CHAR(40) NOT NULL,
+markup INTEGER NOT NULL DEFAULT 0,
+inc INTEGER NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 1 NOT NULL,
+reseller CHAR(50) default NULL,
+PRIMARY KEY (`name`)
+);
+
+DROP TABLE IF EXISTS `callingcardbrands`;
+CREATE TABLE callingcardbrands (
+name CHAR(40) NOT NULL,
+reseller CHAR(40) NOT NULL DEFAULT '',
+language CHAR(10) NOT NULL DEFAULT '',
+pricelist CHAR(40) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+validfordays CHAR(4) NOT NULL DEFAULT '',
+pin INTEGER NOT NULL DEFAULT 0,
+maint_fee_pennies INTEGER NOT NULL DEFAULT 0,
+maint_fee_days INTEGER NOT NULL DEFAULT 0,
+disconnect_fee_pennies INTEGER NOT NULL DEFAULT 0,
+minute_fee_minutes INTEGER NOT NULL DEFAULT 0,
+minute_fee_pennies INTEGER NOT NULL DEFAULT 0,
+min_length_minutes INTEGER NOT NULL DEFAULT 0,
+min_length_pennies INTEGER NOT NULL DEFAULT 0,
+PRIMARY KEY (`name`),
+ KEY `reseller` (`reseller`),
+ KEY `pricelist` (`pricelist`)
+);
+
+DROP TABLE IF EXISTS `callingcardcdrs`;
+CREATE TABLE callingcardcdrs (
+id INTEGER NOT NULL AUTO_INCREMENT,
+cardnumber CHAR(50) NOT NULL DEFAULT '',
+clid CHAR(80) NOT NULL DEFAULT '',
+destination CHAR(40) NOT NULL DEFAULT '',
+disposition CHAR(20)NOT NULL DEFAULT '',
+callstart CHAR(40) NOT NULL DEFAULT '',
+seconds INTEGER NOT NULL DEFAULT 0,
+debit DECIMAL(20,6) NOT NULL DEFAULT 0.00000,
+credit DECIMAL(20,6) NOT NULL DEFAULT 0.00000,
+status INTEGER DEFAULT 0 NOT NULL,
+uniqueid VARCHAR(60) NOT NULL DEFAULT '',
+notes CHAR(80) NOT NULL DEFAULT '',
+pricelist CHAR(80) NOT NULL DEFAULT '',
+pattern CHAR(80) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `cardnumber` (`cardnumber`)
+);
+
+DROP TABLE IF EXISTS `trunks`;
+CREATE TABLE trunks (
+name VARCHAR(30) NOT NULL,
+tech CHAR(10) NOT NULL DEFAULT '',
+path CHAR(40) NOT NULL DEFAULT '',
+provider CHAR(100) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+dialed_modify TEXT NOT NULL DEFAULT '',
+resellers TEXT NOT NULL DEFAULT '',
+precedence INT(4) NOT NULL DEFAULT 0,
+maxchannels INTEGER DEFAULT 0 NOT NULL,
+ PRIMARY KEY (`name`),
+ KEY `provider` (`provider`),
+ KEY `provider_2` (`provider`)
+);
+
+DROP TABLE IF EXISTS `outbound_routes`;
+CREATE TABLE outbound_routes (
+pattern CHAR(40),
+id INTEGER NOT NULL AUTO_INCREMENT,
+comment CHAR(80) NOT NULL DEFAULT '',
+connectcost INTEGER NOT NULL DEFAULT 0,
+includedseconds INTEGER NOT NULL DEFAULT 0,
+cost INTEGER NOT NULL DEFAULT 0,
+trunk CHAR(80) NOT NULL DEFAULT '',
+inc CHAR(10) NOT NULL DEFAULT '',
+strip CHAR(40) NOT NULL DEFAULT '',
+prepend CHAR(40) NOT NULL DEFAULT '',
+precedence INT(4) NOT NULL DEFAULT 0,
+resellers TEXT NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `trunk` (`trunk`),
+ KEY `pattern` (`pattern`)
+);
+
+DROP TABLE IF EXISTS `dids`;
+CREATE TABLE dids (
+number CHAR(40) NOT NULL,
+account CHAR(50) NOT NULL DEFAULT '',
+connectcost INTEGER NOT NULL DEFAULT 0,
+includedseconds INTEGER NOT NULL DEFAULT 0,
+monthlycost INTEGER NOT NULL DEFAULT 0,
+cost INTEGER NOT NULL DEFAULT 0,
+inc CHAR(10) NOT NULL DEFAULT '',
+extensions CHAR(180) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+provider CHAR(40) NOT NULL DEFAULT '',
+country CHAR (80)NOT NULL DEFAULT '',
+province CHAR (80) NOT NULL DEFAULT '',
+city CHAR (80) NOT NULL DEFAULT '',
+prorate int(1) NOT NULL default 0,
+setup int(11) NOT NULL default 0,
+limittime int(1) NOT NULL default 1,
+disconnectionfee INT(11) NOT NULL default 0,
+variables TEXT NOT NULL DEFAULT '',
+options varchar(40) default NULL,
+maxchannels int(4) NOT NULL default 0,
+chargeonallocation int(1) NOT NULL default 1,
+allocation_bill_status int(1) NOT NULL default 0,
+dial_as CHAR(40) NOT NULL DEFAULT '',
+PRIMARY KEY (`number`),
+ KEY `account` (`account`)
+);
+
+DROP TABLE IF EXISTS `accounts`;
+CREATE TABLE accounts (
+accountid INTEGER NOT NULL AUTO_INCREMENT,
+cc CHAR(20) NOT NULL DEFAULT '',
+number CHAR(50) NOT NULL,
+reseller CHAR(40) NOT NULL DEFAULT '',
+pricelist CHAR(24) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+credit INTEGER NOT NULL DEFAULT 0,
+sweep INTEGER NOT NULL DEFAULT 0,
+creation TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+pin INTEGER NOT NULL DEFAULT 0,
+credit_limit INTEGER NOT NULL DEFAULT 0,
+posttoexternal INTEGER NOT NULL DEFAULT 0,
+balance DECIMAL(20,6) NOT NULL DEFAULT 0,
+password CHAR(80) NOT NULL DEFAULT '',
+first_name CHAR(40) NOT NULL DEFAULT '',
+middle_name CHAR(40) NOT NULL DEFAULT '',
+last_name CHAR(40) NOT NULL DEFAULT '',
+company_name CHAR(40) NOT NULL DEFAULT '',
+address_1 CHAR(80) NOT NULL DEFAULT '',
+address_2 CHAR(80) NOT NULL DEFAULT '',
+address_3 CHAR(80) NOT NULL DEFAULT '',
+postal_code CHAR(12) NOT NULL DEFAULT '',
+province CHAR(40) NOT NULL DEFAULT '',
+city CHAR(80) NOT NULL DEFAULT '',
+country CHAR(40) NOT NULL DEFAULT '',
+telephone_1 CHAR(40) NOT NULL DEFAULT '',
+telephone_2 CHAR(40) NOT NULL DEFAULT '',
+fascimile CHAR(40) NOT NULL DEFAULT '',
+email CHAR(80) NOT NULL DEFAULT '',
+language CHAR(2) NOT NULL DEFAULT '',
+currency CHAR(3) NOT NULL DEFAULT '',
+maxchannels INTEGER DEFAULT 1 NOT NULL,
+routing_technique INT(4) NOT NULL DEFAULT 0,
+dialed_modify TEXT NOT NULL DEFAULT '',
+type INTEGER DEFAULT 0,
+tz CHAR(40) NOT NULL DEFAULT '',
+PRIMARY KEY (`accountid`),
+ KEY `number` (`number`),
+ KEY `pricelist` (`pricelist`),
+ KEY `reseller` (`reseller`)
+);
+
+DROP TABLE IF EXISTS `counters`;
+CREATE TABLE counters (
+id INTEGER NOT NULL AUTO_INCREMENT,
+package CHAR(40) NOT NULL DEFAULT '',
+account VARCHAR(50) NOT NULL,
+seconds INTEGER NOT NULL DEFAULT 0,
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`)
+);
+
+DROP TABLE IF EXISTS `callingcards`;
+CREATE TABLE callingcards (
+id INTEGER NOT NULL AUTO_INCREMENT,
+cardnumber CHAR(20) NOT NULL DEFAULT '',
+language CHAR(10) NOT NULL DEFAULT '',
+value INTEGER NOT NULL DEFAULT 0,
+used INTEGER NOT NULL DEFAULT 0,
+brand VARCHAR(20) NOT NULL DEFAULT '',
+created DATETIME,
+firstused DATETIME,
+expiry DATETIME,
+validfordays CHAR(4) NOT NULL DEFAULT '',
+inuse INTEGER NOT NULL DEFAULT 0,
+pin CHAR(20),
+account VARCHAR(50) NOT NULL DEFAULT '',
+maint_fee_pennies INTEGER NOT NULL DEFAULT 0,
+maint_fee_days INTEGER NOT NULL DEFAULT 0,
+maint_day INTEGER NOT NULL DEFAULT 0,
+disconnect_fee_pennies INTEGER NOT NULL DEFAULT 0,
+minute_fee_minutes INTEGER NOT NULL DEFAULT 0,
+minute_fee_pennies INTEGER NOT NULL DEFAULT 0,
+min_length_minutes INTEGER NOT NULL DEFAULT 0,
+min_length_pennies INTEGER NOT NULL DEFAULT 0,
+timeused INTEGER NOT NULL DEFAULT 0,
+invoice CHAR(20) NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `brand` (`brand`)
+);
+
+CREATE TABLE charge_to_account (
+id INTEGER NOT NULL AUTO_INCREMENT,
+charge_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(50) NOT NULL DEFAULT '',
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE queue_list (
+id INTEGER NOT NULL AUTO_INCREMENT,
+queue_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(20) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE pbx_list (
+id INTEGER NOT NULL AUTO_INCREMENT,
+pbx_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(20) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE extension_list (
+id INTEGER NOT NULL AUTO_INCREMENT,
+extension_id INTEGER NOT NULL DEFAULT 0,
+cardnum CHAR(20) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE cdrs (
+id INTEGER NOT NULL AUTO_INCREMENT,
+uniqueid varchar(60) NOT NULL DEFAULT '',
+cardnum CHAR(50),
+callerid CHAR(80),
+callednum varchar(80) NOT NULL DEFAULT '',
+billseconds INT DEFAULT 0 NOT NULL,
+trunk VARCHAR(30),
+disposition varchar(45) NOT NULL DEFAULT '',
+callstart varchar(80) NOT NULL DEFAULT '',
+debit DECIMAL (20,6) NOT NULL DEFAULT 0,
+credit DECIMAL (20,6) NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 0 NOT NULL,
+notes CHAR(80),
+provider CHAR(50),
+cost DECIMAL(20,6) NOT NULL DEFAULT 0,
+pricelist CHAR(80) NOT NULL DEFAULT '',
+pattern CHAR(80) NOT NULL DEFAULT '',
+type tinyint(1) NOT NULL default '1',
+invoiceid INT(11) DEFAULT 0 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `cardnum` (`cardnum`),
+ KEY `provider` (`provider`),
+ KEY `trunk` (`trunk`),
+ KEY `uniqueid` (`uniqueid`),
+ KEY `status` (`status`)
+);
+
+CREATE TABLE packages (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name CHAR(40) NOT NULL DEFAULT '',
+pricelist CHAR(40) NOT NULL DEFAULT '',
+pattern CHAR(40) NOT NULL DEFAULT '',
+includedseconds INTEGER NOT NULL DEFAULT 0,
+reseller VARCHAR(50) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+ KEY `pricelist` (`pricelist`),
+ KEY `reseller` (`reseller`)
+);
+
+CREATE TABLE ani_map (
+number char(20) NOT NULL,
+account char(50) NOT NULL default '',
+status int(11) NOT NULL default '0',
+context varchar(20) NOT NULL,
+ PRIMARY KEY (`number`),
+KEY `account` (`account`)
+);
+
+CREATE TABLE `ip_map` (
+ip char(15) NOT NULL default '',
+account char(20) NOT NULL default '',
+prefix varchar(20) NULL,
+context varchar(20) NOT NULL,
+PRIMARY KEY (`ip`,`prefix`),
+KEY `account` (`account`)
+);
+
+CREATE TABLE charges (
+id INTEGER NOT NULL AUTO_INCREMENT,
+pricelist CHAR(40) NOT NULL DEFAULT '',
+description VARCHAR(80) NOT NULL DEFAULT '',
+charge INTEGER NOT NULL DEFAULT 0,
+sweep INTEGER NOT NULL DEFAULT 0,
+reseller CHAR(40) NOT NULL DEFAULT '',
+status INTEGER NOT NULL DEFAULT 1,
+PRIMARY KEY (`id`),
+ KEY `pricelist` (`pricelist`)
+);
+
+CREATE TABLE manager_action_variables (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name CHAR(60) NOT NULL DEFAULT '',
+value CHAR(60) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`)
+);
+
+CREATE TABLE callingcard_stats (
+uniqueid VARCHAR(60) NOT NULL,
+total_time VARCHAR(48) NOT NULL,
+billable_time VARCHAR(48) NOT NULL,
+timestamp DATETIME NULL,
+PRIMARY KEY (`uniqueid`)
+);
+
+CREATE TABLE system (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name VARCHAR(48) NULL,
+value VARCHAR(255) NULL,
+comment VARCHAR(255) NULL,
+timestamp DATETIME NULL,
+reseller VARCHAR(48) NULL,
+brand VARCHAR(48) NULL,
+PRIMARY KEY (`id`),
+ KEY (`name`),
+ KEY `reseller` (`reseller`),
+ KEY `brand` (`brand`)
+);
+
+
+INSERT INTO system (name, value, comment) VALUES (
+'log_file','/var/log/astpp/astpp.log','Where do I log to?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'callout_accountcode','admin','Call Files: What accountcode should we use?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'lcrcontext','astpp-outgoing','This is the Local context we use to route our outgoing calls through esp for callbacks');
+
+INSERT INTO system (name, value, comment) VALUES (
+'maxretries','3','Call Files: How many times do we retry?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'retrytime','30','Call Files: How long do we wait between retries?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'waittime','15','Call Files: How long do we wait before the initial call?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'clidname','Private','Call Files: Outgoing CallerID Name');
+
+INSERT INTO system (name, value, comment) VALUES (
+'clidnumber','0000000000','Call Files: Outgoing CallerID Number');
+
+INSERT INTO system (name, value, comment) VALUES (
+'callingcards_callback_context','astpp-callingcards','Call Files: For callingcards what context do we end up in?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'callingcards_callback_extension', 's','Call Files: For callingcards what extension do we use?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'openser_dbengine', 'MySQL','For now this must be MySQL');
+
+INSERT INTO system (name, value, comment) VALUES (
+'openser', '0','Use OPENSER? 1 for yes or 0 for no');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbname', 'openser','OPENSER Database Name', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbuser', 'root','OPENSER Database User', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbhost', 'localhost','OPENSER Database Host', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_dbpass', 'Passw0rd','OPENSER Database Password', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'openser_domain', NULL,'OPENSER Domain', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_email', 'em...@as...','Email address that email should appear to be from', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'asterisk_dir', '/etc/asterisk','Which directory are asterisk configuration files stored in?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_website', 'http://www.astpp.org','Link to your company website', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_name', 'ASTPP.ORG','The name of your company. Used in emails.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'email', '1','Send out email? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'user_email', '1','Email user on account changes? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'debug', '1','Enable debugging output? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'emailadd', 'em...@as...','Administrator email address', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'startingdigit', '0','The digit that all calling cards must start with. 0=disabled', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'enablelcr', '1','Use least cost routing 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'log_file', '/var/log/astpp/astpp.log','ASTPP Log file', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'key_home', 'http://www.astpp.org/astpp.pub','Asterisk RSA Key location (optional)', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rate_engine_csv_file', '/var/log/astpp/astpp.csv','CSV File for call rating data', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'csv_dir', '/var/log/astpp/','CSV File Directory', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'default_brand', 'default','Default pricelist. If a price is not found in the customers pricelist we check this one.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'new_user_brand', 'default','What is the default pricelist for new customers?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'default_context', 'custom-astpp','What is the default context for new devices?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cardlength', '10','Number of digits in calling cards and cc codes.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'asterisk_server', 'voip.astpp.org','Your default voip server. Used in outgoing email.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'currency', 'CAD','Name of the currency you use', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'iax_port', '4569','Default IAX2 Port', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'sip_port', '5060','Default SIP Port', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'ipaddr', 'dynamic','Default IP Address for new devices', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'key', 'astpp.pub','Asterisk RSA Key Name (Optional)', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'pinlength', '6','For those calling cards that are using pins this is the number of digits it will have.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'credit_limit', '0','Default credit limit in dollars.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'decimalpoints', '4','How many decimal points do we bill to?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'decimalpoints_tax', '2','How many decimal points do we calculate taxes to?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'decimalpoints_total', '2','How many decimal points do we calculate totals to?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'max_free_length', '100','What is the maximum length (in minutes) of calls that are at no charge?', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'trackvendorcharges', '0','Do we track the amount of money we spend with specific providers? 0=no 1=yes', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_logo', 'http://www.astpp.org/logo.png','The location of our company logo.', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'company_slogan', 'Welcome to ASTPP','Company slogan', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'version', '1.5Beta', 'ASTPP Version', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'default_language', 'en', 'Default ASTPP Language','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'card_retries','3', 'How many retries do we allow for calling card numbers?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'pin_retries','3', 'How many retries do we allow for pins?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'number_retries','3','How many retries do we allow calling card users when dialing a number?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'booth_context','callshop_booth','Please enter the default context for a callshop booth.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'callingcards_max_length','9000','What is the maximum length (in ms) of a callingcard call?','');
+
+INSERT INTO system (name,value,comment,timestamp) VALUES (
+'template_die_on_bad_params','0','Should HTML::Template die on bad parameters?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'results_per_page','30','How many results per page do we should in the web interface?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astpp_dir','/var/lib/astpp','Where do the astpp configs live?','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'auth','Passw0rd!','This is the override authorization code and will allow access to the system.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_dbengine','MySQL','Database type for Asterisk(tm) -Realtime','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbengine','MySQL','Database type for the cdr database','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_dbengine','MySQL','Database type for OSCommerce','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_dbengine','MySQL','Database type for AgileBill(tm)','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_dbengine','MySQL','Database type for FreePBX','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'externalbill','oscommerce','Please specify the external billing application to use. If you are not using any then leave it blank. Valid options are "agile" and "oscommerce".','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'callingcards','1','Do you wish to enable calling cards? 1 for yes and 2 for no.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astcdr','1','Change this one at your own peril. If you switch it off, calls will not be marked as billed in asterisk once they are billed.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'posttoastpp','1','Change this one at your own peril. If you switch it off, calls will not be written to astpp when they are calculated.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'sleep','10','How long shall the rating engine sleep after it has been notified of a hangup? (in seconds)','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'users_dids_amp','0','If this is enabled, ASTPP will create users and DIDs in the FreePBX (www.freepbx.org) database.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'users_dids_rt','1','If this is enabled, ASTPP will create users and DIDs in the Asterisk Realtime database.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'users_dids_freeswitch','0','If this is enabled, ASTPP will create SIP users in the freeswitch database.','');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'softswitch','0','What softswitch are we using? 0=asterisk, 1=freeswitch','');
+
+INSERT INTO system (name, value, comment) VALUES (
+'service_prepend','778','');
+INSERT INTO system (name, value, comment) VALUES (
+'service_length,','7','');
+INSERT INTO system (name, value, comment) VALUES (
+'service_filler','4110000','');
+
+INSERT INTO system (name, value, comment) VALUES (
+'asterisk_cdr_table','cdr','Which table of the Asterisk(TM) database are the cdrs in?');
+
+-- AgileBill(Trademark of AgileCo) Settings:
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_db','agile','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_pass','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_site_id','1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_charge_status','0','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_taxable','1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_dbprefix','_','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'agile_service_prepend','778','','');
+
+-- OSCommerce Settings (www.oscommerce.org)
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_db','oscommerce','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_pass','password','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_product_id','99999999','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_payment_method','"Charge"','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_order_status','1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'osc_post_nc','0','Do we post "free" items to the oscommerce invoice? 0=No 1=Yes','');
+
+-- FreePBX Settings (www.freepbx.org)
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_db','asterisk','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_pass','passw0rd','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_table','iax','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_table','sip','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_extensions_table','extensions','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_codec_allow','g729,ulaw,alaw','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_codec_disallow','all','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_mailbox_group','default','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_nat','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_canreinvite','no','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_dtmfmode','rfc2833','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_qualify','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_type','friend','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_callgroup','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_sip_pickupgroup','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_notransfer','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_type','friend','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freepbx_iax_qualify','yes','','');
+
+-- Asterisk -realtime Settings
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_host','127.0.0.1','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_db','realtime','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_user','root','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_pass','','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_iax_table','iax','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_table','sip','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_extensions_table','extensions','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_insecure','very','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_nat','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_canreinvite','no','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_codec_allow','g729,ulaw,alaw','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_codec_disallow','all','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_mailbox_group','default','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_qualify','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_sip_type','friend','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_iax_qualify','yes','','');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'rt_iax_type','friend','','');
+INSERT INTO system (name, value, comment) VALUES (
+'rt_voicemail_table','voicemail_users','');
+
+
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_rate_announce','1','Do we want the calling cards script to announce the rate on calls?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_timelimit_announce','1','Do we want the calling cards script to announce the timelimit on calls?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_cancelled_prompt','1','Do we want the calling cards script to announce that the call was cancelled?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_menu','1','Do we want the calling cards script to present a menu before exiting?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_connection_prompt','1','Do we want the calling cards script to announce that it is connecting the call?');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_pin_input_timeout','15000','How long do we wait when entering the calling card pin? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_number_input_timeout','15000','How long do we wait when entering the calling card number? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_dial_input_timeout','15000','How long do we wait when entering the destination number in calling cards? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_general_input_timeout','15000','How long do we wait for input in general menus? Specified in MS');
+INSERT INTO system (name, value, comment) VALUES (
+'calling_cards_welcome_file','silence/1','What do we play for a welcome file?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'sip_ext_prepend','10','What should every autoadded SIP extension begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'iax2_ext_prepend','10','What should every autoadded IAX2 extension begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'cc_prepend','','What should every autoadded callingcard begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'pin_cc_prepend','','What should every autoadded callingcard pin begin with?');
+INSERT INTO system (name, value, comment) VALUES (
+'pin_act_prepend','','What should every autoadded account pin begin with?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_directory','/usr/local/freeswitch','What is the Freeswitch root directory?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_password','ClueCon','Freeswitch event socket password');
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_host','localhost','Freeswitch event socket host');
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_port','8021','Freeswitch event socket port');
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_timeout','30','Freeswitch seconds to expect a heartbeat event or reconnect');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_dbengine', 'MySQL','For now this must be MySQL');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbname', 'freeswitch','Freeswitch Database Name', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbuser', 'root','Freeswitch Database User', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbhost', 'localhost','Freeswitch Database Host', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'freeswitch_dbpass', 'Passw0rd','Freeswitch Database Password', '');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_cdr_table','fscdr','Which table of the cdr database are the Freeswitch cdrs in?');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_domain','$${local_ip_v4}','This is entered as the Freeswitch domain.');
+
+INSERT INTO system (name, value, comment) VALUES (
+'freeswitch_context','default','This is entered as the Freeswitch user context.');
+INSERT INTO system (name,value,comments) VALUES (
+'freeswitch_sound_files','en/us/callie','Where are our sound files located?'
+);
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbname', 'asteriskcdrdb',
+'CDR Database Name', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbuser', 'root',
+'CDR Database User', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbhost', 'localhost',
+'CDR Database Host', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'cdr_dbpass', 'Passw0rd',
+'CDR Database Password', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astman_user', 'admin','Asterisk(tm) Manager Interface User', '');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astman_host', 'localhost','Asterisk(tm) Manager Interface Host', '');
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'astman_secret', 'amp111','Asterisk(tm) Manager Interface Secret', '');
+
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'call_max_length','1440000','What is the maximum length (in ms) of a LCR call?','');
+
+-- 3rd Party PBX Mods
+INSERT INTO system (name, value, comment, timestamp) VALUES (
+'thirdlane_mods','0','Provides a few different modifications across the rating code to work better with Thirdlane(tm) cdrs.','');
+
+--
+-- Enough Configuration settings
+--
+
+DROP TABLE IF EXISTS `countrycode`;
+CREATE TABLE `countrycode` (
+ `country` varchar(255) NOT NULL,
+ PRIMARY KEY (`country`),
+ KEY `country` (`country`)
+);
+
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Afghanistan'),
+ ('Alaska'),
+ ('Albania'),
+ ('Algeria'),
+ ('AmericanSamoa'),
+ ('Andorra'),
+ ('Angola'),
+ ('Antarctica'),
+ ('Argentina'),
+ ('Armenia'),
+ ('Aruba'),
+ ('Ascension'),
+ ('Australia'),
+ ('Austria'),
+ ('Azerbaijan'),
+ ('Bahrain'),
+ ('Bangladesh'),
+ ('Belarus'),
+ ('Belgium'),
+ ('Belize'),
+ ('Benin'),
+ ('Bhutan'),
+ ('Bolivia'),
+ ('Bosnia & Herzegovina'),
+ ('Botswana'),
+ ('Brazil'),
+ ('Brunei Darussalam'),
+ ('Bulgaria'),
+ ('Burkina Faso'),
+ ('Burundi'),
+ ('Cambodia'),
+ ('Cameroon'),
+ ('Canadda'),
+ ('Cape Verde Islands'),
+ ('Central African Republic'),
+ ('Chad'),
+ ('Chile'),
+ ('China'),
+ ('Colombia'),
+ ('Comoros'),
+ ('Congo'),
+ ('Cook Islands'),
+ ('Costa Rica'),
+ ('Croatia'),
+ ('Cuba'),
+ ('Cuba Guantanamo Bay'),
+ ('Cyprus'),
+ ('Czech Republic'),
+ ('Denmark'),
+ ('Diego Garcia'),
+ ('Djibouti'),
+ ('Dominican Republic'),
+ ('East Timor'),
+ ('Ecuador'),
+ ('Egypt'),
+ ('El Salvador'),
+ ('Equatorial Guinea'),
+ ('Eritrea'),
+ ('Estonia'),
+ ('Ethiopia'),
+ ('Faroe Islands');
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Fiji Islands'),
+ ('Finland'),
+ ('France'),
+ ('French Guiana'),
+ ('French Polynesia'),
+ ('Gabonese Republic'),
+ ('Gambia'),
+ ('Georgia'),
+ ('Germany'),
+ ('Ghana'),
+ ('Gibraltar'),
+ ('Greece'),
+ ('Greenland'),
+ ('Guadeloupe'),
+ ('Guam'),
+ ('Guatemala'),
+ ('Guinea'),
+ ('Guyana'),
+ ('Haiti'),
+ ('Honduras'),
+ ('Hong Kong'),
+ ('Hungary'),
+ ('Iceland'),
+ ('India'),
+ ('Indonesia'),
+ ('Iran'),
+ ('Iraq'),
+ ('Ireland'),
+ ('Israel'),
+ ('Italy'),
+ ('Jamaica'),
+ ('Japan'),
+ ('Jordan'),
+ ('Kazakstan'),
+ ('Kenya'),
+ ('Kiribati'),
+ ('Kuwait'),
+ ('Kyrgyz Republic'),
+ ('Laos'),
+ ('Latvia'),
+ ('Lebanon'),
+ ('Lesotho'),
+ ('Liberia'),
+ ('Libya'),
+ ('Liechtenstein'),
+ ('Lithuania'),
+ ('Luxembourg'),
+ ('Macao'),
+ ('Madagascar'),
+ ('Malawi'),
+ ('Malaysia'),
+ ('Maldives'),
+ ('Mali Republic'),
+ ('Malta'),
+ ('Marshall Islands'),
+ ('Martinique'),
+ ('Mauritania'),
+ ('Mauritius'),
+ ('MayotteIsland'),
+ ('Mexico'),
+ ('Midway Islands'),
+ ('Moldova'),
+ ('Monaco'),
+ ('Mongolia'),
+ ('Morocco');
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Mozambique'),
+ ('Myanmar'),
+ ('Namibia'),
+ ('Nauru'),
+ ('Nepal'),
+ ('Netherlands'),
+ ('Netherlands Antilles'),
+ ('New Caledonia'),
+ ('New Zealand'),
+ ('Nicaragua'),
+ ('Niger'),
+ ('Nigeria'),
+ ('Niue'),
+ ('Norfolk Island'),
+ ('North Korea'),
+ ('Norway'),
+ ('Oman'),
+ ('Pakistan'),
+ ('Palau'),
+ ('Palestinian Settlements'),
+ ('Panama'),
+ ('PapuaNew Guinea'),
+ ('Paraguay'),
+ ('Peru'),
+ ('Philippines'),
+ ('Poland'),
+ ('Portugal'),
+ ('Puerto Rico'),
+ ('Qatar'),
+ ('RéunionIsland'),
+ ('Romania'),
+ ('Russia'),
+ ('Rwandese Republic'),
+ ('San Marino'),
+ ('São Tomé and Principe'),
+ ('Saudi Arabia'),
+ ('Senegal '),
+ ('Serbia and Montenegro'),
+ ('Seychelles Republic'),
+ ('Sierra Leone'),
+ ('Singapore'),
+ ('Slovak Republic'),
+ ('Slovenia'),
+ ('Solomon Islands'),
+ ('Somali Democratic Republic'),
+ ('South Africa'),
+ ('South Korea'),
+ ('Spain'),
+ ('Sri Lanka'),
+ ('St Kitts - Nevis'),
+ ('St. Helena'),
+ ('St. Lucia'),
+ ('St. Pierre & Miquelon'),
+ ('St. Vincent & Grenadines'),
+ ('Sudan');
+INSERT INTO `countrycode` (`country`) VALUES
+ ('Suriname'),
+ ('Swaziland'),
+ ('Sweden'),
+ ('Switzerland'),
+ ('Syria'),
+ ('Taiwan'),
+ ('Tajikistan'),
+ ('Tanzania'),
+ ('Thailand'),
+ ('Togolese Republic'),
+ ('Tokelau'),
+ ('Tonga Islands'),
+ ('Trinidad & Tobago'),
+ ('Tunisia'),
+ ('Turkey'),
+ ('Turkmenistan'),
+ ('Tuvalu'),
+ ('Uganda'),
+ ('Ukraine'),
+ ('United Arab Emirates'),
+ ('United Kingdom'),
+ ('United States of America'),
+ ('Uruguay'),
+ ('Uzbekistan'),
+ ('Vanuatu'),
+ ('Venezuela'),
+ ('Vietnam'),
+ ('Wake Island'),
+ ('Wallisand Futuna Islands'),
+ ('Western Samoa'),
+ ('Yemen'),
+ ('Zambia'),
+ ('Zimbabwe');
+
+DROP TABLE IF EXISTS `currency`;
+CREATE TABLE `currency` (
+ `Currency` varchar(3) NOT NULL default '',
+ `CurrencyName` varchar(40) NOT NULL default '',
+ PRIMARY KEY (`Currency`)
+);
+
+INSERT INTO `currency` (`Currency`,`CurrencyName`) VALUES
+ ('USD','US Dollars'),
+ ('CAD','Canadian Dollars'),
+ ('AUD','Australian Dollars');
+
+CREATE TABLE `language` (
+ `language` varchar(5) NOT NULL,
+ `languagename` varchar(40) NOT NULL,
+ `active` tinyint(1) NOT NULL default '1',
+ PRIMARY KEY (`language`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+INSERT INTO `language` (`language`,`languagename`,`active`) VALUES
+ ('en','English',1),
+ ('fr','French',1),
+ ('de','German',1);
+
+CREATE TABLE `resellers` (
+ name varchar(40) NOT NULL default '',
+ status int(11) NOT NULL default '1',
+ posttoexternal int(11) NOT NULL default '0',
+ agile_site_id int(11) NOT NULL default '0',
+ config_file char(80) NOT NULL default 'reseller.conf',
+ companyname varchar(255) default NULL,
+ slogan varchar(255) default NULL,
+ footer varchar(255) default NULL,
+ pricelist varchar(255) default NULL,
+ currency varchar(255) default NULL,
+ logo varchar(255) default NULL,
+ website varchar(255) default NULL,
+ adminemail varchar(255) default NULL,
+ salesemail varchar(255) default NULL,
+ phone varchar(45) default NULL,
+ fax varchar(45) default NULL,
+ address1 varchar(255) default NULL,
+ address2 varchar(255) default NULL,
+ city varchar(255) default NULL,
+ state varchar(255) default NULL,
+ postcode varchar(255) default NULL,
+ country varchar(255) default NULL,
+ defaultbrand varchar(45) NOT NULL default 'default',
+ defaultcurrency varchar(45) NOT NULL default 'USD',
+ defaultcredit varchar(45) NOT NULL default '0.00',
+ externalbill varchar(45) NOT NULL default '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+CREATE TABLE templates (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name VARCHAR(45) NOT NULL default '',
+reseller VARCHAR(45) NOT NULL default '',
+template TEXT NOT NULL default '',
+ PRIMARY KEY (`id`),
+ KEY `reseller` (`reseller`)
+);
+
+INSERT INTO templates (name,template) VALUES
+('voip_account_refilled','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP account with $config->{company_name} has been refilled.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('voip_reactivate_account','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP account with $config->{company_name} has been reactivated.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_add_user','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP account with $config->{company_name} has been added.
+Your Username is -- $vars->{extension} --
+Your Password is -- $vars->{secret} --
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('add_sip_device','Attention: $vars->{title} $vars->{first} $vars->{last}
+A new device has been enabled on your account. Here
+is the necessary configuration information.
+------- $config->{company_name} Configuration Info --------
+In sip.conf:
+[$config->{company_name}-in]
+type=user
+username=$config->{company_name}-in
+auth=rsa
+inkeys=$config->{key} ;This key may be downloaded from $config->{key_home}
+host=$config->{asterisk_server}
+context=from-pstn
+accountcode=$config->{company_name}
+[$config->{company_name}]
+type=peer
+username=$vars->{extension}
+secret=$vars->{secret}
+host=$config->{asterisk_server}
+callerid= <555-555-5555>
+qualify=yes
+accountcode=$config->{company_name} ; for call tracking in the cdr
+In the [globals] section add:
+register => $vars->{user}:password@$config->{asterisk_server}');
+
+INSERT INTO templates (name,template) VALUES
+('add_iax_device','Attention: $vars->{title} $vars->{first} $vars->{last}
+A new device has been enabled on your account. Here
+is the necessary configuration information.
+------- $config->{company_name} Configuration Info --------
+In iax.conf:
+At the bottom of the file add:
+[$config->{company_name}-in]
+;trunk=yes ;optional .. only works if you have a zaptel or ztdummy driver running
+type=user
+username=$config->{company_name}-in
+auth=rsa
+inkeys=$config->{key} ;This key may be downloaded from $config->{key_home}
+host=$config->{asterisk_server}
+context=incoming
+accountcode=$config->{company_name} ;for call tracking in the cdr
+[$config->{company_name}]
+;to simplify and config outgoing calls
+;trunk=yes ;optional .. only works if you have a zaptel driver running
+type=peer
+username=$vars->{extension}
+secret=$vars->{secret}
+host=$config->{asterisk_server}
+callerid=<555-555-5555> ;only the number will really be used
+qualify=yes
+accountcode=$config->{company_name} ; for call tracking in the cdr
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_remove_user','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your VOIP Termination with $config->{company_name} has been removed
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_calling_card','You have added a $vars->{pricelist} callingcard in the amount of $vars->{pennies} cents.
+Card Number $cc Pin: $pin
+Thanks for your patronage.
+The $config->{company_name} sales team');
+
+INSERT INTO templates (name,template) VALUES
+('email_add_did','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your DID with $config->{company_name} has been added
+The number is: $did
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team
+Here is a sample setup which would call a few sip phones with incoming calls:
+[incoming]
+exten => _1$did,1,Wait(2)
+exten => _1$did,2,Dial(SIP/2201&SIP/2202,15,Ttm) ; dial a couple of phones for 15 secs
+exten => _1$did,3,Voicemail(u1000) ; go to unavailable voicemail (vm box 1000)
+exten => _1$did,103,Voicemail(b1000) ; go to busy voicemail (vm box 1000)');
+
+INSERT INTO templates (name,template) VALUES
+('email_remove_did','Attention: $vars->{title} $vars->{first} $vars->{last}
+Your DID with $config->{company_name} has been removed
+The number was: $did
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_new_invoice','Invoice # $invoice in the amount of \$$total has been added to your account.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+INSERT INTO templates (name,template) VALUES
+('email_low_balance','Your VOIP account with $config->{company_name} has a balance of \$$balance.
+Please visit our website to refill your account to ensure uninterrupted service.
+For information please visit $config->{company_website} or
+contact our support department at $config->{company_email}
+Thanks,
+The $config->{company_name} support team');
+
+CREATE TABLE `sweeplist` (
+ `Id` int(10) unsigned NOT NULL default '0',
+ `sweep` varchar(45) NOT NULL default '',
+ PRIMARY KEY (`Id`)
+);
+
+INSERT INTO sweeplist (Id,sweep) VALUES
+(0,'daily'),
+(1,'weekly'),
+(2,'monthly'),
+(3,'quarterly'),
+(4,'semi-annually'),
+(5,'annually')
+;
+
+CREATE TABLE userlevels (
+userlevelid int(11) NOT NULL,
+userlevelname varchar(50) NOT NULL,
+PRIMARY KEY (`userlevelid`)
+);
+
+INSERT INTO `userlevels` (`userlevelid`,`userlevelname`) VALUES
+ (-1,'Administrator'),
+ (0,'Anonymous'),
+ (1,'Reseller'),
+ (2,'Admin'),
+ (3,'Vendor'),
+ (4,'Customer Service'),
+ (5,'Users');
+
+CREATE TABLE reseller_pricing (
+id INTEGER NOT NULL AUTO_INCREMENT,
+reseller VARCHAR(50) NOT NULL,
+type INTEGER NOT NULL DEFAULT 1,
+monthlycost INTEGER NOT NULL DEFAULT 0,
+prorate INTEGER NOT NULL DEFAULT 0,
+setup INTEGER NOT NULL DEFAULT 0,
+cost INTEGER NOT NULL DEFAULT 0,
+connectcost INTEGER NOT NULL DEFAULT 0,
+includedseconds INTEGER NOT NULL DEFAULT 0,
+note VARCHAR(50) NOT NULL DEFAULT '',
+disconnectionfee INTEGER NOT NULL DEFAULT 0,
+status INTEGER DEFAULT 1 NOT NULL,
+inc CHAR(10) NOT NULL DEFAULT '',
+PRIMARY KEY (`id`),
+ KEY `reseller` (`reseller`)
+);
+
+CREATE TABLE callshops (
+id INTEGER NOT NULL AUTO_INCREMENT,
+name VARCHAR(50) NOT NULL,
+osc_dbname VARCHAR(50) NOT NULL DEFAULT '',
+osc_dbpass VARCHAR(50) NOT NULL DEFAULT '',
+osc_dbuser VARCHAR(50) NOT NULL DEFAULT '',
+osc_dbhost VARCHAR(50) NOT NULL DEFAULT '',
+osc_site VARCHAR(50) NOT NULL DEFAULT '',
+status INTEGER DEFAULT 1 NOT NULL,
+PRIMARY KEY (`id`),
+KEY `name` (`name`)
+);
+
+CREATE TABLE extensions_status (
+id INTEGER NOT NULL AUTO_INCREMENT,
+tech VARCHAR(6) NULL,
+extension VARCHAR(20) NULL,
+number VARCHAR(255) NULL,
+status VARCHAR(255) NULL,
+timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+Privilege VARCHAR(255) NULL,
+Channel VARCHAR(255) NULL,
+Cause VARCHAR(255) NULL,
+Causetxt VARCHAR(255) NULL,
+PeerStatus VARCHAR(255) NULL,
+Peer VARCHAR(255) NULL,
+Context VARCHAR(255) NULL,
+Application VARCHAR(255) NULL,
+AppData VARCHAR(255) NULL,
+Priority VARCHAR(255) NULL,
+Uniqueid VARCHAR(255) NULL,
+Event VARCHAR(255) NULL,
+State VARCHAR(255) NULL,
+CallerIDName VARCHAR(255) NULL,
+CallerID VARCHAR(255) NULL,
+AstExtension VARCHAR(255) NULL,
+PRIMARY KEY (`id`),
+KEY `extension` (`extension`));
+
+CREATE TABLE activity_logs (
+id INTEGER NOT NULL AUTO_INCREMENT,
+timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+message TEXT NOT NULL DEFAULT '',
+user VARCHAR(50),
+PRIMARY KEY (`id`));
+
+-- CREATE TABLE sql_commands (
+-- id INTEGER NOT NULL AUTO_INCREMENT,
+-- name VARCHAR(45) NOT NULL default '',
+-- sql TEXT NOT NULL default '',
+-- comment TEXT NOT NULL default '',
+-- timestamp TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+-- PRIMARY KEY (`id`));
+
+CREATE TABLE `invoices` (
+`invoiceid` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`accountid` INT( 11 ) NOT NULL ,
+`date` DATE NOT NULL ,
+`status` TINYINT NOT NULL DEFAULT '0',
+`external_id` INT( 11 ) NOT NULL DEFAULT '0'
+) ENGINE = MYISAM;
+
+CREATE TABLE `invoices_total` (
+`invoices_total_id` int(10) unsigned NOT NULL auto_increment,
+`invoices_id` int(11) NOT NULL,
+`title` varchar(255) NOT NULL,
+`text` varchar(255) NOT NULL,
+`value` decimal(15,4) NOT NULL,
+`class` varchar(32) NOT NULL,
+`sort_order` int(11) NOT NULL,
+PRIMARY KEY (`invoices_total_id`)
+);
+
+ CREATE TABLE `payments` (
+`id` INT( 11 ) NOT NULL ,
+`accountid` INT( 11 ) NOT NULL ,
+`credit` DECIMAL NOT NULL DEFAULT '0',
+`status` TINYINT NOT NULL DEFAULT '0',
+`type` INT NOT NULL ,
+`notes` TEXT NOT NULL ,
+PRIMARY KEY ( `id` )
+) ENGINE = MYISAM;
+
+ CREATE TABLE `taxes` (
+`taxes_id` int(11) NOT NULL auto_increment,
+`taxes_priority` int(5) default '1',
+`taxes_amount` decimal(7,4) NOT NULL,
+`taxes_rate` decimal(7,4) NOT NULL,
+`taxes_description` varchar(255) NOT NULL,
+`last_modified` datetime default NULL,
+`date_added` datetime NOT NULL,
+PRIMARY KEY (`taxes_id`)
+);
+
+ CREATE TABLE `taxes_to_accounts` (
+`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`accounti...
[truncated message content] |
|
From: <dar...@us...> - 2010-02-20 07:06:33
|
Revision: 2308
http://astpp.svn.sourceforge.net/astpp/?rev=2308&view=rev
Author: darrenkw
Date: 2010-02-20 07:06:27 +0000 (Sat, 20 Feb 2010)
Log Message:
-----------
Corrected modules.conf.xml to support mod_perl.
Modified Paths:
--------------
trunk/freeswitch/conf/modules.conf.xml
Modified: trunk/freeswitch/conf/modules.conf.xml
===================================================================
--- trunk/freeswitch/conf/modules.conf.xml 2010-02-20 07:03:37 UTC (rev 2307)
+++ trunk/freeswitch/conf/modules.conf.xml 2010-02-20 07:06:27 UTC (rev 2308)
@@ -73,7 +73,7 @@
<!-- Languages -->
<load module="mod_spidermonkey"/>
- <!-- <load module="mod_perl"/> -->
+ <load module="mod_perl"/>
<!-- <load module="mod_python"/> -->
<!-- <load module="mod_java"/> -->
<!-- <load module="mod_lua"/> -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-20 07:03:43
|
Revision: 2307
http://astpp.svn.sourceforge.net/astpp/?rev=2307&view=rev
Author: darrenkw
Date: 2010-02-20 07:03:37 +0000 (Sat, 20 Feb 2010)
Log Message:
-----------
the freeswitch.xml we included was not only not needed but wrong. It's been removed.
Removed Paths:
-------------
trunk/freeswitch/conf/freeswitch.xml
Deleted: trunk/freeswitch/conf/freeswitch.xml
===================================================================
--- trunk/freeswitch/conf/freeswitch.xml 2010-02-20 07:01:16 UTC (rev 2306)
+++ trunk/freeswitch/conf/freeswitch.xml 2010-02-20 07:03:37 UTC (rev 2307)
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<document type="freeswitch/xml">
- <!--#comment
- All comments starting with #command will be preprocessed and never sent to the xml parser
- Valid instructions:
- #include ==> Include another file to this exact point
- (partial xml should be encased in <include></include> tags)
- #set ==> Set a global variable (can be expanded during preprocessing with $$ variables)
- (note the double $$ which denotes preprocessor variables)
- #comment ==> A general comment such as this
-
- The preprocessor will compile the full xml document to ${prefix}/log/freeswitch.xml.fsxml
- Don't modify it while freeswitch is running cos it is mem mapped in most cases =D
-
- The same can be achieved with the <X-PRE-PROCESS> tag where the attrs 'cmd' and 'data' are
- parsed in the same way.
- -->
- <!--#comment
- vars.xml contains all the #set directives for the preprocessor.
- -->
- <X-PRE-PROCESS cmd="include" data="vars.xml"/>
-
- <section name="configuration" description="Various Configuration">
- <X-PRE-PROCESS cmd="include" data="autoload_configs/*.xml"/>
- <X-PRE-PROCESS cmd="include" data="autoload_configs/xml_curl.conf.xml"/>
- </section>
-
- <!-- mod_dingaling is reliant on the vcard data in the "directory" section. -->
- <!-- mod_sofia is reliant on the user data for authorization -->
- <section name="directory" description="User Directory">
- <X-PRE-PROCESS cmd="include" data="directory/*.xml"/>
- </section>
-
- <!-- phrases section (under development still) -->
- <section name="phrases" description="Speech Phrase Management">
- <macros>
- <X-PRE-PROCESS cmd="include" data="lang/en/*.xml"/>
- </macros>
- </section>
-
-</document>
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-20 07:01:23
|
Revision: 2306
http://astpp.svn.sourceforge.net/astpp/?rev=2306&view=rev
Author: darrenkw
Date: 2010-02-20 07:01:16 +0000 (Sat, 20 Feb 2010)
Log Message:
-----------
Cleaned up in the makefile. Fixed a bug that caused astpp-admin.cgi to fail when trying to list sip devices from freeswitch.
Modified Paths:
--------------
trunk/Makefile
trunk/web_interface/astpp-admin.cgi
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-02-18 05:02:42 UTC (rev 2305)
+++ trunk/Makefile 2010-02-20 07:01:16 UTC (rev 2306)
@@ -1,3 +1,4 @@
+#Makefile for ASTPP (www.astpp.org)
SHELL=/bin/sh
ASTERISKDIR=/etc/asterisk
IAX=/etc/asterisk/iax.conf
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2010-02-18 05:02:42 UTC (rev 2305)
+++ trunk/web_interface/astpp-admin.cgi 2010-02-20 07:01:16 UTC (rev 2306)
@@ -2104,13 +2104,12 @@
}
}
if ($fs_db) {
- my (@sip_devices);
- @sip_devices = $ASTPP->fs_list_sip_usernames(
+ my ($count,@sip_devices) = $ASTPP->fs_list_sip_usernames(
cc => $accountinfo->{cc},
accountcode => $accountinfo->{number}
);
foreach my $record (@sip_devices) {
- print STDERR $record->{username};
+# print STDERR $record->{username};
my $deviceinfo = $ASTPP->fs_retrieve_sip_user(
directory_id => $record->{id}
);
@@ -9908,7 +9907,7 @@
sub build_freeswitch_sip_devices() {
return gettext("Database is NOT configured!") . "\n" unless $astpp_db;
- my ( @device_list, @sip_devices );
+ my ( @device_list, $count, @sip_devices );
my $template = HTML::Template->new(
filename => '/var/lib/astpp/templates/freeswitch-sip-list.tpl',
die_on_bad_params => $config->{template_die_on_bad_params}
@@ -9962,7 +9961,7 @@
$template->param( fs_username => $deviceinfo->{username} );
}
- @sip_devices = $ASTPP->fs_list_sip_usernames();
+ ($count,@sip_devices) = $ASTPP->fs_list_sip_usernames();
foreach my $record (@sip_devices) {
my $deviceinfo = $ASTPP->fs_retrieve_sip_user(
directory_id => $record->{id}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-18 05:02:49
|
Revision: 2305
http://astpp.svn.sourceforge.net/astpp/?rev=2305&view=rev
Author: darrenkw
Date: 2010-02-18 05:02:42 +0000 (Thu, 18 Feb 2010)
Log Message:
-----------
Added more debugging.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-02-15 18:57:11 UTC (rev 2304)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-02-18 05:02:42 UTC (rev 2305)
@@ -129,6 +129,7 @@
"<action application=\"reject\" data=\"CANNOT RETRIEVE ACCOUNT\"/>\n";
$xml = $ASTPP->fs_dialplan_xml_footer( xml => $xml );
$ASTPP->debug( debug => "Returning nothing so dialplan can continue." );
+ $ASTPP->debug( debug => $void_xml );
print $void_xml;
exit(0);
}
@@ -168,6 +169,7 @@
if (!$routeinfo->{cost} && !$routeinfo->{pricelist}) {
$ASTPP->debug( debug => "COULD NOT FIND ROUTE. EXITING SO DIALPLAN CAN TAKE OVER" );
+ $ASTPP->debug( debug => $void_xml );
print $void_xml;
exit(0);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-15 18:57:23
|
Revision: 2304
http://astpp.svn.sourceforge.net/astpp/?rev=2304&view=rev
Author: darrenkw
Date: 2010-02-15 18:57:11 +0000 (Mon, 15 Feb 2010)
Log Message:
-----------
It is now working to process calls both through ASTPP and through the static configuration files. The same goes for registering sip users.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-02-12 04:25:26 UTC (rev 2303)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-02-15 18:57:11 UTC (rev 2304)
@@ -324,12 +324,15 @@
$xml = $ASTPP->fs_directory_xml_footer( xml => $xml );
}
- $ASTPP->debug( debug => $xml );
- $ASTPP->debug( debug => $user_count );
+ $ASTPP->debug( debug => "User Count: " . $user_count );
if ($user_count > 0) {
+ $ASTPP->debug( debug => $xml );
print $xml;
+ exit(0);
} else {
+ $ASTPP->debug( debug => $void_xml );
print $void_xml;
+ exit(0);
}
} elsif ( $params->{cdr} ) {
print header( -type => 'text/plain' );
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2010-02-12 04:25:26 UTC (rev 2303)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2010-02-15 18:57:11 UTC (rev 2304)
@@ -252,7 +252,7 @@
sub ip_address_authenticate
{
my ($self, %arg) = @_;
- my ($sql,$tmp);
+ my ($sql,$tmp,@results);
$arg{ip_address} = $arg{ip} if $arg{ip}; #Freeswitch passes the ip in a different format.
$tmp = "SELECT * FROM ip_map WHERE ip = " . $self->{_astpp_db}->quote($arg{ip_address})
. " AND prefix IN (NULL,'') OR ip = " . $self->{_astpp_db}->quote($arg{ip_address});
@@ -261,9 +261,13 @@
print STDERR $tmp . "\n";
$sql = $self->{_astpp_db}->prepare($tmp);
$sql->execute;
- my $anidata = $sql->fetchrow_hashref;
+ while (my $record = $sql->fetchrow_hashref) {
+ print STDERR $record->{ip};
+ push @results, $record;
+ }
+ my $rows = $sql->rows;
$sql->finish;
- return $anidata;
+ return ($rows,@results);
}
=item $ASTPP->fs_dialplan_xml_header()
@@ -728,8 +732,9 @@
print STDERR $record->{username};
push @results, $record;
}
+ my $rows = $sql->rows;
$sql->finish;
- return @results;
+ return ($rows,@results);
}
sub fs_list_sip_params
@@ -775,7 +780,9 @@
my ($sql,$sql1,$tmp,$tmp1);
my $user_count = 0;
$arg{xml} .= "<domain name=\"" . $arg{domain} . "\">";
- my @sip_users = &fs_list_sip_usernames($self,%arg);
+ my ($count,@sip_users) = &fs_list_sip_usernames($self,%arg);
+ print STDERR "COUNT: $count\n";
+ if ($count > 0) {
foreach my $record (@sip_users) {
$user_count++;
$arg{xml} .= "<user id=\"" . $record->{username} . "\" mailbox=\"" . $record->{mailbox} . "\">\n";
@@ -790,12 +797,16 @@
foreach my $record (@vars) {
$arg{xml} .= "<variable name=\"" . $record->{var_name} . "\" value=\"" . $record->{var_value} . "\"/>\n";
}
+ $arg{xml} .= "<variable name=\"accountcode\" value=\"" . $record->{account} . "\"/>\n";
+ $arg{xml} .= "<variable name=\"user_context\" value=\"" . $record->{context} . "\"/>\n";
$arg{xml} .= "</variables>\n";
$arg{xml} .= "</user>\n";
- };
- my @ip_users = &ip_address_authenticate($self,%arg);
+ }
+ }
+ my ($count,@ip_users) = &ip_address_authenticate($self,%arg);
+ print STDERR "COUNT: $count\n";
+ if ($count > 0) {
foreach my $record (@ip_users) {
- $user_count++;
# This is only temporary and should be removed
#
$record->{id} = 0;
@@ -817,7 +828,9 @@
$arg{xml} .= "</variables>\n";
$arg{xml} .= "</user>\n";
}
+ }
$arg{xml} .= "</domain>\n";
+ print STDERR "TOTAL USERS: $user_count \n";
return ($arg{xml},$user_count);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-12 04:25:33
|
Revision: 2303
http://astpp.svn.sourceforge.net/astpp/?rev=2303&view=rev
Author: darrenkw
Date: 2010-02-12 04:25:26 +0000 (Fri, 12 Feb 2010)
Log Message:
-----------
Missing the output header.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-02-12 04:21:23 UTC (rev 2302)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-02-12 04:25:26 UTC (rev 2303)
@@ -35,7 +35,8 @@
$ASTPP = ASTPP->new;
$ASTPP->set_verbosity(4); #Tell ASTPP debugging how verbose we want to be.
-$void_xml = "<?xml version=\"1.0\"?>\n";
+$void_xml = header( -type => 'text/plain' );
+$void_xml .= "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n";
$void_xml .= "<document type=\"freeswitch/xml\">\n";
$void_xml .= "<section name=\"result\">\n";
$void_xml .= "<result status=\"not found\" />";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-12 04:21:31
|
Revision: 2302
http://astpp.svn.sourceforge.net/astpp/?rev=2302&view=rev
Author: darrenkw
Date: 2010-02-12 04:21:23 +0000 (Fri, 12 Feb 2010)
Log Message:
-----------
Missed $void_xml opportunity.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-02-12 04:14:25 UTC (rev 2301)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-02-12 04:21:23 UTC (rev 2302)
@@ -167,6 +167,7 @@
if (!$routeinfo->{cost} && !$routeinfo->{pricelist}) {
$ASTPP->debug( debug => "COULD NOT FIND ROUTE. EXITING SO DIALPLAN CAN TAKE OVER" );
+ print $void_xml;
exit(0);
}
while ( $carddata->{reseller} && $maxlength > 1 && $callstatus == 1 ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-12 04:14:33
|
Revision: 2301
http://astpp.svn.sourceforge.net/astpp/?rev=2301&view=rev
Author: darrenkw
Date: 2010-02-12 04:14:25 +0000 (Fri, 12 Feb 2010)
Log Message:
-----------
Add a couple of missing perl modules.
Adjust the xml that is returned when a record is not found.
Modified Paths:
--------------
trunk/Makefile
trunk/freeswitch/astpp-fs-xml.pl
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-02-10 05:33:45 UTC (rev 2300)
+++ trunk/Makefile 2010-02-12 04:14:25 UTC (rev 2301)
@@ -138,6 +138,7 @@
perl -MCPAN -e "install DateTime::TimeZone";
perl -MCPAN -e "install DateTime";
perl -MCPAN -e "install Locale::gettext_pp";
+ perl -MCPAN -e "install XML::Simple";
cd modules/ASTPP && perl Makefile.PL && make && make install && cd ../../
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-02-10 05:33:45 UTC (rev 2300)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-02-12 04:14:25 UTC (rev 2301)
@@ -23,7 +23,7 @@
use strict;
use vars
- qw($cdr_db $params $ASTPP @output $config $freeswitch_db $astpp_db $verbosity );
+ qw($void_xml $cdr_db $params $ASTPP @output $config $freeswitch_db $astpp_db $verbosity );
use Locale::gettext_pp qw(:locale_h);
require "/usr/local/astpp/astpp-common.pl";
$ENV{LANGUAGE} = "en"; # de, es, br - whatever
@@ -35,6 +35,13 @@
$ASTPP = ASTPP->new;
$ASTPP->set_verbosity(4); #Tell ASTPP debugging how verbose we want to be.
+$void_xml = "<?xml version=\"1.0\"?>\n";
+$void_xml .= "<document type=\"freeswitch/xml\">\n";
+$void_xml .= "<section name=\"result\">\n";
+$void_xml .= "<result status=\"not found\" />";
+$void_xml .= "</section>\n";
+$void_xml .= "</document>\n";
+
sub initialize() {
$config = &load_config();
$astpp_db = &connect_db( $config, @output );
@@ -120,9 +127,8 @@
$xml .=
"<action application=\"reject\" data=\"CANNOT RETRIEVE ACCOUNT\"/>\n";
$xml = $ASTPP->fs_dialplan_xml_footer( xml => $xml );
-# print $xml;
$ASTPP->debug( debug => "Returning nothing so dialplan can continue." );
- print "";
+ print $void_xml;
exit(0);
}
@@ -248,8 +254,8 @@
$xml .= "</extension>\n";
$xml .= "</context>\n";
$xml .= "<context name=\"default\">\n";
- $xml .= "<extension name=\"" . $arg{destination_number} . "\">\n";
- $xml .= "<condition field=\"destination_number\" expression=\"" . $arg{destination_number} . "\">\n";
+ $xml .= "<extension name=\"" . $params->{'Caller-Destination-Number'} . "\">\n";
+ $xml .= "<condition field=\"destination_number\" expression=\"" . $params->{'Caller-Destination-Number'} . "\">\n";
$xml .= $returned_data;
} else {
@@ -304,9 +310,10 @@
#domain 192.168.2.119
#ip 192.168.2.119
+ my $user_count = 0;
if ($params->{'user'}) {
$xml = $ASTPP->fs_directory_xml_header( xml => $xml );
- $xml = $ASTPP->fs_directory_xml(
+ ($xml,$user_count) = $ASTPP->fs_directory_xml(
xml => $xml,
ip => $params->{'ip'},
user => $params->{'user'},
@@ -314,8 +321,14 @@
);
$xml = $ASTPP->fs_directory_xml_footer( xml => $xml );
}
+
$ASTPP->debug( debug => $xml );
- print $xml;
+ $ASTPP->debug( debug => $user_count );
+ if ($user_count > 0) {
+ print $xml;
+ } else {
+ print $void_xml;
+ }
} elsif ( $params->{cdr} ) {
print header( -type => 'text/plain' );
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2010-02-10 05:33:45 UTC (rev 2300)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2010-02-12 04:14:25 UTC (rev 2301)
@@ -773,9 +773,11 @@
{
my ($self, %arg) = @_;
my ($sql,$sql1,$tmp,$tmp1);
+ my $user_count = 0;
$arg{xml} .= "<domain name=\"" . $arg{domain} . "\">";
my @sip_users = &fs_list_sip_usernames($self,%arg);
foreach my $record (@sip_users) {
+ $user_count++;
$arg{xml} .= "<user id=\"" . $record->{username} . "\" mailbox=\"" . $record->{mailbox} . "\">\n";
$arg{xml} .= "<params>\n";
my @params = &fs_list_sip_params($self,$record->{id});
@@ -793,6 +795,7 @@
};
my @ip_users = &ip_address_authenticate($self,%arg);
foreach my $record (@ip_users) {
+ $user_count++;
# This is only temporary and should be removed
#
$record->{id} = 0;
@@ -815,7 +818,7 @@
$arg{xml} .= "</user>\n";
}
$arg{xml} .= "</domain>\n";
- return $arg{xml};
+ return ($arg{xml},$user_count);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-02-10 05:33:52
|
Revision: 2300
http://astpp.svn.sourceforge.net/astpp/?rev=2300&view=rev
Author: darrenkw
Date: 2010-02-10 05:33:45 +0000 (Wed, 10 Feb 2010)
Log Message:
-----------
Fixed DID support
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-01-13 01:30:42 UTC (rev 2299)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-02-10 05:33:45 UTC (rev 2300)
@@ -244,6 +244,14 @@
did => $params->{'Caller-Destination-Number'}
);
$xml .= $returned_data;
+ $xml .= "</condition>\n";
+ $xml .= "</extension>\n";
+ $xml .= "</context>\n";
+ $xml .= "<context name=\"default\">\n";
+ $xml .= "<extension name=\"" . $arg{destination_number} . "\">\n";
+ $xml .= "<condition field=\"destination_number\" expression=\"" . $arg{destination_number} . "\">\n";
+ $xml .= $returned_data;
+
} else {
# Get the list of routes for the phone number.
my @outboundroutes =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-01-13 01:30:49
|
Revision: 2299
http://astpp.svn.sourceforge.net/astpp/?rev=2299&view=rev
Author: darrenkw
Date: 2010-01-13 01:30:42 +0000 (Wed, 13 Jan 2010)
Log Message:
-----------
There was an error in the dialplan. Fixed it.
Modified Paths:
--------------
trunk/samples/sample.astpp-dialplan.conf
Modified: trunk/samples/sample.astpp-dialplan.conf
===================================================================
--- trunk/samples/sample.astpp-dialplan.conf 2009-11-01 00:42:37 UTC (rev 2298)
+++ trunk/samples/sample.astpp-dialplan.conf 2010-01-13 01:30:42 UTC (rev 2299)
@@ -122,13 +122,14 @@
exten => _X.,7,GotoIf($["${GROUP_COUNT(account)}" > "${MAXCHANNELS}"]?90)
exten => _X.,8,GotoIf($["${GROUP_COUNT(did)}" > "${DID_MAXCHANNELS}"]?90)
exten => _X.,9,SetAccount(${ACCOUNT}) ; this might be superflous
-exten => _X.,10,Set(CDR(accountcode)=${ACCOUNT},CDR(userfield)=ASTPP-DID)
-exten => _X.,11,Set(CDR(accountcode)=${ACCOUNT})
+exten => _X.,10,Set(CDR(accountcode)=${ACCOUNT})
+exten => _X.,11,Set(CDR(userfield)=ASTPP-DID)
exten => _X.,12,GotoIf($["${GOTO}" = "1"]?30) ; If this was done using the local channel or a direct number...
exten => _X.,13,Dial(${DIALSTRING}/${DID_DIAL_AS}||${TIMELIMIT}|${OPTIONS})
exten => _X.,14,Hangup
exten => _X.,30,ForkCDR()
-exten => _X.,31,Set(CDR(uniqueid)=${CDR(uniqueid)}a,CDR(userfield)=FORKED)
+exten => _X.,31,Set(CDR(uniqueid)=${CDR(uniqueid)}a)
+exten => _X.,n,Set(CDR(userfield)=FORKED)
exten => _X.,n,Goto(${GOTO_CONTEXT},${GOTO_EXTENSION},${GOTO_PRIORITY})
exten => _X.,n,Goto(100)
include => astpp-errors
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-11-01 00:42:48
|
Revision: 2297
http://astpp.svn.sourceforge.net/astpp/?rev=2297&view=rev
Author: darrenkw
Date: 2009-11-01 00:13:47 +0000 (Sun, 01 Nov 2009)
Log Message:
-----------
Fixed a problem preventing the regular expression from editing the accountcode.
Modified Paths:
--------------
trunk/scripts/astpp-common.pl
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2009-10-31 23:55:34 UTC (rev 2296)
+++ trunk/scripts/astpp-common.pl 2009-11-01 00:13:47 UTC (rev 2297)
@@ -4250,7 +4250,10 @@
$cdrinfo->{dst} = $did;
}
if ($config->{cdr_regex_accountcode}) {
- $cdrinfo->{accountcode} =~ $config->{cdr_regex_accountcode};
+ print STDERR "Modify Accountcode\n";
+ print STDERR "Original: " . $cdrinfo->{accountcode};
+ $cdrinfo->{accountcode} =~ s/$config->{cdr_regex_accountcode}//mg;
+ print STDERR "Modified: " . $cdrinfo->{accountcode};
}
my $carddata = &get_account( $astpp_db, $cdrinfo->{accountcode} );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-11-01 00:42:47
|
Revision: 2298
http://astpp.svn.sourceforge.net/astpp/?rev=2298&view=rev
Author: darrenkw
Date: 2009-11-01 00:42:37 +0000 (Sun, 01 Nov 2009)
Log Message:
-----------
Fixed a bug in the balance calculation code.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2009-11-01 00:13:47 UTC (rev 2297)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2009-11-01 00:42:37 UTC (rev 2298)
@@ -1433,9 +1433,11 @@
my ($self, %arg) = @_;
my ( $tmp, $sql, $row, $debit, $credit, $balance, $posted_balance );
$tmp = "SELECT SUM(cdrs.debit),SUM(cdrs.credit),accounts.balance "
- . " from cdrs,accounts WHERE cardnum = "
+ . " from cdrs,accounts WHERE cdrs.cardnum = "
. $self->{_astpp_db}->quote($arg{account})
- . " AND cdrs.status NOT IN(1,2)";
+ . " AND cdrs.status NOT IN(1,2)"
+ . " AND accounts.number = "
+ . $self->{_astpp_db}->quote($arg{account});
$sql =
$self->{_astpp_db}->prepare($tmp);
$sql->execute;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-31 23:55:41
|
Revision: 2296
http://astpp.svn.sourceforge.net/astpp/?rev=2296&view=rev
Author: darrenkw
Date: 2009-10-31 23:55:34 +0000 (Sat, 31 Oct 2009)
Log Message:
-----------
Fixed the problem with editing taxes from the gui. This is now working.
Modified Paths:
--------------
trunk/web_interface/astpp-admin.cgi
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2009-10-31 23:51:38 UTC (rev 2295)
+++ trunk/web_interface/astpp-admin.cgi 2009-10-31 23:55:34 UTC (rev 2296)
@@ -9607,7 +9607,7 @@
. " taxes_description = "
. $astpp_db->quote( $params->{taxes_description} ) . ","
. " last_modified = NOW() "
- . " WHERE id = "
+ . " WHERE taxes_id = "
. $astpp_db->quote( $params->{taxes_id} );
$ASTPP->debug( user => $param->{username}, debug => $tmp );
if ( $astpp_db->do($tmp) ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-31 23:51:51
|
Revision: 2295
http://astpp.svn.sourceforge.net/astpp/?rev=2295&view=rev
Author: darrenkw
Date: 2009-10-31 23:51:38 +0000 (Sat, 31 Oct 2009)
Log Message:
-----------
Add the first revision of the tax handling interface. Add support to perform regex commands on accountcodes prior to rating as per http://www.astpp.org/?q=node/261
Modified Paths:
--------------
trunk/scripts/astpp-common.pl
trunk/web_interface/astpp-admin.cgi
Added Paths:
-----------
trunk/templates/taxes.tpl
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2009-10-28 01:21:43 UTC (rev 2294)
+++ trunk/scripts/astpp-common.pl 2009-10-31 23:51:38 UTC (rev 2295)
@@ -4249,6 +4249,9 @@
$cdrinfo->{accountcode} = $record->{account};
$cdrinfo->{dst} = $did;
}
+ if ($config->{cdr_regex_accountcode}) {
+ $cdrinfo->{accountcode} =~ $config->{cdr_regex_accountcode};
+ }
my $carddata = &get_account( $astpp_db, $cdrinfo->{accountcode} );
if ($carddata->{number}) {
Added: trunk/templates/taxes.tpl
===================================================================
--- trunk/templates/taxes.tpl (rev 0)
+++ trunk/templates/taxes.tpl 2009-10-31 23:51:38 UTC (rev 2295)
@@ -0,0 +1,53 @@
+<table class="default">
+ <tr class="header">
+ <td colspan=10 align="center">Tax Details</td>
+<input name="mode" value="Taxes" type="hidden">
+ </tr>
+ <tr class="header">
+ <td>ID</td>
+ <td>Priority</td>
+ <td>Amount</td>
+ <td>Rate</td>
+ <td>Description</td>
+ <td>Modified</td>
+ <td>Created</td>
+ <td>Action</td>
+ </tr>
+ <tr class="header">
+ <td colspan=8 align="center">Add / Edit Item</td>
+ </tr>
+ <tr class="rowone">
+ <input name="taxes_id" value="<TMPL_VAR NAME="taxes_id">" type="hidden">
+ <td><TMPL_VAR NAME="taxes_id"></td>
+ <td><input name="taxes_priority" size="4" type="text" value="<TMPL_VAR NAME="taxes_priority">"></td>
+ <td><input name="taxes_amount" size="20" type="text" value="<TMPL_VAR NAME="taxes_amount">"></td>
+ <td><input name="taxes_rate" size="20" type="text" value="<TMPL_VAR NAME="taxes_rate">"></td>
+ <td><input name="taxes_description" size="50" type="text" value="<TMPL_VAR NAME="taxes_description">"></td>
+ <td><TMPL_VAR NAME="last_modified"></td>
+ <td><TMPL_VAR NAME="date_added"></td>
+ <td><TMPL_VAR NAME="action"></td>
+ </tr>
+ <tr class="header">
+ <td colspan=8>List</td>
+ </tr>
+ <TMPL_LOOP NAME="taxes_list">
+ <TR>
+ <TD><TMPL_VAR NAME="taxes_id"></TD>
+ <TD><TMPL_VAR NAME="taxes_priority"></TD>
+ <TD><TMPL_VAR NAME="taxes_amount"></TD>
+ <TD><TMPL_VAR NAME="taxes_rate"></TD>
+ <TD><TMPL_VAR NAME="taxes_description"></TD>
+ <TD><TMPL_VAR NAME="last_modified"></TD>
+ <TD><TMPL_VAR NAME="date_added"></TD>
+ <TD><a href="astpp-admin.cgi?mode=Taxes&action=Delete&taxes_id=<TMPL_VAR NAME="taxes_id">">Delete</a>
+ <a href="astpp-admin.cgi?mode=Taxes&action=Edit&taxes_id=<TMPL_VAR NAME="taxes_id">">Edit</a></TD>
+ </TR>
+ </TMPL_LOOP>
+</table>
+
+<table>
+ <tr>
+ <td><TMPL_VAR NAME="status"></td>
+ </tr>
+ </table>
+</form>
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2009-10-28 01:21:43 UTC (rev 2294)
+++ trunk/web_interface/astpp-admin.cgi 2009-10-31 23:51:38 UTC (rev 2295)
@@ -88,7 +88,7 @@
gettext("Outbound Routes"),
gettext("Import Outbound Routes")
);
-my @System = ( gettext("Purge Deactivated"), gettext("Configuration") );
+my @System = ( gettext("Purge Deactivated"), gettext("Configuration"), gettext("Taxes") );
my @Statistics = (
gettext("Asterisk Stats"), gettext("List Errors"),
gettext("Trunk stats"), gettext("View CDRs"),
@@ -478,6 +478,8 @@
if $params->{mode} eq gettext("Reseller Report");
return &build_admin_vendor_report()
if $params->{mode} eq gettext("Vendor Report");
+ return &build_taxes()
+ if $params->{mode} eq gettext("Taxes");
return gettext("Not Available!") . "\n";
}
@@ -9560,6 +9562,114 @@
return $template->output;
}
+
+sub build_taxes() {
+ my ( $action, @brands, $tmp, $template, @taxes_list );
+ $action = "<input name=\"action\" value=\"Add Item\" type=\"submit\">";
+ $template = HTML::Template->new(
+ filename => '/var/lib/astpp/templates/taxes.tpl',
+ die_on_bad_params => $config->{template_die_on_bad_params}
+ );
+
+ if ( !$params->{action} ) { $params->{action} = "List"; }
+
+ if ( $params->{action} eq "Edit" ) {
+ my ($tmp,$sql);
+ $tmp =
+ "SELECT * FROM taxes WHERE taxes_id = "
+ . $astpp_db->quote( $params->{taxes_id} );
+
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $sql = $astpp_db->prepare($tmp);
+ $sql->execute;
+ my $tax_item = $sql->fetchrow_hashref;
+ $sql->finish;
+
+ $action = "<input name=\"action\" value=\"Save Item\" type=\"submit\">";
+ $template->param(taxes_id => $tax_item->{taxes_id});
+ $template->param(taxes_priority => $tax_item->{taxes_priority});
+ $template->param(taxes_amount => $tax_item->{taxes_amount});
+ $template->param(taxes_rate => $tax_item->{taxes_rate});
+ $template->param(taxes_description => $tax_item->{taxes_description});
+ $template->param(last_modified => $tax_item->{last_modified});
+ $template->param(date_added => $tax_item->{date_added});
+
+ }
+ elsif ( $params->{action} eq "Save Item" ) {
+ $tmp =
+ "UPDATE taxes SET "
+ . " taxes_priority = "
+ . $astpp_db->quote( $params->{taxes_priority} ) . ","
+ . " taxes_amount = "
+ . $astpp_db->quote( $params->{taxes_amount} ) . ","
+ . " taxes_rate = "
+ . $astpp_db->quote( $params->{taxes_rate} ) . ","
+ . " taxes_description = "
+ . $astpp_db->quote( $params->{taxes_description} ) . ","
+ . " last_modified = NOW() "
+ . " WHERE id = "
+ . $astpp_db->quote( $params->{taxes_id} );
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ if ( $astpp_db->do($tmp) ) {
+ $status .= "Saved Tax!";
+ }
+ else {
+ $status .= "Failed to Save Tax!";
+ }
+ $params->{action} = "List";
+ }
+ elsif ( $params->{action} eq "Add Item" ) {
+ $tmp =
+ "INSERT INTO taxes (taxes_priority,taxes_amount,taxes_rate,taxes_description) VALUES ("
+ . $astpp_db->quote( $params->{taxes_priority} ) . ","
+ . $astpp_db->quote( $params->{taxes_amount} ) . ","
+ . $astpp_db->quote( $params->{taxes_rate} ) . ","
+ . $astpp_db->quote( $params->{taxes_description} ) . ")";
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ if ( $astpp_db->do($tmp) ) {
+ $status .= "Added Tax!";
+ }
+ else {
+ $status .= "Failed to Add Tax!";
+ }
+ $params->{action} = "List";
+ }
+ elsif ( $params->{action} eq "Delete" ) {
+ $tmp =
+ "DELETE FROM taxes WHERE taxes_id = "
+ . $astpp_db->quote( $params->{taxes_id} );
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ if ( $astpp_db->do($tmp) ) {
+ $status .= "Removed Tax!";
+ }
+ else {
+ $status .= "Failed to Remove Tax!";
+ }
+ $params->{action} = "List";
+ }
+ if ( $params->{action} eq "List" ) {
+ $tmp = "SELECT * FROM taxes ORDER BY taxes_priority,taxes_description";
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ my $sql = $astpp_db->prepare($tmp);
+ $sql->execute;
+ while ( my $record = $sql->fetchrow_hashref ) {
+ my %row;
+ $row{taxes_id} = $record->{taxes_id};
+ $row{taxes_priority} = $record->{taxes_priority};
+ $row{taxes_amount} = $record->{taxes_amount};
+ $row{taxes_amount} = $record->{taxes_rate};
+ $row{taxes_description} = $record->{taxes_description};
+ $row{last_modified} = $record->{last_modified};
+ $row{date_added} = $record->{date_added};
+ push( @taxes_list, \%row );
+ }
+ $sql->finish;
+ $template->param( taxes_list => \@taxes_list );
+ }
+ $template->param(action => $action );
+ return $template->output;
+}
+
sub build_configuration() {
my ( $action, @brands, @resellerlist, $tmp, $template, @configuration_list );
$action = "<input name=\"action\" value=\"Add Item\" type=\"submit\">";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-28 01:21:52
|
Revision: 2294
http://astpp.svn.sourceforge.net/astpp/?rev=2294&view=rev
Author: darrenkw
Date: 2009-10-28 01:21:43 +0000 (Wed, 28 Oct 2009)
Log Message:
-----------
Got the astpp-users script working again.
Modified Paths:
--------------
trunk/web_interface/astpp-users.cgi
Modified: trunk/web_interface/astpp-users.cgi
===================================================================
--- trunk/web_interface/astpp-users.cgi 2009-10-17 21:46:20 UTC (rev 2293)
+++ trunk/web_interface/astpp-users.cgi 2009-10-28 01:21:43 UTC (rev 2294)
@@ -176,11 +176,11 @@
my ( $body, $pstn, $voip );
if ( $params->{action} eq gettext("Place Call") ) {
my $out = new Asterisk::Outgoing;
- $out->setvariable( "Channel", "$channel" );
- $out->setvariable( "MaxRetries", "0" );
- $out->setvariable( "context", "$context" );
- $out->setvariable( "extension", "$extension" );
- $out->setvariable( "CallerID", "$outgoingclid $clidnumber" );
+# $out->setvariable( "Channel", "$channel" );
+# $out->setvariable( "MaxRetries", "0" );
+# $out->setvariable( "context", "$context" );
+# $out->setvariable( "extension", "$extension" );
+# $out->setvariable( "CallerID", "$outgoingclid $clidnumber" );
$out->setvariable( "Account", "$params->{username}" );
$out->outtime( time() + 15 );
$out->create_outgoing;
@@ -199,7 +199,7 @@
$body .= "<tr><td>"
. gettext("Destination:")
. "</td><td>"
- . textfield( -name => 'origin', -size => '15' )
+ . textfield( -name => 'destination', -size => '15' )
. "</td></tr>";
$body .= "<tr><td>"
. submit( -name => 'action', -value => gettext("Place Call") )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-17 21:46:29
|
Revision: 2293
http://astpp.svn.sourceforge.net/astpp/?rev=2293&view=rev
Author: darrenkw
Date: 2009-10-17 21:46:20 +0000 (Sat, 17 Oct 2009)
Log Message:
-----------
Add menus so that when you click the main menu in the interface it brings up sub menus in the window below rather than failing.
Modified Paths:
--------------
trunk/web_interface/astpp-admin.cgi
Added Paths:
-----------
trunk/templates/sub_menu.tpl
Added: trunk/templates/sub_menu.tpl
===================================================================
--- trunk/templates/sub_menu.tpl (rev 0)
+++ trunk/templates/sub_menu.tpl 2009-10-17 21:46:20 UTC (rev 2293)
@@ -0,0 +1,11 @@
+<div align="center">
+ <table width="100%" border="0">
+ <TR>
+ <TD align="center"> MENU </TD>
+ <TR>
+ <TMPL_LOOP NAME="menu">
+ <TR>
+ <TD align="center"><a href="astpp-admin.cgi?mode=<TMPL_VAR NAME="value">"> <TMPL_VAR NAME="value"> </a></TD>
+ </TR>
+ </TMPL_LOOP>
+</table>
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2009-10-17 20:41:31 UTC (rev 2292)
+++ trunk/web_interface/astpp-admin.cgi 2009-10-17 21:46:20 UTC (rev 2293)
@@ -322,6 +322,22 @@
return "";
}
+sub build_menu() {
+ my (@items) = @_;
+ my @menu_list;
+ my $template = HTML::Template->new(
+ filename => '/var/lib/astpp/templates/sub_menu.tpl',
+ die_on_bad_params => $config->{template_die_on_bad_params}
+ );
+ foreach my $tmp (@items) {
+ my %row;
+ $row{value} = $tmp;
+ push( @menu_list, \%row );
+ }
+ $template->param( menu => \@menu_list );
+ return $template->output;
+}
+
sub build_menu_ts() {
my ($selected) = @_;
my ( $tmp, $body, $x );
@@ -352,6 +368,28 @@
}
sub build_body() {
+ return &build_homepage()
+ if $params->{mode} eq gettext("Home Page")
+ || $params->{mode} eq gettext("Home")
+ || $params->{mode} eq ""
+ || $params->{mode} eq gettext("Login")
+ || $params->{mode} eq gettext("Logout");
+
+ # Make sure that the main menus are covered
+ return &build_menu(@Accounts) if $params->{mode} eq gettext("Accounts");
+ return &build_menu(@AdminReports) if $params->{mode} eq gettext("Admin Reports");
+ return &build_menu(@CallShops) if $params->{mode} eq gettext("Call Shops");
+ return &build_menu(@Callingcards) if $params->{mode} eq gettext("Calling Cards");
+ return &build_menu(@DIDs) if $params->{mode} eq gettext("DIDs");
+ return &build_menu(@LCR) if $params->{mode} eq gettext("LCR");
+ return &build_menu(@Rates) if $params->{mode} eq gettext("Rates");
+ return &build_menu(@Statistics) if $params->{mode} eq gettext("Statistics");
+ return &build_menu(@SwitchConfig) if $params->{mode} eq gettext("Switch Config");
+ return &build_menu(@System) if $params->{mode} eq gettext("System");
+ return &build_menu(@CallShops) if $params->{mode} eq gettext("CallShops");
+ return &build_menu(@Booths) if $params->{mode} eq gettext("Booths");
+
+ # Cover all the submenus
if ( $params->{logintype} == 2 ) { #Admin Login
return &build_providers() if $params->{mode} eq gettext("Providers");
return &build_trunks() if $params->{mode} eq gettext("Trunks");
@@ -379,8 +417,6 @@
return &build_account_info()
if $params->{mode} eq gettext("View Details");
return &build_list_accounts()
- if $params->{mode} eq gettext("Accounts");
- return &build_list_accounts()
if $params->{mode} eq gettext("List Accounts");
return &build_edit_account()
if $params->{mode} eq gettext("Edit Account");
@@ -443,12 +479,6 @@
return &build_admin_vendor_report()
if $params->{mode} eq gettext("Vendor Report");
- return &build_homepage()
- if $params->{mode} eq gettext("Home Page")
- || $params->{mode} eq gettext("Home")
- || $params->{mode} eq ""
- || $params->{mode} eq gettext("Login")
- || $params->{mode} eq gettext("Logout");
return gettext("Not Available!") . "\n";
}
elsif ( $params->{logintype} == 3 ) { #Vendor Login
@@ -479,8 +509,6 @@
if $params->{mode} eq gettext("Calc Charge");
return &build_dids()
if $params->{mode} eq gettext("Manage DIDs");
- return &build_dids()
- if $params->{mode} eq gettext("DIDs");
return &build_sip_devices()
if $params->{mode} eq gettext("Asterisk(TM) SIP Devices");
return &build_iax_devices()
@@ -556,14 +584,7 @@
return &build_counters()
if $params->{mode} eq gettext("Counters");
- return &build_homepage()
- if $params->{mode} eq gettext("Home Page")
- || $params->{mode} eq gettext("Home")
- || $params->{mode} eq ""
- || $params->{mode} eq gettext("Login")
- || $params->{mode} eq gettext("Logout");
return gettext("Not Available!") . "\n";
- return gettext("Not Available!") . "\n";
}
elsif ( $params->{logintype} == 5 ) { #Call Shop Login
return &build_pricelists() if $params->{mode} eq gettext("Pricelists");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-17 20:41:46
|
Revision: 2292
http://astpp.svn.sourceforge.net/astpp/?rev=2292&view=rev
Author: darrenkw
Date: 2009-10-17 20:41:31 +0000 (Sat, 17 Oct 2009)
Log Message:
-----------
Add the ability to edit the database configuration items from within the gui.
Modified Paths:
--------------
trunk/Makefile
trunk/freeswitch/astpp-callingcards.pl
trunk/templates/configuration-list.tpl
trunk/web_interface/astpp-admin.cgi
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-10-15 02:08:55 UTC (rev 2291)
+++ trunk/Makefile 2009-10-17 20:41:31 UTC (rev 2292)
@@ -65,7 +65,6 @@
install_samples:
install -m 644 -o $(OWNER) -g $(GROUP) ./samples/sample.astpp-config.conf $(DESTDIR)$(ASTPPDIR)/astpp-config.conf
- install -m 644 -o $(OWNER) -g $(GROUP) ./samples/sample.astpp-dialplan.conf $(DESTDIR)$(ASTERISKDIR)/astpp-dialplan.conf
install_php:
mkdir -p $(DESTDIR)$(WWWDIR)/html/astpp
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2009-10-15 02:08:55 UTC (rev 2291)
+++ trunk/freeswitch/astpp-callingcards.pl 2009-10-17 20:41:31 UTC (rev 2292)
@@ -228,7 +228,7 @@
);
}
elsif ( $cc == 1 ) {
- $balance = &accountbalance( $astpp_db, $cardinfo->{number} );
+ $balance = $ASTPP->accountbalance( $cardinfo->{number} );
$balance = ( $balance * -1 ) + ( $cardinfo->{credit_limit} );
$available = ( $balance - $numberinfo->{connectfee} ) / 100;
}
Modified: trunk/templates/configuration-list.tpl
===================================================================
--- trunk/templates/configuration-list.tpl 2009-10-15 02:08:55 UTC (rev 2291)
+++ trunk/templates/configuration-list.tpl 2009-10-17 20:41:31 UTC (rev 2292)
@@ -4,6 +4,7 @@
<input name="mode" value="Configuration" type="hidden">
</tr>
<tr class="header">
+ <td>ID</td>
<td>Reseller</td>
<td>Brand</td>
<td>Name</td>
@@ -12,28 +13,31 @@
<td>Action</td>
</tr>
<tr class="header">
- <td colspan=6>Add Item</td>
+ <td colspan=7 align="center">Add / Edit Item</td>
</tr>
<tr class="rowone">
+ <input name="id" value="<TMPL_VAR NAME="id">" type="hidden">
+ <td><TMPL_VAR NAME="id"></td>
<td><TMPL_VAR NAME="resellers"></td>
<td><TMPL_VAR NAME="brands"></td>
- <td><input name="name" size="20" type="text"></td>
- <td><input name="value" size="20" type="text"></td>
- <td><input name="comment" size="50" type="text"></td>
- <td><input name="action" value="Add Item" type="submit"></td>
+ <td><input name="name" size="20" type="text" value="<TMPL_VAR NAME="name">"></td>
+ <td><input name="value" size="20" type="text" value="<TMPL_VAR NAME="value">"></td>
+ <td><input name="comment" size="50" type="text" value="<TMPL_VAR NAME="comment">"></td>
+ <td><TMPL_VAR NAME="action"></td>
</tr>
<tr class="header">
- <td colspan=5>List</td>
+ <td colspan=7>List</td>
</tr>
<TMPL_LOOP NAME="configuration_list">
<TR>
+ <TD><TMPL_VAR NAME="id"></TD>
<TD><TMPL_VAR NAME="reseller"></TD>
<TD><TMPL_VAR NAME="brand"></TD>
<TD><TMPL_VAR NAME="name"></TD>
<TD><TMPL_VAR NAME="value"></TD>
<TD><TMPL_VAR NAME="comment"></TD>
- <TD><a href="astpp-admin.cgi?mode=Configuration&action=Delete&name=<TMPL_VAR NAME="name">&reseller=<TMPL_VAR NAME="Reseller">">Delete</a>
- <a href="astpp-admin.cgi?mode=Configuration&action=Edit&name=<TMPL_VAR NAME="name">&reseller=<TMPL_VAR NAME="Reseller">">Edit</a></TD>
+ <TD><a href="astpp-admin.cgi?mode=Configuration&action=Delete&id=<TMPL_VAR NAME="id">">Delete</a>
+ <a href="astpp-admin.cgi?mode=Configuration&action=Edit&id=<TMPL_VAR NAME="id">">Edit</a></TD>
</TR>
</TMPL_LOOP>
</table>
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2009-10-15 02:08:55 UTC (rev 2291)
+++ trunk/web_interface/astpp-admin.cgi 2009-10-17 20:41:31 UTC (rev 2292)
@@ -226,19 +226,19 @@
print header();
}
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-USER:") . " $params->{username}"
);
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-PASS:") . " $params->{password}"
);
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-AUTHCODE:") . " $config->{auth}"
);
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-USER-COUNT:") . " $count"
);
return ( $params->{mode}, $count );
@@ -286,19 +286,19 @@
$count = 0;
}
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-USER:") . " $params->{username}"
) if $config->{debug} == 1 && $params->{username};
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-PASS:") . " $params->{password}"
) if $config->{debug} == 1 && $params->{password};
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-AUTHCODE:") . " $config->{auth}"
) if $config->{debug} == 1;
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => gettext("ASTPP-USER-COUNT:") . " $count"
) if $config->{debug} == 1;
print header();
@@ -1024,7 +1024,7 @@
}
}
-# $where = 0 if $param->{$name} eq "" && $destination eq "" && $pattern eq "";
+# $where = 0 if $params->{$name} eq "" && $destination eq "" && $pattern eq "";
$body .=
start_form()
@@ -1074,7 +1074,7 @@
print STDERR $query ."\n" if $config->{debug} == 1;
$sth = $astpp_db->do($query)
|| return gettext("Something is wrong with astpp database") . "\n";
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $query " );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $query " );
my $sql =
$astpp_db->prepare("SELECT DISTINCT cardnum AS $name FROM $table");
@@ -1262,7 +1262,7 @@
. " and (dstchannel like '$row->{tech}/$row->{path}%'"
. " or lastdata like '" . $freeswitch_trunk . "'"
. "or dstchannel like '$row->{tech}\[$row->{path}\]%' ) ";
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $sql1 \n " );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $sql1 \n " );
my $sth1 = $cdr_db->prepare($sql1);
$sth1->execute();
my $ref1 = $sth1->fetchrow_hashref();
@@ -1275,7 +1275,7 @@
. " or lastdata like '" . $freeswitch_trunk . "'"
. " OR dstchannel like '$row->{tech}\[$row->{path}\]%' )";
my $sth2 = $cdr_db->prepare($sql2);
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $sql2" );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $sql2" );
$sth2->execute();
my $ref2 = $sth2->fetchrow_hashref();
$sth2->finish;
@@ -1287,7 +1287,7 @@
. " OR lastdata like '" . $freeswitch_trunk . "'"
. " OR dstchannel like '$row->{tech}\[$row->{path}\]%' )";
my $sth3 = $cdr_db->prepare($sql3);
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $sql3" );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $sql3" );
$sth3->execute();
my $ref3 = $sth3->fetchrow_hashref();
$sth3->finish;
@@ -1298,7 +1298,7 @@
. " or lastdata like '" . $freeswitch_trunk . "'"
. " OR dstchannel like '$row->{tech}\[$row->{path}\]%' )";
my $sth4 = $cdr_db->prepare($sql4);
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $sql4" );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $sql4" );
$sth4->execute();
my $ref4 = $sth4->fetchrow_hashref();
$sth4->finish;
@@ -1437,7 +1437,7 @@
. $cdr_db->quote($sd)
. " and calldate <= "
. $cdr_db->quote($ed);
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $tmp" );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $tmp" );
}
else {
$tmp =
@@ -1445,7 +1445,7 @@
. $cdr_db->quote($sd)
. " and calldate <= "
. $cdr_db->quote($ed);
- $ASTPP->debug( user => $param->{username}, debug => " SQL: $tmp" );
+ $ASTPP->debug( user => $params->{username}, debug => " SQL: $tmp" );
}
if ( $params->{accountcode} && $params->{logintype} == 2 ) {
$tmp .=
@@ -1457,7 +1457,7 @@
"SELECT * FROM trunks WHERE name = "
. $astpp_db->quote( $params->{trunk} )
. " LIMIT 1";
- $ASTPP->debug( user => $param->{username}, debug => $tmpsql );
+ $ASTPP->debug( user => $params->{username}, debug => $tmpsql );
$sql = $astpp_db->prepare($tmpsql);
$sql->execute
|| return gettext("Something is wrong with the trunks database")
@@ -1478,7 +1478,7 @@
. " or dstchannel like ". $astpp_db->quote($freeswitch_trunk)
. " or dstchannel like '$row->{tech}\[$row->{path}\]\%')";
}
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
$sql = $cdr_db->prepare($tmp);
$sql->execute;
$results = $sql->rows;
@@ -1618,7 +1618,7 @@
$accounts .= ",";
}
}
- $ASTPP->debug( user => $param->{username}, debug => $accounts );
+ $ASTPP->debug( user => $params->{username}, debug => $accounts );
$template->param(
customer_count => &count_accounts(
$astpp_db, "WHERE type = 0 AND reseller = '$params->{username}'"
@@ -1887,7 +1887,7 @@
. $astpp_db->quote($number) . ", "
. $astpp_db->quote( $params->{prefix} ) . ", "
. $astpp_db->quote( $params->{ipcontext} ) . ")";
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
if ( $astpp_db->do($tmp) ) {
$status .=
gettext("IP") . " '"
@@ -2296,7 +2296,7 @@
}
my $brandinfo = &get_cc_brand( $astpp_db, $params->{brand} );
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => "BRAND: $params->{brand}"
);
while ( $count < $params->{count} ) {
@@ -2682,7 +2682,7 @@
$tmp = "DELETE FROM callingcardbrands WHERE name = "
. $astpp_db->quote( $params->{name} );
}
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
if ( $astpp_db->do($tmp) ) {
$status .= gettext("Brand Deleted!");
}
@@ -2729,7 +2729,7 @@
. $astpp_db->quote( $params->{min_length_minutes} ) . ", "
. $astpp_db->quote( $params->{min_length_pennies} ) . ")";
}
- $ASTPP->debug( user => $param->{username}, debug => "sql" );
+ $ASTPP->debug( user => $params->{username}, debug => "sql" );
if ( $astpp_db->do($sql) ) {
$status .= gettext("Brand Added!");
}
@@ -2869,7 +2869,7 @@
. " WHERE name ="
. $astpp_db->quote( $params->{name} );
}
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
if ( $astpp_db->do($sql) ) {
$status .= gettext("Brand Updated!");
}
@@ -3033,7 +3033,7 @@
$tmp =
"SELECT name FROM callingcardbrands WHERE status < 2 AND (reseller IS NULL OR reseller = '')";
}
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
$sql = $astpp_db->prepare($tmp);
$sql->execute
|| return gettext(
@@ -3055,7 +3055,7 @@
$tmp =
"SELECT * FROM callingcardbrands WHERE status < 2 AND (reseller IS NULL OR reseller = '') ORDER BY name limit $params->{limit} , $results_per_page";
}
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
$sql = $astpp_db->prepare($tmp);
$sql->execute
|| return gettext(
@@ -3350,7 +3350,7 @@
. $astpp_db->quote( $cardinfo->{cardnumber} )
. " AND brand "
. $brandsql;
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
$astpp_db->do($sql) || print "$sql " . gettext("FAILED");
}
@@ -3361,7 +3361,7 @@
$cardinfo =
&get_callingcard( $astpp_db, $params->{cardnumber}, $config );
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => "CARDNUMBER: " . $cardinfo->{cardnumber}
);
&update_balance( $cardinfo, $params->{pennies} * 100 );
@@ -3553,7 +3553,7 @@
"SELECT * FROM callingcards WHERE status < 2 AND brand $brandsql ORDER BY id LIMIT "
. ( $pgr->get_first() - 1 ) . ", "
. $pgr->get_entries_on_this_page();
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
$sql = $astpp_db->prepare($sql);
$sql->execute;
@@ -4092,14 +4092,14 @@
mode => $params->{mode},
);
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
$results = $cdr_db->prepare($sql);
$results->execute;
while ( my $record = $results->fetchrow_hashref ) {
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => $record->{uniqueid}
);
$count++;
@@ -4121,7 +4121,7 @@
my (%stuff) = @_;
foreach ( keys %stuff ) {
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => "$_: " . $stuff{$_}
);
}
@@ -4836,7 +4836,7 @@
. $astpp_db->quote( $params->{desc} ) . ", "
. $astpp_db->quote( $params->{charge} ) . ", "
. $astpp_db->quote( $params->{sweep} ) . ", 1)";
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
if ( $astpp_db->do($sql) ) {
$status .= gettext("Periodic Charge Added!");
}
@@ -4971,7 +4971,7 @@
. $astpp_db->quote( $params->{sweep} )
. ", status = '1' WHERE id = "
. $astpp_db->quote( $params->{chargeid} );
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
if ( $astpp_db->do($sql) ) {
$status .= gettext("Periodic Charge Updated!");
}
@@ -4984,7 +4984,7 @@
elsif ( $params->{action} eq gettext("Delete...") ) {
my $sql = "DELETE FROM charges WHERE id = "
. $astpp_db->quote( $params->{chargeid} );
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
if ( $astpp_db->do($sql) ) {
$status .= gettext("Periodic Charge Deleted!");
}
@@ -4994,7 +4994,7 @@
}
$sql = "DELETE FROM charge_to_account WHERE charge_id = "
. $astpp_db->quote( $params->{chargeid} );
- $ASTPP->debug( user => $param->{username}, debug => $sql );
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
if ( $astpp_db->do($sql) ) {
$status .= gettext("Periodic Charge Deleted!");
}
@@ -5169,7 +5169,7 @@
my $uploaded = upload('rateimport');
my ( @data, $record );
while ( my $record = <$uploaded> ) {
- $ASTPP->debug( user => $param->{username}, debug => $record );
+ $ASTPP->debug( user => $params->{username}, debug => $record );
chomp;
push @data, $record;
}
@@ -5211,7 +5211,7 @@
. $astpp_db->quote( $columns[9] ) . ","
. $astpp_db->quote( $columns[1] ) . ", 1,"
. $astpp_db->quote( $columns[10] ) . ")";
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
if ( $astpp_db->do($tmp) ) {
$status .=
gettext("Pattern: ") . " '"
@@ -5303,7 +5303,7 @@
$uploaded = upload('rateimport');
my ( @data, $record );
while ( my $record = <$uploaded> ) {
- $ASTPP->debug( user => $param->{username}, debug => $record );
+ $ASTPP->debug( user => $params->{username}, debug => $record );
chomp;
push @data, $record;
}
@@ -5335,7 +5335,7 @@
. " AND pricelist = "
. $astpp_db->quote( $resellerdata->{pricelist} )
. " LIMIT 1";
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
my $sql = $astpp_db->prepare($tmp);
my ($routeinfo,$row);
$sql->execute;
@@ -5530,7 +5530,7 @@
. $astpp_db->quote( $columns[13] ) . ","
. $astpp_db->quote( $columns[14] ) . ","
. $astpp_db->quote( $columns[15] ) . ")";
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
if ( $astpp_db->do($tmp) ) {
$status .=
gettext("DID: ") . " '"
@@ -5560,7 +5560,7 @@
gettext("The old pattern for") . " '"
. $params->{number} . "' "
. gettext("FAILED to remove!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
$tmp =
"INSERT INTO routes (pattern,comment,pricelist,connectcost,includedseconds,cost) VALUES ("
@@ -5853,7 +5853,7 @@
gettext("Pricelist: ")
. $params->{name}
. gettext(" Failed to Reactivate!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
}
else {
@@ -5891,7 +5891,7 @@
gettext("Pricelist: ")
. $params->{name}
. gettext(" Failed to Add!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
}
$params->{action} = gettext("Information...");
@@ -5933,7 +5933,7 @@
gettext("Pricelist: ")
. $params->{name}
. gettext(" Failed to Update!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
}
else {
@@ -5971,7 +5971,7 @@
gettext("Pricelist: ")
. $params->{name}
. gettext(" Failed to Deactivate!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
}
$params->{action} = gettext("Information...");
@@ -6038,7 +6038,7 @@
$tmp =
"SELECT * FROM pricelists WHERE status < 2 AND reseller IS NULL";
}
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
$sql = $astpp_db->prepare($tmp);
$sql->execute
|| return gettext("Something is wrong with the ASTPP database!")
@@ -6060,7 +6060,7 @@
$tmp =
"SELECT * FROM pricelists WHERE status < 2 AND reseller IS NULL ORDER BY name limit $params->{limit} , $results_per_page";
}
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
$sql = $astpp_db->prepare($tmp);
$sql->execute
|| return gettext("Something is wrong with the ASTPP database!")
@@ -6433,7 +6433,7 @@
gettext("DID") . " '"
. $params->{number} . "' "
. gettext("FAILED to create!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
$tmp =
"DELETE FROM routes WHERE pattern = "
@@ -6451,7 +6451,7 @@
gettext("The old pattern for") . " '"
. $params->{number} . "' "
. gettext("FAILED to remove!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
$tmp =
"INSERT INTO routes (pattern,comment,pricelist,connectcost,includedseconds,cost,inc,reseller) VALUES ("
@@ -6465,7 +6465,7 @@
. $astpp_db->quote( $params->{included} ) . ","
. $astpp_db->quote( $params->{cost} ) . ","
. $astpp_db->quote( $params->{inc} ) . ",'')";
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
if ( $astpp_db->do($tmp) ) {
$status .=
gettext("Pattern") . " '"
@@ -6477,7 +6477,7 @@
gettext("Pattern") . " '"
. $params->{number} . "' "
. gettext("FAILED to create!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
$params->{action} = gettext("Information...");
}
@@ -6534,7 +6534,7 @@
gettext("DID") . " '"
. $params->{number} . "' "
. gettext("FAILED to update!");
- $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $ASTPP->debug( user => $params->{username}, debug => $tmp );
}
$tmp =
"UPDATE routes SET"
@@ -9540,42 +9540,103 @@
}
sub build_configuration() {
- my ( @brands, @resellerlist, $tmp, $template, @configuration_list );
+ my ( $action, @brands, @resellerlist, $tmp, $template, @configuration_list );
+ $action = "<input name=\"action\" value=\"Add Item\" type=\"submit\">";
$template = HTML::Template->new(
filename => '/var/lib/astpp/templates/configuration-list.tpl',
die_on_bad_params => $config->{template_die_on_bad_params}
);
if ( $params->{logintype} == 1 ) {
- push( @resellerlist, $params->{username} );
+ unshift( @resellerlist, $params->{username} );
}
else {
@resellerlist = &list_resellers($astpp_db);
- push( @resellerlist, "" );
+ unshift( @resellerlist, "" );
}
- $template->param(
- resellers => popup_menu(
- -name => "resellers",
- -values => \@resellerlist
- )
- );
if ( $params->{logintype} == 1 || $params->{logintype} == 5 ) {
@brands = &list_cc_brands_reseller( $astpp_db, $params->{username} );
- push( @brands, "" );
+ unshift( @brands, "" );
}
else {
@brands = &list_cc_brands($astpp_db);
- push( @brands, "" );
+ unshift( @brands, "" );
}
+
+
+ if ( !$params->{action} ) { $params->{action} = "List"; }
+ if ( $params->{action} eq "Edit" ) {
+ my ($tmp,$sql);
+ if ( $params->{logintype} == 1 ) {
+ $tmp =
+ "SELECT * FROM system WHERE reseller = "
+ . $astpp_db->quote( $params->{username} )
+ . " AND id = "
+ . $astpp_db->quote( $params->{id} );
+ } else {
+ $tmp =
+ "SELECT * FROM system WHERE id = "
+ . $astpp_db->quote( $params->{id} );
+
+ }
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ $sql = $astpp_db->prepare($tmp);
+ $sql->execute;
+ my $config_item = $sql->fetchrow_hashref;
+ $sql->finish;
+
+ $action = "<input name=\"action\" value=\"Save Item\" type=\"submit\">";
+ $template->param(id => $config_item->{id});
+ $template->param(name => $config_item->{name});
+ $template->param(value => $config_item->{value});
+ $template->param(comment => $config_item->{comment});
$template->param(
brands => popup_menu(
-name => "brands",
- -values => \@brands
+ -values => \@brands,
+ -default => $config_item->{brand}
)
);
+ $template->param(
+ resellers => popup_menu(
+ -name => "resellers",
+ -values => \@resellerlist,
+ -default => $config_item->{reseller}
+ )
+ );
- if ( !$params->{action} ) { $params->{action} = "List"; }
- if ( $params->{action} eq "Edit" ) {
+
}
+ elsif ( $params->{action} eq "Save Item" ) {
+ if ( $params->{logintype} == 1 ) {
+ $params->{reseller} = $params->{username};
+ }
+ $tmp =
+ "UPDATE system SET "
+ . " reseller = "
+ . $astpp_db->quote( $params->{reseller} ) . ","
+ . " brand = "
+ . $astpp_db->quote( $params->{brand} ) . ","
+ . " name = "
+ . $astpp_db->quote( $params->{name} ) . ","
+ . " value = "
+ . $astpp_db->quote( $params->{value} ) . ","
+ . " comment = "
+ . $astpp_db->quote( $params->{comment} )
+ . " WHERE id = "
+ . $astpp_db->quote( $params->{id} );
+ if ($params->{resller}) {
+ $tmp .= " AND reseller = "
+ . $astpp_db->quote( $params->{reseller} );
+ }
+ $ASTPP->debug( user => $param->{username}, debug => $tmp );
+ if ( $astpp_db->do($tmp) ) {
+ $status .= "Saved Configuration Item!";
+ }
+ else {
+ $status .= "Failed to Save Configuration Item!";
+ }
+ $params->{action} = "List";
+ }
elsif ( $params->{action} eq "Add Item" ) {
if ( $params->{logintype} == 1 ) {
$params->{reseller} = $params->{username};
@@ -9600,23 +9661,23 @@
if ( $params->{logintype} == 2 ) {
if ( $params->{reseller} ne "" ) {
$tmp =
- "DELETE FROM system WHERE name = "
- . $astpp_db->quote( $params->{name} )
+ "DELETE FROM system WHERE id = "
+ . $astpp_db->quote( $params->{id} )
. " AND reseller = "
. $astpp_db->quote( $params->{reseller} )
. " LIMIT 1";
}
else {
$tmp =
- "DELETE FROM system WHERE name = "
- . $astpp_db->quote( $params->{name} )
+ "DELETE FROM system WHERE id = "
+ . $astpp_db->quote( $params->{id} )
. " AND reseller IS NULL LIMIT 1";
}
}
elsif ( $params->{logintype} == 1 ) {
$tmp =
- "DELETE FROM system WHERE name = "
- . $astpp_db->quote( $params->{name} )
+ "DELETE FROM system WHERE id = "
+ . $astpp_db->quote( $params->{id} )
. " AND reseller = "
. $astpp_db->quote( $params->{username} )
. " LIMIT 1";
@@ -9631,6 +9692,18 @@
$params->{action} = "List";
}
if ( $params->{action} eq "List" ) {
+ $template->param(
+ brands => popup_menu(
+ -name => "brands",
+ -values => \@brands
+ )
+ );
+ $template->param(
+ resellers => popup_menu(
+ -name => "resellers",
+ -values => \@resellerlist
+ )
+ );
if ( $params->{logintype} == 2 ) {
$tmp = "SELECT * FROM system ORDER BY reseller,name";
}
@@ -9651,11 +9724,13 @@
$row{value} = $record->{value};
$row{comment} = $record->{comment};
$row{timestamp} = $record->{timestamp};
+ $row{id} = $record->{id};
push( @configuration_list, \%row );
}
$sql->finish;
$template->param( configuration_list => \@configuration_list );
}
+ $template->param(action => $action );
return $template->output;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-15 02:09:11
|
Revision: 2291
http://astpp.svn.sourceforge.net/astpp/?rev=2291&view=rev
Author: darrenkw
Date: 2009-10-15 02:08:55 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
Add gettext_pp.
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-10-14 01:32:06 UTC (rev 2290)
+++ trunk/Makefile 2009-10-15 02:08:55 UTC (rev 2291)
@@ -138,6 +138,7 @@
perl -MCPAN -e "install HTML::Template::Expr";
perl -MCPAN -e "install DateTime::TimeZone";
perl -MCPAN -e "install DateTime";
+ perl -MCPAN -e "install Locale::gettext_pp";
cd modules/ASTPP && perl Makefile.PL && make && make install && cd ../../
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-14 01:32:14
|
Revision: 2290
http://astpp.svn.sourceforge.net/astpp/?rev=2290&view=rev
Author: darrenkw
Date: 2009-10-14 01:32:06 +0000 (Wed, 14 Oct 2009)
Log Message:
-----------
Fixed error preventing astpp-admin.cgi from running as "strict".
Modified Paths:
--------------
trunk/web_interface/astpp-admin.cgi
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2009-10-14 01:31:18 UTC (rev 2289)
+++ trunk/web_interface/astpp-admin.cgi 2009-10-14 01:32:06 UTC (rev 2290)
@@ -11755,7 +11755,7 @@
foreach my $param ( param() ) {
$params->{$param} = param($param);
$ASTPP->debug(
- user => $param->{username},
+ user => $params->{username},
debug => "$param $params->{$param}"
);
$log_call .= "$param=$params->{$param},";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2009-10-14 01:31:25
|
Revision: 2289
http://astpp.svn.sourceforge.net/astpp/?rev=2289&view=rev
Author: darrenkw
Date: 2009-10-14 01:31:18 +0000 (Wed, 14 Oct 2009)
Log Message:
-----------
Fixed a missing command that would cause account balances to not be calculated.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2009-10-09 14:59:42 UTC (rev 2288)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2009-10-14 01:31:18 UTC (rev 2289)
@@ -1436,6 +1436,8 @@
. " from cdrs,accounts WHERE cardnum = "
. $self->{_astpp_db}->quote($arg{account})
. " AND cdrs.status NOT IN(1,2)";
+ $sql =
+ $self->{_astpp_db}->prepare($tmp);
$sql->execute;
$row = $sql->fetchrow_hashref;
$credit = $row->{"SUM(cdrs.credit)"};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|