Module: sems Branch: master Commit: fbfc347f1a2fb5907b08116b643fe005124ce5ea URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=fbfc347f1a2fb5907b08116b643fe005124ce5ea
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Wed Feb 16 12:10:00 2011 +0100 b/f: outbound_proxy would only work if forced. --- core/AmSipDialog.cpp | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index 43ea252..bbdf299 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -613,19 +613,22 @@ void AmSipDialog::resetOutboundIf() outbound_interface = -1; } -string AmSipDialog::getRoute() { +string AmSipDialog::getRoute() +{ string res; - if(!route.empty() || (force_outbound_proxy && !outbound_proxy.empty())) { - res = SIP_HDR_COLSP(SIP_HDR_ROUTE); + if(!outbound_proxy.empty() && (force_outbound_proxy || remote_tag.empty())){ + res += "<" + outbound_proxy + ";lr>"; - if(force_outbound_proxy && !outbound_proxy.empty()) - res += "<" + outbound_proxy + ";lr>, "; + if(!route.empty()) { + res += ","; + } + } - if (!route.empty()) - res += route; + res += route; - route += CRLF; + if(!res.empty()) { + res = SIP_HDR_COLSP(SIP_HDR_ROUTE) + res + CRLF; } return res; _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
