]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #7572 - Hangup when receiving a buggy 487 response to an INVITE
authorOlle Johansson <oej@edvina.net>
Wed, 30 Aug 2006 19:01:55 +0000 (19:01 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 30 Aug 2006 19:01:55 +0000 (19:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41423 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2e0a662ef4c5198e4e347827c0b024f9bfd6f4ad..cd7583b8dea442a4bd4b39187a5176a51b87ab6e 100644 (file)
@@ -2299,6 +2299,7 @@ static int hangup_sip2cause(int cause)
        switch(cause) {
                case 603:       /* Declined */
                case 403:       /* Not found */
+               case 487:       /* Call cancelled */
                        return AST_CAUSE_CALL_REJECTED;
                case 404:       /* Not found */
                        return AST_CAUSE_UNALLOCATED;
@@ -10073,6 +10074,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                        break;
                                case 487:
                                        /* channel now destroyed - dec the inUse counter */
+                                       if (owner)
+                                               ast_queue_hangup(p->owner);
                                        update_call_counter(p, DEC_CALL_LIMIT);
                                        break;
                                case 482: /* SIP is incapable of performing a hairpin call, which