[asterisk-commits] trunk r17050 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 3 03:51:00 MST 2006


Author: oej
Date: Mon Apr  3 05:50:56 2006
New Revision: 17050

URL: http://svn.digium.com/view/asterisk?rev=17050&view=rev
Log:
Issue #6848 - Accept MWI subscriptions with no Accept: header

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=17050&r1=17049&r2=17050&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Apr  3 05:50:56 2006
@@ -11084,7 +11084,15 @@
  				ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
  				return 0;
  			}
- 		} else if (!strcmp(event, "message-summary") && !strcmp(accept, "application/simple-message-summary")) {
+ 		} else if (!strcmp(event, "message-summary")) { 
+			if (!ast_strlen_zero(accept) && strcmp(accept, "application/simple-message-summary")) {
+				/* Format requested that we do not support */
+				transmit_response(p, "406 Not Acceptable", req);
+				if (option_debug > 1)
+					ast_log(LOG_DEBUG, "Received SIP mailbox subscription for unknown format: %s\n", accept);
+ 				ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
+				return 0;
+			}
 			/* Looks like they actually want a mailbox status 
 			  This version of Asterisk supports mailbox subscriptions
 			  The subscribed URI needs to exist in the dial plan



More information about the asterisk-commits mailing list