]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: Prevent extra Session-Expires headers from being added 56/2856/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:58:38 +0000 (11:58 -0500)
commitce3620caab5bc370bcf07d750046233167e2b825
tree6e0823d200a59d046bed38b9baeb95efe855629f
parent6d4928a1352ceeb4d0996511ddc5ddfc64793514
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