]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #7682 - don't add contacts to 4xx responses.
authorOlle Johansson <oej@edvina.net>
Mon, 18 Sep 2006 20:08:22 +0000 (20:08 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 18 Sep 2006 20:08:22 +0000 (20:08 +0000)
(Ugly fix, not proud at all)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43220 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a86f2c0ee52e71d603e9f6407c862b8ccfc4b833..2cf7d5353595ff48730d9486b68a3f2fe2a2402d 100644 (file)
@@ -4118,7 +4118,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, char *msg, stru
                        snprintf(contact, sizeof(contact), "%s;expires=%d", p->our_contact, p->expiry);
                        add_header(resp, "Contact", contact);   /* Not when we unregister */
                }
-       } else if (p->our_contact[0]) {
+       } else if (msg[0] != '4' && p->our_contact[0]) {
                add_header(resp, "Contact", p->our_contact);
        }
        return 0;