Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.703 diff -u -r1.703 chan_sip.c --- channels/chan_sip.c 6 Apr 2005 21:12:32 -0000 1.703 +++ channels/chan_sip.c 13 Apr 2005 15:19:22 -0000 @@ -8338,6 +8338,17 @@ p->pendinginvite = seqno; copy_request(&p->initreq, req); check_via(p, req); + /* Process the SDP portion */ + if (!ast_strlen_zero(get_header(req, "Content-Type"))) { + if (process_sdp(p, req)) { + transmit_response(p, "488 Not acceptable here", req); + ast_set_flag(p, SIP_NEEDDESTROY); + return -1; + } + } else { + p->jointcapability = p->capability; + ast_log(LOG_DEBUG, "Hm.... No sdp for the moment\n"); + } if (p->owner) { /* Handle SDP here if we already have an owner */ if (!ast_strlen_zero(get_header(req, "Content-Type"))) { @@ -8366,17 +8377,6 @@ ast_set_flag(p, SIP_NEEDDESTROY); } return 0; - } - /* Process the SDP portion */ - if (!ast_strlen_zero(get_header(req, "Content-Type"))) { - if (process_sdp(p, req)) { - transmit_response(p, "488 Not acceptable here", req); - ast_set_flag(p, SIP_NEEDDESTROY); - return -1; - } - } else { - p->jointcapability = p->capability; - ast_log(LOG_DEBUG, "Hm.... No sdp for the moment\n"); } /* Queue NULL frame to prod ast_rtp_bridge if appropriate */ if (p->owner)