]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Fri, 18 May 2007 19:21:46 +0000 (19:21 +0000)
committerAutomerge Script <automerge@asterisk.org>
Fri, 18 May 2007 19:21:46 +0000 (19:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65167 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 8188168a8cac6ba773bf9e93a283a9fb9013fbf0..16b1097d18d670d2748e8664d114d890a65c6568 100644 (file)
@@ -10690,6 +10690,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
        char *supported;
        char *required;
        unsigned int required_profile = 0;
+       int reinvite = 0;
 
        /* Find out what they support */
        if (!p->sipoptions) {
@@ -10843,6 +10844,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
        } else {
                if (option_debug > 1 && sipdebug)
                        ast_log(LOG_DEBUG, "Got a SIP re-invite for call %s\n", p->callid);
+               reinvite = 1;
                c = p->owner;
        }
        if (!ignore && p)
@@ -10919,7 +10921,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
                        transmit_response(p, "180 Ringing", req);
                        break;
                case AST_STATE_UP:
-                       transmit_response_with_sdp(p, "200 OK", req, 1);
+                       /* If this is not a re-invite or something to ignore - it's critical */
+                       transmit_response_with_sdp(p, "200 OK", req, (ignore || reinvite) ? 1 : 2);
                        break;
                default:
                        ast_log(LOG_WARNING, "Don't know how to handle INVITE in state %d\n", c->_state);