]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: Prevent extra Session-Expires headers from being added 55/2855/5
authorGeorge Joseph <gjoseph@digium.com>
Tue, 17 May 2016 16:14:51 +0000 (10:14 -0600)
committerJoshua Colp <jcolp@digium.com>
Wed, 18 May 2016 19:30:34 +0000 (14:30 -0500)
commite7dacdbba6887f625fb64b2024f83aa0200fd18d
tree7c77da788af0e853d344584eadfe1dd2ae6b0b66
parente3b1f2dfd87b098b22829ddba204a3d19c38306a
chan_sip: Prevent extra Session-Expires headers from being added

When chan_sip does a re-INVITE to refresh a session and authentication
is required, the INVITE with the Authorization header containes a
second Session-Expires header without the ";refersher=" parameter.
This is causing some proxies to return a 400.  Also, when Asterisk is
the uas and the refresher, it is including the Session-Expires and
Min-SE headers in OPTIONS messages which is not allowed per RFC4028.

This patch (based on the reporter's) Checks to see if a Session-Expires
header is already in the message before adding another one.  It also
checks that the method is INVITE or UPDATE.

ASTERISK-26030 #close

Change-Id: I58a7b07bab5a3177748d8a7034fb8ad8e11ce1d9
channels/chan_sip.c