[asterisk-commits] oej: trunk r53110 - in /trunk: ./ channels/chan_sip.c configs/sip.conf.sample

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 1 17:26:26 MST 2007


Author: oej
Date: Thu Feb  1 18:26:25 2007
New Revision: 53110

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53110
Log:
Patch based on this patch with small changes for trunk...

Merged revisions 53109 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r53109 | oej | 2007-02-02 01:24:03 +0100 (Fri, 02 Feb 2007) | 4 lines

Disable the direct p2p RTP call setup in SIP. You can enable it in sip.conf, but it is now
considered experimental until we solve the AST_CONTROL_ANSWER with payload and videocaps
stuff.

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c
    trunk/configs/sip.conf.sample

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=53110&r1=53109&r2=53110
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Feb  1 18:26:25 2007
@@ -526,6 +526,7 @@
 static struct ast_codec_pref default_prefs;		/*!< Default codec prefs */
 
 /* Global settings only apply to the channel */
+static int global_directrtpsetup;	/*!< Enable support for Direct RTP setup (no re-invites) */
 static int global_limitonpeers;		/*!< Match call limit on peers only */
 static int global_rtautoclear;
 static int global_notifyringing;	/*!< Send notifications on ringing */
@@ -10478,6 +10479,7 @@
 	ast_cli(fd, "  Realm. auth:            %s\n", authl ? "Yes": "No");
  	ast_cli(fd, "  Always auth rejects:    %s\n", global_alwaysauthreject ? "Yes" : "No");
 	ast_cli(fd, "  Call limit peers only:  %s\n", global_limitonpeers ? "Yes" : "No");
+	ast_cli(fd, "  Direct RTP setup:       %s\n", global_directrtpsetup ? "Yes" : "No");
 	ast_cli(fd, "  User Agent:             %s\n", global_useragent);
 	ast_cli(fd, "  MWI checking interval:  %d secs\n", global_mwitime);
 	ast_cli(fd, "  Reg. context:           %s\n", S_OR(global_regcontext, "(not set)"));
@@ -16337,6 +16339,7 @@
 	global_notifyringing = DEFAULT_NOTIFYRINGING;
 	global_limitonpeers = FALSE;		/*!< Match call limit on peers only */
 	global_notifyhold = FALSE;		/*!< Keep track of hold status for a peer */
+	global_directrtpsetup = FALSE;		/* Experimental feature, disabled by default */
 	global_alwaysauthreject = 0;
 	global_allowsubscribe = FALSE;
 	snprintf(global_useragent, sizeof(global_useragent), "%s %s", DEFAULT_USERAGENT, ASTERISK_VERSION);
@@ -16463,6 +16466,8 @@
 			ast_copy_string(default_notifymime, v->value, sizeof(default_notifymime));
 		} else if (!strcasecmp(v->name, "limitonpeers")) {
 			global_limitonpeers = ast_true(v->value);
+		} else if (!strcasecmp(v->name, "directrtpsetup")) {
+			global_directrtpsetup = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "notifyringing")) {
 			global_notifyringing = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "notifyhold")) {
@@ -17013,6 +17018,11 @@
 	p = chan->tech_pvt;
 	if (!p) 
 		return -1;
+
+	/* Disable early RTP bridge  */
+	if (chan->_state != AST_STATE_UP && !global_directrtpsetup) 	/* We are in early state */
+		return 0;
+
 	sip_pvt_lock(p);
 	if (ast_test_flag(&p->flags[0], SIP_ALREADYGONE)) {
 		/* If we're destroyed, don't bother */

Modified: trunk/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=53110&r1=53109&r2=53110
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Thu Feb  1 18:26:25 2007
@@ -332,6 +332,12 @@
 				; at call setup (a new feature in 1.4 - setting up the
 				; call directly between the endpoints instead of sending
 				; a re-INVITE).
+
+;directrtpsetup=yes		; Enable the new experimental direct RTP setup. This sets up
+				; the call directly with media peer-2-peer without re-invites.
+				; Will not work for video and cases where the callee sends 
+				; RTP payloads and fmtp headers in the 200 OK that does not match the
+				; callers INVITE.
 
 ;canreinvite=nonat		; An additional option is to allow media path redirection
 				; (reinvite) but only when the peer where the media is being



More information about the asterisk-commits mailing list