Module: sems Branch: master Commit: 11c5b725de62035bd5a8585878b84137baf57d52 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=11c5b725de62035bd5a8585878b84137baf57d52
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Tue May 13 11:30:35 2014 +0200 sbc: b/f: lower case before searching in message filter --- apps/sbc/SBCCallLeg.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/apps/sbc/SBCCallLeg.cpp b/apps/sbc/SBCCallLeg.cpp index 4a9d83b..eabf22d 100644 --- a/apps/sbc/SBCCallLeg.cpp +++ b/apps/sbc/SBCCallLeg.cpp @@ -516,8 +516,11 @@ void SBCCallLeg::onSipRequest(const AmSipRequest& req) { it != call_profile.messagefilter.end(); it++) { if (isActiveFilter(it->filter_type)) { + string method = req.method; + std::transform(method.begin(), method.end(), method.begin(), ::tolower); + bool is_filtered = (it->filter_type == Whitelist) ^ - (it->filter_list.find(req.method) != it->filter_list.end()); + (it->filter_list.find(method) != it->filter_list.end()); if (is_filtered) { DBG("replying 405 to filtered message '%s'\n", req.method.c_str()); dlg->reply(req, 405, "Method Not Allowed", NULL, "", SIP_FLAGS_VERBATIM); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
