Module: sip-router
Branch: 3.3
Commit: 80e5d5689963ab01a9ab3b3ba7d39f08df59b213
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=80e5d56…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Jun 29 16:06:42 2012 +0200
kamailio.cfg: use add_contact_alias()/handle_uri_alias() for NATed calls
(cherry picked from commit 9d720b83c9dd27e927627132ec052b15efeba518)
---
etc/kamailio.cfg | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index f8b375c..e6f20dc 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -569,6 +569,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
@@ -736,7 +737,7 @@ route[NATDETECT] {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
- fix_nated_contact();
+ add_contact_alias();
}
setflag(FLT_NATS);
}
@@ -766,13 +767,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)