]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: Prevent extra Session-Expires headers from being added 54/2854/2
authorGeorge Joseph <gjoseph@digium.com>
Tue, 17 May 2016 16:14:51 +0000 (10:14 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 17 May 2016 16:59:17 +0000 (11:59 -0500)
commit76787842ddacc493f2a4131004dbf8b48eb4ce47
treec1aa586c998da5c624e1381a70e3fcf51f13e2b9
parent2a00dec2bc471b0305d3ce7dc41a38489668b3f0
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