[asterisk-commits] mmichelson: branch group/issue8824 r165214 - in /team/group/issue8824: ./ cha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 17 13:19:02 CST 2008


Author: mmichelson
Date: Wed Dec 17 13:19:02 2008
New Revision: 165214

URL: http://svn.digium.com/view/asterisk?view=rev&rev=165214
Log:
Reset automerge and resolve conflict


Modified:
    team/group/issue8824/   (props changed)
    team/group/issue8824/CHANGES
    team/group/issue8824/channels/chan_sip.c
    team/group/issue8824/configs/sip.conf.sample

Propchange: team/group/issue8824/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/issue8824/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Dec 17 13:19:02 2008
@@ -1,1 +1,1 @@
-/trunk:1-165150
+/trunk:1-165213

Modified: team/group/issue8824/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/CHANGES?view=diff&rev=165214&r1=165213&r2=165214
==============================================================================
--- team/group/issue8824/CHANGES (original)
+++ team/group/issue8824/CHANGES Wed Dec 17 13:19:02 2008
@@ -72,6 +72,14 @@
  * Added two new configuration options, "qualifygap" and "qualifypeers", which allow
    finer control over how many peers Asterisk will qualify and the gap between them
    when all peers need to be qualified at the same time.
+ * Added a new 'ignoresdpversion' option to sip.conf.  When this is enabled
+   (either globally or for a specific peer), chan_sip will treat any SDP data
+   it receives as new data and update the media stream accordingly.  By
+   default, Asterisk will only modify the media stream if the SDP session
+   version received is different from the current SDP session version.  This
+   option is required to interoperate with devices that have non-standard SDP
+   session version implementations (observed with Microsoft OCS).  This option
+   is diabled by default.
 
 Skinny Changes
 --------------

Modified: team/group/issue8824/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/channels/chan_sip.c?view=diff&rev=165214&r1=165213&r2=165214
==============================================================================
--- team/group/issue8824/channels/chan_sip.c (original)
+++ team/group/issue8824/channels/chan_sip.c Wed Dec 17 13:19:02 2008
@@ -1382,6 +1382,7 @@
 #define SIP_PAGE2_ALLOWSUBSCRIBE	(1 << 16)	/*!< GP: Allow subscriptions from this peer? */
 #define SIP_PAGE2_ALLOWOVERLAP		(1 << 17)	/*!< DP: Allow overlap dialing ? */
 #define SIP_PAGE2_SUBSCRIBEMWIONLY	(1 << 18)	/*!< GP: Only issue MWI notification if subscribed to */
+#define SIP_PAGE2_IGNORESDPVERSION	(1 << 19)	/*!< GDP: Ignore the SDP session version number we receive and treat all sessions as new */
 
 #define SIP_PAGE2_T38SUPPORT		(7 << 20)	/*!< GDP: T38 Fax Passthrough Support */
 #define SIP_PAGE2_T38SUPPORT_UDPTL	(1 << 20)	/*!< GDP: T38 Fax Passthrough Support */
@@ -1402,10 +1403,10 @@
 #define SIP_PAGE2_VIDEOSUPPORT_ALWAYS	(1 << 31)       /*!< DP: Always set up video, even if endpoints don't support it */
 
 #define SIP_PAGE2_FLAGS_TO_COPY \
-	(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
-	SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_BUGGY_MWI | \
-	SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_FAX_DETECT | SIP_PAGE2_UDPTL_DESTINATION | \
-	SIP_PAGE2_VIDEOSUPPORT_ALWAYS | SIP_PAGE2_RPID_IMMEDIATE)
+	(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_IGNORESDPVERSION | \
+	SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | \
+	SIP_PAGE2_BUGGY_MWI | SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_FAX_DETECT | \
+	SIP_PAGE2_UDPTL_DESTINATION | SIP_PAGE2_VIDEOSUPPORT_ALWAYS | SIP_PAGE2_RPID_IMMEDIATE)
 
 /*@}*/ 
 
@@ -7404,8 +7405,11 @@
 		return -1;
 	}
 
