[sr-dev] git:master: kamialio.cfg: sample usage of speed dialing

Daniel-Constantin Mierla miconda at gmail.com
Mon May 30 14:21:57 CEST 2011


Module: sip-router
Branch: master
Commit: 7b5d3d76369640ac88872910dd76e61de05ec1e4
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7b5d3d76369640ac88872910dd76e61de05ec1e4

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon May 30 14:20:39 2011 +0200

kamialio.cfg: sample usage of speed dialing

- can be enabled by define WITH_SPEEDDIAL

---

 etc/kamailio.cfg |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 3ee11e4..342c99a 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -51,6 +51,10 @@
 #     - enable mysql
 #     - define WITH_ALIASDB
 #
+# *** To enable speed dial lookup execute:
+#     - enable mysql
+#     - define WITH_SPEEDDIAL
+#
 # *** To enable multi-domain support execute:
 #     - enable mysql
 #     - define WITH_MULTIDOMAIN
@@ -229,6 +233,10 @@ loadmodule "permissions.so"
 loadmodule "alias_db.so"
 #!endif
 
+#!ifdef WITH_SPEEDDIAL
+loadmodule "speeddial.so"
+#!endif
+
 #!ifdef WITH_MULTIDOMAIN
 loadmodule "domain.so"
 #!endif
@@ -349,6 +357,13 @@ modparam("alias_db", "use_domain", MULTIDOMAIN)
 #!endif
 
 
+# ----- speedial params -----
+#!ifdef WITH_SPEEDDIAL
+modparam("speeddial", "db_url", DBURL)
+modparam("speeddial", "use_domain", MULTIDOMAIN)
+#!endif
+
+
 # ----- domain params -----
 #!ifdef WITH_MULTIDOMAIN
 modparam("domain", "db_url", DBURL)
@@ -595,6 +610,12 @@ route[REGISTRAR] {
 # USER location service
 route[LOCATION] {
 
+#!ifdef WITH_SPEEDIAL
+	# search for short dialing - 2-digit extension
+	if($rU=~"^[0-9][0-9]$")
+		sd_lookup("speed_dial");
+#!endif
+
 #!ifdef WITH_ALIASDB
 	# search in DB-based aliases
 	alias_db_lookup("dbaliases");




More information about the sr-dev mailing list