[Freeswitch-svn] [commit] r10522 - in freeswitch/trunk/scripts/contrib/intralanman/C/lcr: mod_lcr sql
FreeSWITCH SVN
intralanman at freeswitch.org
Sun Nov 23 18:55:32 PST 2008
Author: intralanman
Date: Sun Nov 23 21:55:29 2008
New Revision: 10522
Log:
adding enabled flag for disabling single routes (might add one to carriers table and/or carrier_gateway later)
Modified:
freeswitch/trunk/scripts/contrib/intralanman/C/lcr/mod_lcr/mod_lcr.c
freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/mysql-5.0.sql
freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/postgres-8.3.sql
Modified: freeswitch/trunk/scripts/contrib/intralanman/C/lcr/mod_lcr/mod_lcr.c
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/C/lcr/mod_lcr/mod_lcr.c (original)
+++ freeswitch/trunk/scripts/contrib/intralanman/C/lcr/mod_lcr/mod_lcr.c Sun Nov 23 21:55:29 2008
@@ -289,7 +289,7 @@
digits_copy[n] = '\0';
sql_stream.write_function(&sql_stream, "%s%s", (n==digit_len ? "" : ", "), digits_copy);
}
- sql_stream.write_function(&sql_stream, ") AND CURRENT_TIMESTAMP BETWEEN date_start AND date_end ");
+ sql_stream.write_function(&sql_stream, ") AND CURRENT_TIMESTAMP BETWEEN date_start AND date_end AND enabled='1' ");
if(lcr_profile > 0) {
sql_stream.write_function(&sql_stream, "AND lcr_profile=%d ", lcr_profile);
}
Modified: freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/mysql-5.0.sql
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/mysql-5.0.sql (original)
+++ freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/mysql-5.0.sql Sun Nov 23 21:55:29 2008
@@ -30,10 +30,11 @@
`prefix` varchar(16) NOT NULL,
`suffix` varchar(16) NOT NULL,
`lcr_profile` varchar(32) default NULL,
- `date_start` datetime NOT NULL,
- `date_end` datetime NOT NULL,
+ `date_start` datetime NOT NULL DEFAULT '1970-01-01',
+ `date_end` datetime NOT NULL DEFAULT '2030-12-31',
`quality` float(10,6) NOT NULL,
`reliability` float(10,6) NOT NULL,
+ `enabled` boolean NOT NULL DEFAULT '1';
PRIMARY KEY (`id`),
KEY `carrier_id` (`carrier_id`),
KEY `digits` (`digits`),
Modified: freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/postgres-8.3.sql
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/postgres-8.3.sql (original)
+++ freeswitch/trunk/scripts/contrib/intralanman/C/lcr/sql/postgres-8.3.sql Sun Nov 23 21:55:29 2008
@@ -46,10 +46,11 @@
prefix VARCHAR(16) NOT NULL DEFAULT '',
suffix VARCHAR(16) NOT NULL DEFAULT '',
lcr_profile INTEGER NOT NULL DEFAULT 0,
- date_start timestamp with time zone NOT NULL,
- date_end timestamp with time zone NOT NULL,
+ date_start timestamp with time zone NOT NULL DEFAULT '1970-01-01',
+ date_end timestamp with time zone NOT NULL DEFAULT '2030-12-31',
quality numeric(10,6) NOT NULL DEFAULT 0,
reliability numeric(10,6) NOT NULL DEFAULT 0,
+ enabled boolean NOT NULL DEFAULT 'true',
CONSTRAINT lcr_pkey PRIMARY KEY (id)
);
More information about the Freeswitch-svn
mailing list