[sr-dev] git:master: kamailio.cfg: check if uri is still myself after aliases and speed dial

Daniel-Constantin Mierla miconda at gmail.com
Sat Sep 24 10:51:06 CEST 2011


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sat Sep 24 10:49:22 2011 +0200

kamailio.cfg: check if uri is still myself after aliases and speed dial

- new uri can point to other voip domains
- set tcp connection lifetime and max expires registrations to cope with
  UA behind NAT using TCP

---

 etc/kamailio.cfg |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 342c99a..94a9bc0 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -163,6 +163,10 @@ port=5060
 enable_tls=yes
 #!endif
 
+# life time of TCP connection when there is no traffic
+# - a bit higher than registration expires to cope with UA behind NAT
+tcp_connection_lifetime=3605
+
 ####### Custom Parameters #########
 
 # These parameters can be modified runtime via RPC interface
@@ -297,6 +301,8 @@ modparam("registrar", "method_filtering", 1)
 # modparam("registrar", "append_branches", 0)
 /* uncomment the next line not to allow more than 10 contacts per AOR */
 #modparam("registrar", "max_contacts", 10)
+# max value for expires of registrations
+modparam("registrar", "max_expires", 3600)
 
 
 # ----- acc params -----
@@ -613,12 +619,14 @@ route[LOCATION] {
 #!ifdef WITH_SPEEDIAL
 	# search for short dialing - 2-digit extension
 	if($rU=~"^[0-9][0-9]$")
-		sd_lookup("speed_dial");
+		if(sd_lookup("speed_dial"))
+			route(SIPOUT);
 #!endif
 
 #!ifdef WITH_ALIASDB
 	# search in DB-based aliases
-	alias_db_lookup("dbaliases");
+	if(alias_db_lookup("dbaliases"))
+		route(SIPOUT);
 #!endif
 
 	$avp(oexten) = $rU;




More information about the sr-dev mailing list