[asterisk-commits] kmoore: branch 1.8 r406170 - /branches/1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 22 12:27:24 CST 2014


Author: kmoore
Date: Wed Jan 22 12:27:19 2014
New Revision: 406170

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406170
Log:
chan_sip: Decline image streams on unsupported transports

This change allows chan_sip to decline individual image streams over
unsupported transports in the SDP of the 200 response. Previously,
an image stream offer with RTP/AVP as the transport would cause
chan_sip to respond with a 488.

(closes issue ASTERISK-22988)
Reported by: adomjan
Original patch by: adomjan

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=406170&r1=406169&r2=406170
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Wed Jan 22 12:27:19 2014
@@ -9366,7 +9366,7 @@
 		int image = FALSE;
 		int text = FALSE;
 		int processed_crypto = FALSE;
-		char protocol[5] = {0,};
+		char protocol[18] = {0,};
 		int x;
 
 		numberofports = 0;
@@ -9550,6 +9550,9 @@
 					 * respond with the EC they want to use */
 					ast_udptl_set_error_correction_scheme(p->udptl, UDPTL_ERROR_CORRECTION_NONE);
 				}
+			} else if (sscanf(m, "image %30u %17s t38%n", &x, protocol, &len) == 2 && len > 0) {
+				ast_log(LOG_WARNING, "Declining image stream due to unsupported transport: %s\n", m);
+				continue;
 			} else {
 				ast_log(LOG_WARNING, "Rejecting image media offer due to invalid or unsupported syntax: %s\n", m);
 				return -1;




More information about the asterisk-commits mailing list