Преглед на файлове

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
Daniel-Constantin Mierla преди 14 години
родител
ревизия
195ab47e1d
променени са 1 файла, в които са добавени 10 реда и са изтрити 2 реда
  1. 10 2
      etc/kamailio.cfg

+ 10 - 2
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;