]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: Prevent extra Session-Expires headers from being added 52/2852/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:18 +0000 (11:58 -0500)
commit77e8ec162b4625b144fae18203d2ac67a4f7a4eb
treeb8d205af5d0376ebc16f5e939df0054100937680
parentbcb133ce933c9ba8c36a8c20640f79f0d992ac12
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