]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't send Contact on MESSAGE
authorOlle Johansson <oej@edvina.net>
Wed, 6 Dec 2006 12:27:43 +0000 (12:27 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 6 Dec 2006 12:27:43 +0000 (12:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48317 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ccf3911ea4793132af27a95edeb8105a877b6423..ea92c336437f2cbaaac33ac09cd106eadfe080e6 100644 (file)
@@ -5629,9 +5629,10 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
                add_header(req, "From", ot);
                add_header(req, "To", of);
        }
-       /* Do not add Contact for BYE and Cancel requests */
-       if (sipmethod != SIP_BYE && sipmethod != SIP_CANCEL)
+       /* Do not add Contact for MESSAGE, BYE and Cancel requests */
+       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);