From: Olle Johansson Date: Wed, 25 Oct 2006 20:14:57 +0000 (+0000) Subject: Old todo note - Don't add Contact header on BYE and Cancel X-Git-Tag: 1.4.0-beta4~270 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=77e12e971cc61f9dced600bd3656f8f95b79c897;p=thirdparty%2Fasterisk.git Old todo note - Don't add Contact header on BYE and Cancel git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46276 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 3c2bed690b..e406a85b14 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5556,7 +5556,9 @@ 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); + /* Do not add Contact for BYE and Cancel requests */ + if (sipmethod != SIP_BYE && sipmethod != SIP_CANCEL) + add_header(req, "Contact", p->our_contact); copy_header(req, orig, "Call-ID"); add_header(req, "CSeq", tmp);