Merged revisions 99978 via svnmerge from
authorOlle Johansson <oej@edvina.net>
Wed, 23 Jan 2008 21:11:55 +0000 (21:11 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 23 Jan 2008 21:11:55 +0000 (21:11 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99978 | oej | 2008-01-23 22:07:16 +0100 (Ons, 23 Jan 2008) | 7 lines

Second attempt. Don't change invitestate when receiving 18x messages in CANCEL state.

(issue #11736)
Reported by: MVF

Patch by oej.

........

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

channels/chan_sip.c

index 598ccaa..ed79134 100644 (file)
@@ -14290,7 +14290,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 (!req->ignore && p->owner) {
                                /* Queue a progress frame only if we have SDP in 180 or 182 */
@@ -14305,7 +14306,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 (!req->ignore && p->owner) {
                                /* Queue a progress frame */