]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: Prevent extra Session-Expires headers from being added 57/2857/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:57:58 +0000 (11:57 -0500)
commitf85c77a9e1718d9df168f52787fdfc016d212770
tree04b235894f76d9137aeb2ad29cca92cc869e28b4
parent8bf050b853d7b11afe8db115fe63c5f3354788f5
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