Module: sems Branch: 1.4 Commit: e78fe72fb69989317d61771b661bded8fac350dc URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=e78fe72fb69989317d61771b661bded8fac350dc
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Mon Oct 31 23:46:22 2011 +0100 b/f: support compact Supported header (k:) --- core/AmSipDialog.cpp | 4 ++-- core/AmSipHeaders.h | 1 + core/plug-in/session_timer/SessionTimer.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index 5a37e87..d31357a 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -172,7 +172,7 @@ int AmSipDialog::rel100OnRequestIn(const AmSipRequest& req) if (req.method == SIP_METH_INVITE) { switch(reliable_1xx) { case REL100_SUPPORTED: /* if support is on, enforce if asked by UAC */ - if (key_in_list(getHeader(req.hdrs, SIP_HDR_SUPPORTED), + if (key_in_list(getHeader(req.hdrs, SIP_HDR_SUPPORTED, SIP_HDR_SUPPORTED_COMPACT), SIP_EXT_100REL) || key_in_list(getHeader(req.hdrs, SIP_HDR_REQUIRE), SIP_EXT_100REL)) { @@ -182,7 +182,7 @@ int AmSipDialog::rel100OnRequestIn(const AmSipRequest& req) break; case REL100_REQUIRE: /* if support is required, reject if UAC doesn't */ - if (! (key_in_list(getHeader(req.hdrs,SIP_HDR_SUPPORTED), + if (! (key_in_list(getHeader(req.hdrs,SIP_HDR_SUPPORTED, SIP_HDR_SUPPORTED_COMPACT), SIP_EXT_100REL) || key_in_list(getHeader(req.hdrs, SIP_HDR_REQUIRE), SIP_EXT_100REL))) { diff --git a/core/AmSipHeaders.h b/core/AmSipHeaders.h index fea90af..00b1470 100644 --- a/core/AmSipHeaders.h +++ b/core/AmSipHeaders.h @@ -45,6 +45,7 @@ #define SIP_EXT_100REL "100rel" #define SIP_HDR_SESSION_EXPIRES_COMPACT "x" +#define SIP_HDR_SUPPORTED_COMPACT "k" #define SIP_IS_200_CLASS(code) ((code >= 200) && (code < 300)) diff --git a/core/plug-in/session_timer/SessionTimer.cpp b/core/plug-in/session_timer/SessionTimer.cpp index b9778b8..a91668c 100644 --- a/core/plug-in/session_timer/SessionTimer.cpp +++ b/core/plug-in/session_timer/SessionTimer.cpp @@ -270,7 +270,8 @@ void SessionTimer::updateTimer(AmSession* s, const AmSipRequest& req) { if((req.method == SIP_METH_INVITE)||(req.method == SIP_METH_UPDATE)){ remote_timer_aware = - key_in_list(getHeader(req.hdrs, SIP_HDR_SUPPORTED), TIMER_OPTION_TAG, true); + key_in_list(getHeader(req.hdrs, SIP_HDR_SUPPORTED, SIP_HDR_SUPPORTED_COMPACT), + TIMER_OPTION_TAG, true); // determine session interval string sess_expires_hdr = getHeader(req.hdrs, SIP_HDR_SESSION_EXPIRES, _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
