diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-02 00:24:03 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-02 00:24:03 +0000 |
commit | 0cddd4907260bb50181cfc5ba02b7ffc45f0ba1a (patch) | |
tree | 77eb44c928e7d6d1d2fb0247d63d93d60a91fbcd /channels | |
parent | d70a2fe5465c850ae29d4f61f97d7d3ccfb9b6ea (diff) |
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.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53109 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 22953bbcf..2f2d8ba4f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -523,6 +523,7 @@ static int default_maxcallbitrate; /*!< Maximum bitrate for call */ 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 */ @@ -10241,6 +10242,7 @@ static int sip_show_settings(int fd, int argc, char *argv[]) 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)")); @@ -16080,6 +16082,7 @@ static int reload_config(enum channelreloadreason reason) 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; @@ -16206,6 +16209,8 @@ static int reload_config(enum channelreloadreason reason) 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")) { @@ -16757,6 +16762,11 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc 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 */ |