]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Ugly patch to avoid hangup causes in non-final responses
authorOlle Johansson <oej@edvina.net>
Mon, 3 Apr 2006 17:49:17 +0000 (17:49 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 3 Apr 2006 17:49:17 +0000 (17:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17074 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bdd0092274de4c974af76a5c66e489bb60daf59d..4b3095414a314373ba435ccee32d07e97ccf18cc 100644 (file)
@@ -4141,7 +4141,7 @@ static int __transmit_response(struct sip_pvt *p, char *msg, struct sip_request
        add_header_contentLength(&resp, 0);
        /* If we are cancelling an incoming invite for some reason, add information
                about the reason why we are doing this in clear text */
-       if (p->owner && p->owner->hangupcause) {
+       if (msg[0] != '1' && p->owner && p->owner->hangupcause) {
                add_header(&resp, "X-Asterisk-HangupCause", ast_cause2str(p->owner->hangupcause));
        }
        add_blank_header(&resp);