[asterisk-commits] mmichelson: branch group/pimp_my_sip r379389 - /team/group/pimp_my_sip/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 17 16:24:56 CST 2013


Author: mmichelson
Date: Thu Jan 17 16:24:52 2013
New Revision: 379389

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379389
Log:
Don't report a lack of an SDP in an INVITE as an error.


Modified:
    team/group/pimp_my_sip/res/res_sip_session.c

Modified: team/group/pimp_my_sip/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_session.c?view=diff&rev=379389&r1=379388&r2=379389
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_session.c (original)
+++ team/group/pimp_my_sip/res/res_sip_session.c Thu Jan 17 16:24:52 2013
@@ -145,8 +145,13 @@
 	 */
 	int i;
 	pjsip_rdata_sdp_info *sdp_info = pjsip_rdata_get_sdp_info(rdata);
-	if (!sdp_info || !sdp_info->sdp || sdp_info->sdp_err) {
+	if (!sdp_info || sdp_info->sdp_err) {
 		return -1;
+	}
+	if (!sdp_info->sdp) {
+		/* No SDP is not an error. It just means we have to create the SDP offer when we send our SIP response */
+		ast_debug(1, "No SDP detected in incoming INVITE from %s\n", session->endpoint->name);
+		return 0;
 	}
 	for (i = 0; i < sdp_info->sdp->media_count; ++i) {
 		/* See if there are registered handlers for this media stream type */




More information about the asterisk-commits mailing list