[svn-commits] dvossel: trunk r287930 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Sep 21 13:33:22 CDT 2010
Author: dvossel
Date: Tue Sep 21 13:33:18 2010
New Revision: 287930
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=287930
Log:
Merged revisions 287929 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r287929 | dvossel | 2010-09-21 13:32:12 -0500 (Tue, 21 Sep 2010) | 4 lines
Send a "415 Unsupported Media Type" after failure to process sdp due to unknown Content-Encoding header.
ABE-2258
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=287930&r1=287929&r2=287930
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Sep 21 13:33:18 2010
@@ -21157,7 +21157,14 @@
/* Handle SDP here if we already have an owner */
if (find_sdp(req)) {
if (process_sdp(p, req, SDP_T38_INITIATE)) {
- transmit_response_reliable(p, "488 Not acceptable here", req);
+ if (!ast_strlen_zero(get_header(req, "Content-Encoding"))) {
+ /* Asterisk does not yet support any Content-Encoding methods. Always
+ * attempt to process the sdp, but return a 415 if a Content-Encoding header
+ * was present after processing failed. */
+ transmit_response_reliable(p, "415 Unsupported Media type", req);
+ } else {
+ transmit_response_reliable(p, "488 Not acceptable here", req);
+ }
if (!p->lastinvite)
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
res = -1;
@@ -21222,8 +21229,15 @@
/* We have a successful authentication, process the SDP portion if there is one */
if (find_sdp(req)) {
if (process_sdp(p, req, SDP_T38_INITIATE)) {
- /* Unacceptable codecs */
- transmit_response_reliable(p, "488 Not acceptable here", req);
+ /* Asterisk does not yet support any Content-Encoding methods. Always
+ * attempt to process the sdp, but return a 415 if a Content-Encoding header
+ * was present after processing fails. */
+ if (!ast_strlen_zero(get_header(req, "Content-Encoding"))) {
+ transmit_response_reliable(p, "415 Unsupported Media type", req);
+ } else {
+ /* Unacceptable codecs */
+ transmit_response_reliable(p, "488 Not acceptable here", req);
+ }
p->invitestate = INV_COMPLETED;
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
ast_debug(1, "No compatible codecs for this SIP call.\n");
More information about the svn-commits
mailing list