kamailio.cfg: use is_first_hop() for adding alias parameter to contact uri
authorDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 21 Aug 2013 09:20:07 +0000 (11:20 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 21 Aug 2013 09:20:07 +0000 (11:20 +0200)
- done for natted devices

etc/kamailio.cfg

index c8ac439..b800e4b 100644 (file)
@@ -757,7 +757,8 @@ route[NATDETECT] {
                if (is_method("REGISTER")) {
                        fix_nated_register();
                } else {
-                       add_contact_alias();
+                       if(is_first_hop())
+                               add_contact_alias();
                }
                setflag(FLT_NATS);
        }
@@ -789,7 +790,8 @@ route[NATMANAGE] {
        }
        if (is_reply()) {
                if(isbflagset(FLB_NATB)) {
-                       add_contact_alias();
+                       if(is_first_hop())
+                               add_contact_alias();
                }
        }
 #!endif