]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Second attempt. Don't change invitestate when receiving 18x messages in CANCEL state.
authorOlle Johansson <oej@edvina.net>
Wed, 23 Jan 2008 21:07:16 +0000 (21:07 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 23 Jan 2008 21:07:16 +0000 (21:07 +0000)
(issue #11736)
Reported by: MVF

Patch by oej.

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

channels/chan_sip.c

index 2ed95f926b9c53f9ba859e5402147e611d6f7672..1cd25b516057a9865a261925d86ad9bb73d29579 100644 (file)
@@ -12042,7 +12042,8 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
                        }
                }
                if (find_sdp(req)) {
-                       p->invitestate = INV_EARLY_MEDIA;
+                       if (p->invitestate != INV_CANCELLED)
+                               p->invitestate = INV_EARLY_MEDIA;
                        res = process_sdp(p, req);
                        if (!ast_test_flag(req, SIP_PKT_IGNORE) && p->owner) {
                                /* Queue a progress frame only if we have SDP in 180 or 182 */
@@ -12057,7 +12058,8 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
                        sip_cancel_destroy(p);
                /* Ignore 183 Session progress without SDP */
                if (find_sdp(req)) {
-                       p->invitestate = INV_EARLY_MEDIA;
+                       if (p->invitestate != INV_CANCELLED)
+                               p->invitestate = INV_EARLY_MEDIA;
                        res = process_sdp(p, req);
                        if (!ast_test_flag(req, SIP_PKT_IGNORE) && p->owner) {
                                /* Queue a progress frame */