-	if (p->sessionversion_remote < 0 || p->sessionversion_remote != rua_version) {
- 		p->sessionversion_remote = rua_version;
+	if (ast_test_flag(&p->flags[1], SIP_PAGE2_IGNORESDPVERSION)
+		|| p->sessionversion_remote < 0
+		|| p->sessionversion_remote != rua_version) {
+ 		
+		p->sessionversion_remote = rua_version;
 		p->session_modify = TRUE;
 	} else if (p->sessionversion_remote == rua_version) {
 		p->session_modify = FALSE;
@@ -14371,6 +14375,7 @@
 		ast_cli(fd, "  User=Phone   : %s\n", cli_yesno(ast_test_flag(&peer->flags[0], SIP_USEREQPHONE)));
 		ast_cli(fd, "  Video Support: %s\n", cli_yesno(ast_test_flag(&peer->flags[1], SIP_PAGE2_VIDEOSUPPORT)));
 		ast_cli(fd, "  Text Support : %s\n", cli_yesno(ast_test_flag(&peer->flags[1], SIP_PAGE2_TEXTSUPPORT)));
+		ast_cli(fd, "  Ign SDP ver  : %s\n", cli_yesno(ast_test_flag(&peer->flags[1], SIP_PAGE2_IGNORESDPVERSION)));
 		ast_cli(fd, "  Trust RPID   : %s\n", cli_yesno(ast_test_flag(&peer->flags[0], SIP_TRUSTRPID)));
 		ast_cli(fd, "  Send RPID    : %s\n", cli_yesno(ast_test_flag(&peer->flags[0], SIP_SENDRPID)));
 		ast_cli(fd, "  Subscriptions: %s\n", cli_yesno(ast_test_flag(&peer->flags[1], SIP_PAGE2_ALLOWSUBSCRIBE)));
@@ -14774,6 +14779,7 @@
 	}
 	ast_cli(a->fd, "  Videosupport:           %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_VIDEOSUPPORT)));
 	ast_cli(a->fd, "  Textsupport:            %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_TEXTSUPPORT)));
+	ast_cli(a->fd, "  Ignore SDP sess. ver.:  %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_IGNORESDPVERSION)));
 	ast_cli(a->fd, "  AutoCreate Peer:        %s\n", cli_yesno(sip_cfg.autocreatepeer));
 	ast_cli(a->fd, "  Match Auth Username:    %s\n", cli_yesno(global_match_auth_username));
 	ast_cli(a->fd, "  Allow unknown access:   %s\n", cli_yesno(sip_cfg.allowguest));
@@ -22131,6 +22137,9 @@
 	} else if (!strcasecmp(v->name, "allowsubscribe")) {
 		ast_set_flag(&mask[1], SIP_PAGE2_ALLOWSUBSCRIBE);
 		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWSUBSCRIBE);
+	} else if (!strcasecmp(v->name, "ignoresdpversion")) {
+		ast_set_flag(&mask[1], SIP_PAGE2_IGNORESDPVERSION);
+		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_IGNORESDPVERSION);
 	} else if (!strcasecmp(v->name, "faxdetect")) {
 		ast_set_flag(&mask[1], SIP_PAGE2_FAX_DETECT);
 		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_FAX_DETECT);
@@ -23142,6 +23151,7 @@
 	ast_clear_flag(&global_flags[1], SIP_PAGE2_FAX_DETECT);
 	ast_clear_flag(&global_flags[1], SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_VIDEOSUPPORT_ALWAYS);
 	ast_clear_flag(&global_flags[1], SIP_PAGE2_TEXTSUPPORT);
+	ast_clear_flag(&global_flags[1], SIP_PAGE2_IGNORESDPVERSION);
 
 
 	/* Read the [general] config section of sip.conf (or from realtime config) */

Modified: team/group/issue8824/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/configs/sip.conf.sample?view=diff&rev=165214&r1=165213&r2=165214
==============================================================================
--- team/group/issue8824/configs/sip.conf.sample (original)
+++ team/group/issue8824/configs/sip.conf.sample Wed Dec 17 13:19:02 2008
@@ -597,6 +597,15 @@
                                 ; instead of INVITE. This can be combined with 'nonat', as
                                 ; 'canreinvite=update,nonat'. It implies 'yes'.
 
+;ignoresdpversion=yes           ; By default, Asterisk will honor the session version
+                                ; number in SDP packets and will only modify the SDP
+                                ; session if the version number changes. This option will
+                                ; force asterisk to ignore the SDP session version number
+                                ; and treat all SDP data as new data.  This is required
+                                ; for devices that send us non standard SDP packets
+                                ; (observed with Microsoft OCS). By default this option is
+                                ; off.
+
 ;----------------------------------------- REALTIME SUPPORT ------------------------
 ; For additional information on ARA, the Asterisk Realtime Architecture,
 ; please read realtime.txt and extconfig.txt in the /doc directory of the
@@ -771,6 +780,7 @@
 ; allowoverlap
 ; allowsubscribe
 ; allowtransfer
+; ignoresdpversion
 ; subscribecontext
 ; template
 ; videosupport




More information about the asterisk-commits mailing list