Module: sip-router
Branch: master
Commit: 9d720b83c9dd27e927627132ec052b15efeba518
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d720b8…
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
---
etc/kamailio.cfg | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index b30639e..12bd155 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -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)