diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-12-10 14:45:52 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-12-10 14:45:52 +0000 |
commit | 1c1faa13806d436b74d246d545913b4fa26ce924 (patch) | |
tree | 87c766209d2538c8530800170d8f53eedbb2b245 /channels | |
parent | 8c99bcc5a36772517b6b5ce8827727cf49a933b9 (diff) |
Handle Session-Expires less than local Min-SE in 200 OK
Ensure that a call is immediately torn down if a Session-Expires value
received in a 200 OK is less than the local Min-SE. This also prevents
Asterisk from allowing calls with Session-Expires below the
RFC4028-mandated minimum (90s).
(closes issue ASTERISK-20653)
Review: https://reviewboard.asterisk.org/r/2237/
Patch-by: Kinsey Moore
........
Merged revisions 377623 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377624 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377625 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index cabc2d14d..fa70dc807 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -22784,6 +22784,9 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest rtn = parse_session_expires(p_hdrval, &tmp_st_interval, &st_ref_param); if (rtn != 0) { ast_set_flag(&p->flags[0], SIP_PENDINGBYE); + } else if (tmp_st_interval < st_get_se(p, FALSE)) { + ast_log(LOG_WARNING, "Got Session-Expires less than local Min-SE in 200 OK, tearing down call\n"); + ast_set_flag(&p->flags[0], SIP_PENDINGBYE); } if (st_ref_param == SESSION_TIMER_REFRESHER_PARAM_UAC) { p->stimer->st_ref = SESSION_TIMER_REFRESHER_US; |