[asterisk-commits] moy: branch moy/webrtc-11 r408854 - in /team/moy/webrtc-11: ./ addons/ addons...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Feb 22 13:31:51 CST 2014
Author: moy
Date: Sat Feb 22 13:31:22 2014
New Revision: 408854
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=408854
Log:
Merged r400822:r408853 from branches/11 to team/moy/webrtc-11
Modified:
team/moy/webrtc-11/ (props changed)
team/moy/webrtc-11/Makefile
team/moy/webrtc-11/README-SERIOUSLY.bestpractices.txt
team/moy/webrtc-11/UPGRADE.txt
team/moy/webrtc-11/addons/chan_ooh323.c
team/moy/webrtc-11/addons/ooh323c/src/ooCalls.h
team/moy/webrtc-11/addons/ooh323c/src/ooCapability.c
team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.c
team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.h
team/moy/webrtc-11/addons/ooh323c/src/ooTimer.c
team/moy/webrtc-11/addons/ooh323c/src/oochannels.c
team/moy/webrtc-11/addons/ooh323c/src/ooh245.c
team/moy/webrtc-11/addons/ooh323c/src/ooh323.c
team/moy/webrtc-11/apps/app_chanspy.c
team/moy/webrtc-11/apps/app_confbridge.c
team/moy/webrtc-11/apps/app_dial.c
team/moy/webrtc-11/apps/app_dumpchan.c
team/moy/webrtc-11/apps/app_forkcdr.c
team/moy/webrtc-11/apps/app_meetme.c
team/moy/webrtc-11/apps/app_mixmonitor.c
team/moy/webrtc-11/apps/app_queue.c
team/moy/webrtc-11/apps/app_sms.c
team/moy/webrtc-11/apps/app_stack.c
team/moy/webrtc-11/apps/app_transfer.c
team/moy/webrtc-11/apps/app_verbose.c
team/moy/webrtc-11/apps/app_voicemail.c
team/moy/webrtc-11/apps/confbridge/conf_config_parser.c
team/moy/webrtc-11/apps/confbridge/conf_state.c
team/moy/webrtc-11/apps/confbridge/conf_state_empty.c
team/moy/webrtc-11/apps/confbridge/conf_state_inactive.c
team/moy/webrtc-11/apps/confbridge/conf_state_multi.c
team/moy/webrtc-11/apps/confbridge/conf_state_multi_marked.c
team/moy/webrtc-11/apps/confbridge/conf_state_single.c
team/moy/webrtc-11/apps/confbridge/conf_state_single_marked.c
team/moy/webrtc-11/apps/confbridge/include/confbridge.h
team/moy/webrtc-11/cdr/cdr_adaptive_odbc.c
team/moy/webrtc-11/cdr/cdr_radius.c
team/moy/webrtc-11/cel/cel_manager.c
team/moy/webrtc-11/cel/cel_pgsql.c
team/moy/webrtc-11/cel/cel_radius.c
team/moy/webrtc-11/channels/chan_dahdi.c
team/moy/webrtc-11/channels/chan_iax2.c
team/moy/webrtc-11/channels/chan_local.c
team/moy/webrtc-11/channels/chan_mgcp.c
team/moy/webrtc-11/channels/chan_sip.c
team/moy/webrtc-11/channels/sig_analog.c
team/moy/webrtc-11/channels/sig_pri.c
team/moy/webrtc-11/channels/sip/include/sip.h
team/moy/webrtc-11/channels/sip/reqresp_parser.c
team/moy/webrtc-11/codecs/ilbc/doCPLC.c
team/moy/webrtc-11/configs/agents.conf.sample
team/moy/webrtc-11/configs/asterisk.conf.sample
team/moy/webrtc-11/configs/confbridge.conf.sample
team/moy/webrtc-11/configs/iax.conf.sample
team/moy/webrtc-11/configs/indications.conf.sample
team/moy/webrtc-11/configs/logger.conf.sample
team/moy/webrtc-11/configs/manager.conf.sample
team/moy/webrtc-11/configs/queues.conf.sample
team/moy/webrtc-11/configs/res_fax.conf.sample
team/moy/webrtc-11/configs/sip.conf.sample
team/moy/webrtc-11/configure
team/moy/webrtc-11/configure.ac
team/moy/webrtc-11/contrib/scripts/install_prereq
team/moy/webrtc-11/doc/asterisk.8
team/moy/webrtc-11/formats/format_wav.c
team/moy/webrtc-11/funcs/func_db.c
team/moy/webrtc-11/funcs/func_env.c
team/moy/webrtc-11/funcs/func_lock.c
team/moy/webrtc-11/funcs/func_math.c
team/moy/webrtc-11/funcs/func_realtime.c
team/moy/webrtc-11/funcs/func_shell.c
team/moy/webrtc-11/funcs/func_strings.c
team/moy/webrtc-11/funcs/func_timeout.c
team/moy/webrtc-11/include/asterisk/autoconfig.h.in
team/moy/webrtc-11/include/asterisk/channel.h
team/moy/webrtc-11/include/asterisk/devicestate.h
team/moy/webrtc-11/include/asterisk/frame.h
team/moy/webrtc-11/include/asterisk/logger.h
team/moy/webrtc-11/include/asterisk/pbx.h
team/moy/webrtc-11/include/asterisk/rtp_engine.h
team/moy/webrtc-11/include/asterisk/test.h
team/moy/webrtc-11/main/app.c
team/moy/webrtc-11/main/asterisk.c
team/moy/webrtc-11/main/astobj2.c
team/moy/webrtc-11/main/cel.c
team/moy/webrtc-11/main/channel.c
team/moy/webrtc-11/main/cli.c
team/moy/webrtc-11/main/config.c
team/moy/webrtc-11/main/data.c
team/moy/webrtc-11/main/db.c
team/moy/webrtc-11/main/devicestate.c
team/moy/webrtc-11/main/editline/readline.c
team/moy/webrtc-11/main/editline/term.c
team/moy/webrtc-11/main/features.c
team/moy/webrtc-11/main/file.c
team/moy/webrtc-11/main/format.c
team/moy/webrtc-11/main/jitterbuf.c
team/moy/webrtc-11/main/loader.c
team/moy/webrtc-11/main/logger.c
team/moy/webrtc-11/main/manager.c
team/moy/webrtc-11/main/pbx.c
team/moy/webrtc-11/main/rtp_engine.c
team/moy/webrtc-11/main/say.c
team/moy/webrtc-11/main/tcptls.c
team/moy/webrtc-11/main/test.c
team/moy/webrtc-11/main/translate.c
team/moy/webrtc-11/main/udptl.c
team/moy/webrtc-11/main/utils.c
team/moy/webrtc-11/main/xmldoc.c
team/moy/webrtc-11/pbx/pbx_lua.c
team/moy/webrtc-11/res/Makefile
team/moy/webrtc-11/res/ael/pval.c
team/moy/webrtc-11/res/res_calendar.c
team/moy/webrtc-11/res/res_clialiases.c
team/moy/webrtc-11/res/res_config_pgsql.c
team/moy/webrtc-11/res/res_fax.c
team/moy/webrtc-11/res/res_fax_spandsp.c
team/moy/webrtc-11/res/res_jabber.c
team/moy/webrtc-11/res/res_pktccops.c
team/moy/webrtc-11/res/res_rtp_asterisk.c
team/moy/webrtc-11/res/res_xmpp.c
team/moy/webrtc-11/sounds/Makefile
team/moy/webrtc-11/tests/test_dlinklists.c
team/moy/webrtc-11/tests/test_linkedlists.c
team/moy/webrtc-11/utils/clicompat.c
team/moy/webrtc-11/utils/conf2ael.c
team/moy/webrtc-11/utils/extconf.c
Propchange: team/moy/webrtc-11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/moy/webrtc-11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 22 13:31:22 2014
@@ -1,1 +1,1 @@
-/certified/branches/1.8.15:382389
+/branches/11:400822-408853
Modified: team/moy/webrtc-11/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/Makefile?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/Makefile (original)
+++ team/moy/webrtc-11/Makefile Sat Feb 22 13:31:22 2014
@@ -363,12 +363,16 @@
$(SUBDIRS): makeopts .lastclean main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
+ ifeq ($(shell grep ^MENUSELECT_EMBED=$$ menuselect.makeopts 2>/dev/null),)
# Non-windows:
# ensure that all module subdirectories are processed before 'main' during
# a parallel build, since if there are modules selected to be embedded the
# directories containing them must be completed before the main Asterisk
- # binary can be built
+ # binary can be built.
+ # If MENUSELECT_EMBED is empty, we don't need this and allow 'main' to be
+ # be built without building all dependencies first.
main: $(filter-out main,$(MOD_SUBDIRS))
+ endif
else
# Windows: we need to build main (i.e. the asterisk dll) first,
# followed by res, followed by the other directories, because
Modified: team/moy/webrtc-11/README-SERIOUSLY.bestpractices.txt
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/README-SERIOUSLY.bestpractices.txt?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/README-SERIOUSLY.bestpractices.txt (original)
+++ team/moy/webrtc-11/README-SERIOUSLY.bestpractices.txt Sat Feb 22 13:31:22 2014
@@ -25,6 +25,9 @@
* Manager Class Authorizations:
Recognizing potential issues with certain classes of authorization
+
+* Avoid Privilege Escalations:
+ Disable the ability to execute functions that may escalate privileges
----------------
Additional Links
@@ -344,3 +347,24 @@
not running Asterisk as root, can prevent serious problems from arising when
allowing external connections to originate calls into Asterisk.
+===========================
+Avoid Privilege Escalations
+===========================
+
+External control protocols, such as Manager, often have the ability to get and
+set channel variables; which allows the execution of dialplan functions.
+
+Dialplan functions within Asterisk are incredibly powerful, which is wonderful
+for building applications using Asterisk. But during the read or write
+execution, certain diaplan functions do much more. For example, reading the
+SHELL() function can execute arbitrary commands on the system Asterisk is
+running on. Writing to the FILE() function can change any file that Asterisk has
+write access to.
+
+When these functions are executed from an external protocol, that execution
+could result in a privilege escalation. Asterisk can inhibit the execution of
+these functions, if live_dangerously in the [options] section of asterisk.conf
+is set to no.
+
+For backwards compatibility, live_dangerously defaults to yes, and must be
+explicitly set to no to enable this privilege escalation protection.
Modified: team/moy/webrtc-11/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/UPGRADE.txt?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/UPGRADE.txt (original)
+++ team/moy/webrtc-11/UPGRADE.txt Sat Feb 22 13:31:22 2014
@@ -19,12 +19,66 @@
=== UPGRADE-10.txt -- Upgrade info for 1.8 to 10
===
===========================================================
+from 11.8 to 11.9
+* res_fax now returns the correct rates for V.27ter (4800 or 9600 bit/s).
+ Because of this the default settings would not load, so the minrate (minimum
+ transmission rate) option was changed to default to 4800 since that is the
+ minimum rate for v.27 which is included in the default modem options.
+* The sound_place_into_conference sound used in Confbridge is now deprecated
+ and is no longer functional since it has been broken since its inception
+ and the fix involved using a different method to achieve the same goal. The
+ new method to achieve this functionality is by using sound_begin to play
+ a sound to the conference when waitmarked users are moved into the conference.
+
+From 11.7 to 11.8:
+* The per console verbose level feature as previously implemented caused a
+ large performance penalty. The fix required some minor incompatibilities
+ if the new rasterisk is used to connect to an earlier version. If the new
+ rasterisk connects to an older Asterisk version then the root console verbose
+ level is always affected by the "core set verbose" command of the remote
+ console even though it may appear to only affect the current console. If
+ an older version of rasterisk connects to the new version then the
+ "core set verbose" command will have no effect.
+
+CLI commands:
+ - "core show settings" now lists the current console verbosity in addition
+ to the root console verbosity.
+
+ - "core set verbose" has not been able to support the by module verbose
+ logging levels since verbose logging levels were made per console. That
+ syntax is now removed and a silence option added in its place.
+
+Configuration Files:
+ - The 'verbose' setting in logger.conf still takes an optional argument,
+ specifying the verbosity level for each logging destination. However,
+ the default is now to once again follow the current root console level.
+ As a result, using the AMI Command action with "core set verbose" could
+ again set the root console verbose level and affect the verbose level
+ logged.
From 11.6 to 11.7:
ConfBridge
- ConfBridge now has the ability to set the language of announcements to the
conference. The language can be set on a bridge profile in confbridge.conf
or by the dialplan function CONFBRIDGE(bridge,language)=en.
+chan_sip - Clarify The "sip show peers" Forcerport Column And Add Comedia
+ - Under the "Forcerport" column, the "N" used to mean NAT (i.e. Yes). With
+ the additon of auto_* NAT settings, the meaning changed and there was a
+ certain combination of letters added to indicate the current setting. The
+ combination of using "Y", "N", "A" or "a", can be confusing. Therefore, we
+ now display clearly what the current Forcerport setting is: "Yes", "No",
+ "Auto (Yes)", "Auto (No)".
+ - Since we are clarifying the Forcerport column, we have added a column to
+ display the Comedia setting since this is useful information as well. We
+ no longer have a simple "NAT" setting like other versions before 11.
+
+* Certain dialplan functions have been marked as 'dangerous', and may only be
+ executed from the dialplan. Execution from extenal sources (AMI's GetVar and
+ SetVar actions; etc.) may be inhibited by setting live_dangerously in the
+ [options] section of asterisk.conf to no. SHELL(), channel locking, and direct
+ file read/write functions are marked as dangerous. DB_DELETE() and
+ REALTIME_DESTROY() are marked as dangerous for reads, but can now safely
+ accept writes (which ignore the provided value).
From 11.5 to 11.6:
* res_agi will now properly indicate if there was an error in streaming an
@@ -36,6 +90,7 @@
* The option "register_retry_403" has been added to chan_sip to work around
servers that are known to erroneously send 403 in response to valid
REGISTER requests and allows Asterisk to continue attepmting to connect.
+ Due to a failed merge, this option is present, but non-functional until 11.8.0.
From 11.4 to 11.5:
* The default settings for chan_sip are now overriden properly by the general
Modified: team/moy/webrtc-11/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/chan_ooh323.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/chan_ooh323.c (original)
+++ team/moy/webrtc-11/addons/chan_ooh323.c Sat Feb 22 13:31:22 2014
@@ -294,8 +294,6 @@
static int usecnt = 0;
AST_MUTEX_DEFINE_STATIC(usecnt_lock);
-AST_MUTEX_DEFINE_STATIC(ooh323c_cmd_lock);
-
static long callnumber = 0;
AST_MUTEX_DEFINE_STATIC(ooh323c_cn_lock);
@@ -694,7 +692,7 @@
ooh323_destroy(p);
ast_mutex_unlock(&iflock);
return NULL;
- } else if (gH323ep.gkClient && gH323ep.gkClient->state != GkClientRegistered) {
+ } else if (!gH323ep.gkClient || (gH323ep.gkClient && gH323ep.gkClient->state != GkClientRegistered)) {
ast_log(LOG_ERROR, "Gatekeeper client is configured but not registered\n");
*cause = AST_CAUSE_NORMAL_TEMPORARY_FAILURE;
return NULL;
@@ -749,7 +747,6 @@
}
ast_mutex_unlock(&p->lock);
- ast_mutex_lock(&ooh323c_cmd_lock);
ast_cond_init(&p->rtpcond, NULL);
ooMakeCall(data, p->callToken, AST_MAX_EXTENSION, NULL);
ast_mutex_lock(&p->lock);
@@ -758,7 +755,6 @@
}
ast_mutex_unlock(&p->lock);
ast_cond_destroy(&p->rtpcond);
- ast_mutex_unlock(&ooh323c_cmd_lock);
}
restart_monitor();
@@ -1406,7 +1402,8 @@
}
break;
- case AST_CONTROL_PROCEEDING:
+ case AST_CONTROL_PROCEEDING:
+ case AST_CONTROL_PVT_CAUSE_CODE:
case -1:
break;
default:
@@ -2490,11 +2487,23 @@
return NULL;
}
} else if (!strcasecmp(v->name, "e164")) {
- if (!(peer->e164 = ast_strdup(v->value))) {
- ast_log(LOG_ERROR, "Could not allocate memory for e164 of "
+ int valid = 1;
+ const char *tmp;
+ for(tmp = v->value; *tmp; tmp++) {
+ if (!isdigit(*tmp)) {
+ valid = 0;
+ break;
+ }
+ }
+ if (valid) {
+ if (!(peer->e164 = ast_strdup(v->value))) {
+ ast_log(LOG_ERROR, "Could not allocate memory for e164 of "
"peer %s\n", name);
- ooh323_delete_peer(peer);
- return NULL;
+ ooh323_delete_peer(peer);
+ return NULL;
+ }
+ } else {
+ ast_log(LOG_ERROR, "Invalid e164: %s for peer %s\n", v->value, name);
}
} else if (!strcasecmp(v->name, "email")) {
if (!(peer->email = ast_strdup(v->value))) {
@@ -2625,6 +2634,9 @@
static int ooh323_do_reload(void)
{
+ struct ooAliases * pNewAlias = NULL;
+ struct ooh323_peer *peer = NULL;
+
if (gH323Debug) {
ast_verb(0, "--- ooh323_do_reload\n");
}
@@ -2643,6 +2655,46 @@
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
+
+ /* Set aliases if any */
+ if (gH323Debug) {
+ ast_verb(0, "updating local aliases\n");
+ }
+
+ for (pNewAlias = gAliasList; pNewAlias; pNewAlias = pNewAlias->next) {
+ switch (pNewAlias->type) {
+ case T_H225AliasAddress_h323_ID:
+ ooH323EpAddAliasH323ID(pNewAlias->value);
+ break;
+ case T_H225AliasAddress_dialedDigits:
+ ooH323EpAddAliasDialedDigits(pNewAlias->value);
+ break;
+ case T_H225AliasAddress_email_ID:
+ ooH323EpAddAliasEmailID(pNewAlias->value);
+ break;
+ default:
+ ;
+ }
+ }
+
+ ast_mutex_lock(&peerl.lock);
+ peer = peerl.peers;
+ while (peer) {
+ if(peer->h323id) {
+ ooH323EpAddAliasH323ID(peer->h323id);
+ }
+ if(peer->email) {
+ ooH323EpAddAliasEmailID(peer->email);
+ }
+ if(peer->e164) {
+ ooH323EpAddAliasDialedDigits(peer->e164);
+ }
+ if(peer->url) {
+ ooH323EpAddAliasURLID(peer->url);
+ }
+ peer = peer->next;
+ }
+ ast_mutex_unlock(&peerl.lock);
if (gH323Debug) {
ast_verb(0, "+++ ooh323_do_reload\n");
@@ -2727,6 +2779,7 @@
free(prev);
}
gAliasList = NULL;
+ ooH323EpClearAllAliases();
}
/* Inintialize everything to default */
@@ -2843,17 +2896,29 @@
gAliasList = pNewAlias;
pNewAlias = NULL;
} else if (!strcasecmp(v->name, "e164")) {
- pNewAlias = ast_calloc(1, sizeof(struct ooAliases));
- if (!pNewAlias) {
- ast_log(LOG_ERROR, "Failed to allocate memory for e164 alias\n");
- ast_config_destroy(cfg);
- return 1;
+ int valid = 1;
+ const char *tmp;
+ for(tmp = v->value; *tmp; tmp++) {
+ if (!isdigit(*tmp)) {
+ valid = 0;
+ break;
+ }
}
- pNewAlias->type = T_H225AliasAddress_dialedDigits;
- pNewAlias->value = strdup(v->value);
- pNewAlias->next = gAliasList;
- gAliasList = pNewAlias;
- pNewAlias = NULL;
+ if (valid) {
+ pNewAlias = ast_calloc(1, sizeof(struct ooAliases));
+ if (!pNewAlias) {
+ ast_log(LOG_ERROR, "Failed to allocate memory for e164 alias\n");
+ ast_config_destroy(cfg);
+ return 1;
+ }
+ pNewAlias->type = T_H225AliasAddress_dialedDigits;
+ pNewAlias->value = strdup(v->value);
+ pNewAlias->next = gAliasList;
+ gAliasList = pNewAlias;
+ pNewAlias = NULL;
+ } else {
+ ast_log(LOG_ERROR, "Invalid e164: %s\n", v->value);
+ }
} else if (!strcasecmp(v->name, "email")) {
pNewAlias = ast_calloc(1, sizeof(struct ooAliases));
if (!pNewAlias) {
@@ -3425,6 +3490,9 @@
case GkClientFailed:
ast_cli(a->fd, "%-20s%s\n", "GK state:", "Failed");
break;
+ case GkClientStopped:
+ ast_cli(a->fd, "%-20s%s\n", "GK state:", "Shutdown");
+ break;
default:
break;
}
@@ -3849,6 +3917,13 @@
if (reloading) {
ast_verb(1, "Reloading H.323\n");
ooh323_do_reload();
+ }
+ if (gH323ep.gkClient && gH323ep.gkClient->state == GkClientStopped) {
+ ooGkClientDestroy();
+ ast_verb(0, "Restart stopped gatekeeper client\n");
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ gGatekeeper : 0, 0);
+ ooGkClientStart(gH323ep.gkClient);
}
/* Check for interfaces needing to be killed */
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooCalls.h
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooCalls.h?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooCalls.h (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooCalls.h Sat Feb 22 13:31:22 2014
@@ -228,7 +228,7 @@
char lastDTMF;
ASN1UINT nextDTMFstamp;
int rtdrInterval, rtdrCount; /* roundTripDelay interval and unreplied count */
- ASN1UINT rtdrSend, rtdrRecv; /* last sended/replied RTD request */
+ ASN1UINT8 rtdrSend, rtdrRecv; /* last sended/replied RTD request */
void *usrData; /*!<User can set this to user specific data*/
struct OOH323CallData* next;
struct OOH323CallData* prev;
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooCapability.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooCapability.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooCapability.c (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooCapability.c Sat Feb 22 13:31:22 2014
@@ -2940,6 +2940,22 @@
break;
+ case T_H245Capability_receiveAndTransmitUserInputCapability:
+ if((cap->u.receiveAndTransmitUserInputCapability->t ==
+ T_H245UserInputCapability_basicString) &&
+ (call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
+ {
+ call->jointDtmfMode |= OO_CAP_DTMF_H245_alphanumeric;
+ return OO_OK;
+ }
+ else if((cap->u.receiveAndTransmitUserInputCapability->t ==
+ T_H245UserInputCapability_dtmf) &&
+ (call->dtmfmode & OO_CAP_DTMF_H245_signal))
+ {
+ call->jointDtmfMode |= OO_CAP_DTMF_H245_signal;
+ return OO_OK;
+ }
+
case T_H245Capability_receiveUserInputCapability:
if((cap->u.receiveUserInputCapability->t ==
T_H245UserInputCapability_basicString) &&
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.c (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.c Sat Feb 22 13:31:22 2014
@@ -2851,13 +2851,13 @@
{
OOTRACEERR1("Error: Gatekeeper error detected. Closing GkClient as "
"Gk mode is UseSpecifcGatekeeper\n");
- ooGkClientDestroy();
+ pGkClient->state = GkClientStopped;
return OO_FAILED;
}
else{
OOTRACEERR1("Error: Gatekeeper error detected. Closing GkClient. NEED"
" to implement recovery by rediscovering another gk\n");
- ooGkClientDestroy();
+ pGkClient->state = GkClientStopped;
return OO_FAILED;
}
}
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.h
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.h?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.h (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooGkClient.h Sat Feb 22 13:31:22 2014
@@ -108,7 +108,8 @@
GkClientRegistered, /* registered with gk */
GkClientUnregistered,
GkClientGkErr,/*Gk is not responding, in discover mode can look for new GK*/
- GkClientFailed
+ GkClientFailed,
+ GkClientStopped
};
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooTimer.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooTimer.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooTimer.c (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooTimer.c Sat Feb 22 13:31:22 2014
@@ -17,7 +17,6 @@
#include "asterisk.h"
#include "asterisk/lock.h"
-#include "ootypes.h"
#include "ooDateTime.h"
#include "ooTimer.h"
#include "ootrace.h"
@@ -102,7 +101,6 @@
void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
{
OOTimer* pTimer;
- int ret = OO_OK;
while (pList->count > 0) {
pTimer = (OOTimer*) pList->head->data;
@@ -114,7 +112,7 @@
*/
if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
- ret = (*pTimer->timeoutCB)(pTimer->cbData);
+ (*pTimer->timeoutCB)(pTimer->cbData);
if (!pTimer->reRegister) {
ooTimerDelete (pctxt, pList, pTimer);
@@ -122,8 +120,6 @@
}
else break;
}
-
- return (void)ret;
}
int ooTimerInsertEntry (OOCTXT* pctxt, DList *pList, OOTimer* pTimer)
Modified: team/moy/webrtc-11/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/oochannels.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/oochannels.c (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/oochannels.c Sat Feb 22 13:31:22 2014
@@ -603,11 +603,7 @@
if(gH323ep.gkClient->state == GkClientFailed ||
gH323ep.gkClient->state == GkClientGkErr)
{
- if(ooGkClientHandleClientOrGkFailure(gH323ep.gkClient)!=OO_OK)
- {
- //ooStopMonitorCalls(); //Function calling ooProcessFDSETsAndTimers is responsible for this.
- return OO_FAILED;
- }
+ ooGkClientHandleClientOrGkFailure(gH323ep.gkClient);
}
}
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooh245.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooh245.c (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooh245.c Sat Feb 22 13:31:22 2014
@@ -713,8 +713,8 @@
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
- entry->capability.t = T_H245Capability_receiveUserInputCapability;
- entry->capability.u.receiveUserInputCapability = userInputCap;
+ entry->capability.t = T_H245Capability_receiveAndTransmitUserInputCapability;
+ entry->capability.u.receiveAndTransmitUserInputCapability = userInputCap;
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
@@ -749,8 +749,8 @@
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
- entry->capability.t = T_H245Capability_receiveUserInputCapability;
- entry->capability.u.receiveUserInputCapability = userInputCap;
+ entry->capability.t = T_H245Capability_receiveAndTransmitUserInputCapability;
+ entry->capability.u.receiveAndTransmitUserInputCapability = userInputCap;
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
Modified: team/moy/webrtc-11/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/addons/ooh323c/src/ooh323.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/addons/ooh323c/src/ooh323.c (original)
+++ team/moy/webrtc-11/addons/ooh323c/src/ooh323.c Sat Feb 22 13:31:22 2014
@@ -535,11 +535,13 @@
}
}
+/* Allow sourceCallSignallAddress different with socket IP for gk routed calls */
if (strncmp(remoteIP, call->remoteIP, strlen(remoteIP))) {
- OOTRACEERR5("ERROR: Security denial remote sig IP isn't a socket ip, %s not %s "
- "(%s, %s)\n", remoteIP, call->remoteIP, call->callType,
- call->callToken);
- return OO_FAILED;
+ if(!gH323ep.gkClient || OO_TESTFLAG(call->flags, OO_M_DISABLEGK) || (gH323ep.gkClient->state != GkClientRegistered)) {
+ OOTRACEERR5("ERROR: Security denial remote sig IP isn't a socket ip, %s not %s "
+ "(%s, %s)\n", remoteIP, call->remoteIP, call->callType, call->callToken);
+ return OO_FAILED;
+ }
}
/* check for fast start */
Modified: team/moy/webrtc-11/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/apps/app_chanspy.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/apps/app_chanspy.c (original)
+++ team/moy/webrtc-11/apps/app_chanspy.c Sat Feb 22 13:31:22 2014
@@ -158,7 +158,9 @@
</option>
<option name="x">
<argument name="digit" required="true">
- <para>Specify a DTMF digit that can be used to exit the application.</para>
+ <para>Specify a DTMF digit that can be used to exit the application while actively
+ spying on a channel. If there is no channel being spied on, the DTMF digit will be
+ ignored.</para>
</argument>
</option>
<option name="X">
@@ -295,7 +297,9 @@
</option>
<option name="x">
<argument name="digit" required="true">
- <para>Specify a DTMF digit that can be used to exit the application.</para>
+ <para>Specify a DTMF digit that can be used to exit the application while actively
+ spying on a channel. If there is no channel being spied on, the DTMF digit will be
+ ignored.</para>
</argument>
</option>
<option name="X">
@@ -363,7 +367,7 @@
OPTION_NAME = (1 << 12), /* Say the name of the person on whom we will spy */
OPTION_DTMF_SWITCH_MODES = (1 << 13), /* Allow numeric DTMF to switch between chanspy modes */
OPTION_DTMF_EXIT = (1 << 14), /* Set DTMF to exit, added for DAHDIScan integration */
- OPTION_DTMF_CYCLE = (1 << 15), /* Custom DTMF for cycling next avaliable channel, (default is '*') */
+ OPTION_DTMF_CYCLE = (1 << 15), /* Custom DTMF for cycling next available channel, (default is '*') */
OPTION_DAHDI_SCAN = (1 << 16), /* Scan groups in DAHDIScan mode */
OPTION_STOP = (1 << 17),
OPTION_EXITONHANGUP = (1 << 18), /* Hang up when the spied-on channel hangs up. */
Modified: team/moy/webrtc-11/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-11/apps/app_confbridge.c?view=diff&rev=408854&r1=408853&r2=408854
==============================================================================
--- team/moy/webrtc-11/apps/app_confbridge.c (original)
+++ team/moy/webrtc-11/apps/app_confbridge.c Sat Feb 22 13:31:22 2014
@@ -182,7 +182,9 @@
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Conference" required="true" />
- <parameter name="Channel" required="true" />
+ <parameter name="Channel" required="true">
+ <para>If this parameter is not a complete channel name, the first channel with this prefix will be used.</para>
+ </parameter>
</syntax>
<description>
</description>
@@ -194,7 +196,9 @@
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Conference" required="true" />
- <parameter name="Channel" required="true" />
+ <parameter name="Channel" required="true">
+ <para>If this parameter is not a complete channel name, the first channel with this prefix will be used.</para>
+ </parameter>
</syntax>
<description>
</description>
@@ -264,7 +268,9 @@
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Conference" required="true" />
- <parameter name="Channel" required="true" />
+ <parameter name="Channel" required="true">
+ <para>If this parameter is not a complete channel name, the first channel with this prefix will be used.</para>
+ </parameter>
</syntax>
<description>
</description>
@@ -365,6 +371,8 @@
return S_OR(custom_sounds->participantsmuted, "conf-now-muted");
case CONF_SOUND_PARTICIPANTS_UNMUTED:
return S_OR(custom_sounds->participantsunmuted, "conf-now-unmuted");
+ case CONF_SOUND_BEGIN:
+ return S_OR(custom_sounds->begin, "confbridge-conf-begin");
}
return "";
@@ -960,6 +968,32 @@
return 0;
}
+void conf_update_user_mute(struct conference_bridge_user *user)
+{
+ int mute_user;
+ int mute_system;
+ int mute_effective;
+
+ /* User level mute request. */
+ mute_user = user->muted;
+
+ /* System level mute request. */
+ mute_system = user->playing_moh
+ /*
+ * Do not allow waitmarked users to talk to anyone unless there
+ * is a marked user present.
+ */
+ || (!user->conference_bridge->markedusers
+ && ast_test_flag(&user->u_profile, USER_OPT_WAITMARKED));
+
+ mute_effective = mute_user || mute_system;
+
+ ast_debug(1, "User %s is %s: user:%d system:%d.\n",
+ ast_channel_name(user->chan), mute_effective ? "muted" : "unmuted",
+ mute_user, mute_system);
+ user->features.mute = mute_effective;
+}
+
void conf_moh_stop(struct conference_bridge_user *user)
{
user->playing_moh = 0;
@@ -1048,14 +1082,6 @@
ao2_unlock(user->conference_bridge);
}
-int conf_handle_first_marked_common(struct conference_bridge_user *cbu)
-{
- if (!ast_test_flag(&cbu->u_profile, USER_OPT_QUIET) && play_prompt_to_user(cbu, conf_get_sound(CONF_SOUND_PLACE_IN_CONF, cbu->b_profile.sounds))) {
- return -1;
- }
- return 0;
-}
-
int conf_handle_inactive_waitmarked(struct conference_bridge_user *cbu)
{
/* If we have not been quieted play back that they are waiting for the leader */
@@ -1105,9 +1131,7 @@
if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD)) {
conf_moh_stop(first_participant);
}
- if (!ast_test_flag(&first_participant->u_profile, USER_OPT_STARTMUTED)) {
- first_participant->features.mute = 0;
- }
+ conf_update_user_mute(first_participant);
}
void conf_ended(struct conference_bridge *conference_bridge)
@@ -1558,7 +1582,7 @@
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (conference name[,options])\n", app);
- res = -1; /* invalid PIN */
+ res = -1;
goto confbridge_cleanup;
}
@@ -1609,7 +1633,7 @@
if (conf_set_menu_to_user(conference_bridge_user.menu_name, &conference_bridge_user)) {
ast_log(LOG_WARNING, "Conference menu %s does not exist and can not be applied to confbridge user.\n",
args.menu_name);
- res = -1; /* invalid PIN */
+ res = -1;
goto confbridge_cleanup;
}
}
@@ -1631,7 +1655,7 @@
if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_TALKER_DETECT)) {
char *conf_name = ast_strdup(args.conf_name); /* this is freed during feature cleanup */
if (!(conf_name)) {
- res = -1; /* invalid PIN */
+ res = -1;
goto confbridge_cleanup;
}
ast_bridge_features_set_talk_detector(&conference_bridge_user.features,
@@ -1642,7 +1666,7 @@
/* Look for a conference bridge matching the provided name */
if (!(conference_bridge = join_conference_bridge(args.conf_name, &conference_bridge_user))) {
- res = -1; /* invalid PIN */
+ res = -1;
goto confbridge_cleanup;
}
@@ -1652,7 +1676,8 @@
/* If the caller should be joined already muted, make it so */
if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_STARTMUTED)) {
- conference_bridge_user.features.mute = 1;
+ /* Set user level mute request. */
+ conference_bridge_user.muted = 1;
}
if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_DROP_SILENCE)) {
@@ -1769,12 +1794,23 @@
struct conference_bridge_user *conference_bridge_user,
struct ast_channel *chan)
{
- /* Mute or unmute yourself, note we only allow manipulation if they aren't waiting for a marked user or if marked users exist */
- if (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_WAITMARKED) || conference_bridge->markedusers) {
- conference_bridge_user->features.mute = (!conference_bridge_user->features.mute ? 1 : 0);
- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(chan), conference_bridge_user->features.mute ? "muted" : "unmuted", conference_bridge_user->b_profile.name, ast_channel_name(chan));
- }
- return ast_stream_and_wait(chan, (conference_bridge_user->features.mute ?
+ int mute;
+
+ /* Toggle user level mute request. */
+ mute = !conference_bridge_user->muted;
+ conference_bridge_user->muted = mute;
+
+ conf_update_user_mute(conference_bridge_user);
+ ast_test_suite_event_notify("CONF_MUTE",
+ "Message: participant %s %s\r\n"
+ "Conference: %s\r\n"
+ "Channel: %s",
+ ast_channel_name(chan),
+ mute ? "muted" : "unmuted",
+ conference_bridge_user->b_profile.name,
+ ast_channel_name(chan));
+
+ return ast_stream_and_wait(chan, (mute ?
conf_get_sound(CONF_SOUND_MUTED, conference_bridge_user->b_profile.sounds) :
conf_get_sound(CONF_SOUND_UNMUTED, conference_bridge_user->b_profile.sounds)),
"");
@@ -1784,21 +1820,26 @@
{
struct conference_bridge_user *participant = NULL;
const char *sound_to_play;
+ int mute;
ao2_lock(conference_bridge);
- /* If already muted, then unmute */
- conference_bridge->muted = conference_bridge->muted ? 0 : 1;
- sound_to_play = conf_get_sound((conference_bridge->muted ? CONF_SOUND_PARTICIPANTS_MUTED : CONF_SOUND_PARTICIPANTS_UNMUTED),
- conference_bridge_user->b_profile.sounds);
+ /* Toggle bridge level mute request. */
+ mute = !conference_bridge->muted;
+ conference_bridge->muted = mute;
AST_LIST_TRAVERSE(&conference_bridge->active_list, participant, list) {
if (!ast_test_flag(&participant->u_profile, USER_OPT_ADMIN)) {
- participant->features.mute = conference_bridge->muted;
+ /* Set user level to bridge level mute request. */
+ participant->muted = mute;
+ conf_update_user_mute(participant);
}
}
ao2_unlock(conference_bridge);
+
+ sound_to_play = conf_get_sound((mute ? CONF_SOUND_PARTICIPANTS_MUTED : CONF_SOUND_PARTICIPANTS_UNMUTED),
+ conference_bridge_user->b_profile.sounds);
/* The host needs to hear it seperately, as they don't get the audio from play_sound_helper */
ast_stream_and_wait(conference_bridge_user->chan, sound_to_play, "");
@@ -1920,7 +1961,7 @@
ast_stream_and_wait(bridge_channel->chan,
conf_get_sound(CONF_SOUND_ERROR_MENU, conference_bridge_user->b_profile.sounds),
"");
- } else if (last_participant) {
+ } else if (last_participant && !last_participant->kicked) {
last_participant->kicked = 1;
ast_bridge_remove(conference_bridge->bridge, last_participant->chan);
ao2_unlock(conference_bridge);
@@ -2098,7 +2139,7 @@
ao2_lock(bridge);
AST_LIST_TRAVERSE(&bridge->active_list, participant, list) {
- if (!strcasecmp(ast_channel_name(participant->chan), channel)) {
+ if (!strcasecmp(ast_channel_name(participant->chan), channel) && !participant->kicked) {
participant->kicked = 1;
ast_bridge_remove(bridge->bridge, participant->chan);
ao2_unlock(bridge);
@@ -2106,7 +2147,7 @@
}
}
AST_LIST_TRAVERSE(&bridge->waiting_list, participant, list) {
- if (!strcasecmp(ast_channel_name(participant->chan), channel)) {
+ if (!strcasecmp(ast_channel_name(participant->chan), channel) && !participant->kicked) {
participant->kicked = 1;
ast_bridge_remove(bridge->bridge, participant->chan);
ao2_unlock(bridge);
@@ -2219,12 +2260,14 @@
static void handle_cli_confbridge_list_item(struct ast_cli_args *a, struct conference_bridge_user *participant)
{
- ast_cli(a->fd, "%-29s ", ast_channel_name(participant->chan));
- ast_cli(a->fd, "%-17s", participant->u_profile.name);
[... 9713 lines stripped ...]
More information about the asterisk-commits
mailing list