kamailio.cfg: use add_contact_alias()/handle_uri_alias() for NATed calls
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 29 Jun 2012 14:06:42 +0000 (16:06 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 29 Jun 2012 14:06:42 +0000 (16:06 +0200)
etc/kamailio.cfg

index b30639e..12bd155 100644 (file)
@@ -571,6 +571,7 @@ route[WITHINDLG] {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
+                       route(DLGURI);
                        if (is_method("BYE")) {
                                setflag(FLT_ACC); # do accounting ...
                                setflag(FLT_ACCFAILED); # ... even if the transaction fails
@@ -738,7 +739,7 @@ route[NATDETECT] {
                if (is_method("REGISTER")) {
                        fix_nated_register();
                } else {
-                       fix_nated_contact();
+                       add_contact_alias();
                }
                setflag(FLT_NATS);
        }
@@ -768,13 +769,23 @@ route[NATMANAGE] {
        }
        if (is_reply()) {
                if(isbflagset(FLB_NATB)) {
-                       fix_nated_contact();
+                       add_contact_alias();
                }
        }
 #!endif
        return;
 }
 
+# URI update for dialog requests
+route[DLGURI] {
+#!ifdef WITH_NAT
+       if(!isdsturiset()) {
+               handle_ruri_alias();
+       }
+#!endif
+       return;
+}
+
 # Routing to foreign domains
 route[SIPOUT] {
        if (!uri==myself)