Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv1192/channels

Modified Files:
        chan_sip.c 
Log Message:
don't destroy calls when re-INVITE messages ask for things we can't do (issue 
#5384)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.872
retrieving revision 1.873
diff -u -d -r1.872 -r1.873
--- chan_sip.c  29 Sep 2005 17:41:00 -0000      1.872
+++ chan_sip.c  4 Oct 2005 22:09:23 -0000       1.873
@@ -10103,7 +10103,8 @@
                if (required_profile) {         /* They require something */
                        /* At this point we support no extensions, so fail */
                        transmit_response_with_unsupported(p, "420 Bad 
extension", req, required);
-                       ast_set_flag(p, SIP_NEEDDESTROY);       
+                       if (!p->lastinvite)
+                               ast_set_flag(p, SIP_NEEDDESTROY);       
                        return -1;
                        
                }
@@ -10136,7 +10137,8 @@
                        if (!strcasecmp(get_header(req, "Content-Type"), 
"application/sdp")) {
                                if (process_sdp(p, req)) {
                                        transmit_response(p, "488 Not 
acceptable here", req);
-                                       ast_set_flag(p, SIP_NEEDDESTROY);       
+                                       if (!p->lastinvite)
+                                               ast_set_flag(p, 
SIP_NEEDDESTROY);       
                                        return -1;
                                }
                        } else {

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to