Module: sip-router
Branch: master
Commit: 2d9a8454fe6f5874973fceb1751d2ec1fad2bb07
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2d9a845…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Sep 6 22:34:36 2010 +0200
kamailio.cfg: alias_db lookup enabled by define
- replaced the alias_db related comments with defines
- lookup in db-aliases can be enabled now by #!define WITH_ALIASDB
---
etc/kamailio.cfg | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 5bff832..c74a7d4 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -47,6 +47,10 @@
# - set the value of pstn.gw_ip
# - check route[PSTN] for regexp routing condition
#
+# *** To enable database aliases lookup execute:
+# - enable mysql
+# - define WITH_ALIASDB
+#
# *** To enhance accounting execute:
# - enable mysql
# - define WITH_ACCDB
@@ -160,9 +164,11 @@ loadmodule "auth_db.so"
loadmodule "permissions.so"
#!endif
#!endif
-/* uncomment next line for aliases support
- NOTE: a DB (like db_mysql) module must be also loaded */
-#loadmodule "alias_db.so"
+
+#!ifdef WITH_ALIASDB
+loadmodule "alias_db.so"
+#!endif
+
/* uncomment next line for multi-domain support
NOTE: a DB (like db_mysql) module must be also loaded
NOTE: be sure and enable multi-domain support in all used modules
@@ -262,10 +268,9 @@ modparam("permissions", "db_mode", 1)
#!endif
# ----- alias_db params -----
-/* uncomment the following lines if you want to enable the DB based
- aliases */
-#modparam("alias_db", "db_url", DBURL)
-
+#!ifdef WITH_ALIASDB
+modparam("alias_db", "db_url", DBURL)
+#!endif
# ----- domain params -----
/* uncomment the following lines to enable multi-domain detection
@@ -460,8 +465,11 @@ route[REGISTRAR] {
# USER location service
route[LOCATION] {
- # apply DB based aliases (uncomment to enable)
- ##alias_db_lookup("dbaliases");
+
+#!ifdef WITH_ALIASDB
+ # search in DB-based aliases
+ alias_db_lookup("dbaliases");
+#!endif
if (!lookup("location")) {
switch ($rc) {