[asterisk-commits] oej: branch oej/earlyrtpfix r49086 -
/team/oej/earlyrtpfix/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Dec 31 04:11:24 MST 2006
Author: oej
Date: Sun Dec 31 05:11:23 2006
New Revision: 49086
URL: http://svn.digium.com/view/asterisk?view=rev&rev=49086
Log:
Implement option for early RTP bridge and disable it by default. Classify early RTP bridge in 1.4 as
experimental.
Needs some testing before merging with 1.4.
Modified:
team/oej/earlyrtpfix/channels/chan_sip.c
Modified: team/oej/earlyrtpfix/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/channels/chan_sip.c?view=diff&rev=49086&r1=49085&r2=49086
==============================================================================
--- team/oej/earlyrtpfix/channels/chan_sip.c (original)
+++ team/oej/earlyrtpfix/channels/chan_sip.c Sun Dec 31 05:11:23 2006
@@ -528,6 +528,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 */
@@ -10222,6 +10223,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)"));
@@ -15998,6 +16000,7 @@
expiry = DEFAULT_EXPIRY;
global_notifyringing = DEFAULT_NOTIFYRINGING;
global_limitonpeers = FALSE;
+ global_directrtpsetup = FALSE; /* Experimental feature, disabled by default */
global_notifyhold = FALSE;
global_alwaysauthreject = 0;
global_allowsubscribe = FALSE;
@@ -16122,6 +16125,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")) {
@@ -16689,6 +16694,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;
+
ast_mutex_lock(&p->lock);
if (ast_test_flag(&p->flags[0], SIP_ALREADYGONE)) {
/* If we're destroyed, don't bother */
More information about the asterisk-commits
mailing list