Module: sems Branch: master Commit: 0b6d1205fcc28ab3b316e537a03d39ecaceab20e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=0b6d1205fcc28ab3b316e537a03d39ecaceab20e
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Tue Aug 19 12:49:26 2014 +0200 b/f: uac_auth: fix b06f2b1080: use SIP_FLAGS_NOCONTACT if Contact-hf present --- core/plug-in/uac_auth/UACAuth.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/core/plug-in/uac_auth/UACAuth.cpp b/core/plug-in/uac_auth/UACAuth.cpp index c37fd28..c322506 100644 --- a/core/plug-in/uac_auth/UACAuth.cpp +++ b/core/plug-in/uac_auth/UACAuth.cpp @@ -226,10 +226,16 @@ bool UACAuth::onSipReply(const AmSipRequest& req, const AmSipReply& reply, } + int flags = SIP_FLAGS_VERBATIM | SIP_FLAGS_NOAUTH; + size_t skip = 0, pos1, pos2, hdr_start; + if (findHeader(hdrs, SIP_HDR_CONTACT, skip, pos1, pos2, hdr_start) || + findHeader(hdrs, "m", skip, pos1, pos2, hdr_start)) + flags |= SIP_FLAGS_NOCONTACT; + // resend request if (dlg->sendRequest(ri->second.method, &(ri->second.body), - hdrs, SIP_FLAGS_VERBATIM | SIP_FLAGS_NOAUTH | SIP_FLAGS_NOCONTACT) == 0) { + hdrs, flags) == 0) { processed = true; DBG("authenticated request successfully sent.\n"); // undo SIP dialog status change _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
