From: Olle Johansson Date: Wed, 6 Dec 2006 12:14:40 +0000 (+0000) Subject: Don't add Contact header on BYE, CANCEL, MESSAGE requests X-Git-Tag: 1.2.14~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eb9c059e520a6e2d1d3af941bf1220a5c9c5766;p=thirdparty%2Fasterisk.git Don't add Contact header on BYE, CANCEL, MESSAGE requests (Bye, Cancel backported from 1.4, MESSAGE bug reported to me by Gunnar at Omnitor) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48315 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 82f12aea55..51c90ea355 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4259,7 +4259,8 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in add_header(req, "From", ot); add_header(req, "To", of); } - add_header(req, "Contact", p->our_contact); + if (sipmethod != SIP_BYE && sipmethod != SIP_CANCEL && sipmethod != SIP_MESSAGE) + add_header(req, "Contact", p->our_contact); copy_header(req, orig, "Call-ID"); add_header(req, "CSeq", tmp);