Module: sip-router
Branch: master
Commit: fe24ed17b0620bd9446d741ea3f65b7b0cb8b765
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fe24ed1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Aug 21 11:20:07 2013 +0200
kamailio.cfg: use is_first_hop() for adding alias parameter to contact uri
- done for natted devices
---
etc/kamailio.cfg | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index c8ac439..b800e4b 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -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