[asterisk-commits] oej: branch group/pine-multiple-externip-trunk r318054 - in /team/group/pine-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 7 12:26:35 CDT 2011


Author: oej
Date: Sat May  7 12:26:17 2011
New Revision: 318054

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=318054
Log:
Reset automerge

Added:
    team/group/pine-multiple-externip-trunk/contrib/scripts/import-cdr-csv-mysql.pl
      - copied unchanged from r318019, trunk/contrib/scripts/import-cdr-csv-mysql.pl
Modified:
    team/group/pine-multiple-externip-trunk/   (props changed)
    team/group/pine-multiple-externip-trunk/CHANGES
    team/group/pine-multiple-externip-trunk/Makefile
    team/group/pine-multiple-externip-trunk/UPGRADE.txt
    team/group/pine-multiple-externip-trunk/addons/app_mysql.c
    team/group/pine-multiple-externip-trunk/addons/cdr_mysql.c
    team/group/pine-multiple-externip-trunk/addons/res_config_mysql.c
    team/group/pine-multiple-externip-trunk/apps/app_chanspy.c
    team/group/pine-multiple-externip-trunk/apps/app_meetme.c
    team/group/pine-multiple-externip-trunk/apps/app_queue.c
    team/group/pine-multiple-externip-trunk/apps/app_rpt.c
    team/group/pine-multiple-externip-trunk/apps/app_userevent.c
    team/group/pine-multiple-externip-trunk/apps/app_voicemail.c
    team/group/pine-multiple-externip-trunk/autoconf/ast_check_pwlib.m4
    team/group/pine-multiple-externip-trunk/bridges/bridge_softmix.c
    team/group/pine-multiple-externip-trunk/cdr/cdr_radius.c
    team/group/pine-multiple-externip-trunk/cdr/cdr_syslog.c
    team/group/pine-multiple-externip-trunk/cel/cel_pgsql.c
    team/group/pine-multiple-externip-trunk/channels/chan_alsa.c
    team/group/pine-multiple-externip-trunk/channels/chan_console.c
    team/group/pine-multiple-externip-trunk/channels/chan_dahdi.c
    team/group/pine-multiple-externip-trunk/channels/chan_h323.c
    team/group/pine-multiple-externip-trunk/channels/chan_iax2.c
    team/group/pine-multiple-externip-trunk/channels/chan_jingle.c
    team/group/pine-multiple-externip-trunk/channels/chan_mgcp.c
    team/group/pine-multiple-externip-trunk/channels/chan_oss.c
    team/group/pine-multiple-externip-trunk/channels/chan_sip.c
    team/group/pine-multiple-externip-trunk/channels/chan_skinny.c
    team/group/pine-multiple-externip-trunk/channels/chan_unistim.c
    team/group/pine-multiple-externip-trunk/channels/chan_usbradio.c
    team/group/pine-multiple-externip-trunk/channels/iax2-provision.c
    team/group/pine-multiple-externip-trunk/channels/misdn_config.c
    team/group/pine-multiple-externip-trunk/channels/sip/sdp_crypto.c
    team/group/pine-multiple-externip-trunk/configs/cel.conf.sample
    team/group/pine-multiple-externip-trunk/configs/cel_pgsql.conf.sample
    team/group/pine-multiple-externip-trunk/configs/extensions.lua.sample
    team/group/pine-multiple-externip-trunk/configure
    team/group/pine-multiple-externip-trunk/contrib/realtime/mysql/meetme.sql
    team/group/pine-multiple-externip-trunk/contrib/realtime/mysql/queue_log.sql
    team/group/pine-multiple-externip-trunk/contrib/realtime/mysql/sipfriends.sql
    team/group/pine-multiple-externip-trunk/contrib/scripts/safe_asterisk
    team/group/pine-multiple-externip-trunk/funcs/func_jitterbuffer.c
    team/group/pine-multiple-externip-trunk/main/asterisk.c
    team/group/pine-multiple-externip-trunk/main/astobj2.c
    team/group/pine-multiple-externip-trunk/main/dsp.c
    team/group/pine-multiple-externip-trunk/main/http.c
    team/group/pine-multiple-externip-trunk/main/manager.c
    team/group/pine-multiple-externip-trunk/main/pbx.c
    team/group/pine-multiple-externip-trunk/main/utils.c
    team/group/pine-multiple-externip-trunk/pbx/pbx_dundi.c
    team/group/pine-multiple-externip-trunk/pbx/pbx_lua.c
    team/group/pine-multiple-externip-trunk/res/res_calendar.c
    team/group/pine-multiple-externip-trunk/res/res_config_odbc.c
    team/group/pine-multiple-externip-trunk/res/res_config_sqlite.c
    team/group/pine-multiple-externip-trunk/res/res_crypto.c
    team/group/pine-multiple-externip-trunk/res/res_jabber.c
    team/group/pine-multiple-externip-trunk/res/res_rtp_asterisk.c

Propchange: team/group/pine-multiple-externip-trunk/
------------------------------------------------------------------------------
    automerge = http://www.codename-pineapple.org/

Propchange: team/group/pine-multiple-externip-trunk/
------------------------------------------------------------------------------
--- branch-1.8-blocked (original)
+++ branch-1.8-blocked Sat May  7 12:26:17 2011
@@ -1,1 +1,1 @@
-/branches/1.8:299531,313436
+/branches/1.8:299531,313436,317858,317861

Propchange: team/group/pine-multiple-externip-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/group/pine-multiple-externip-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May  7 12:26:17 2011
@@ -1,1 +1,1 @@
-/trunk:1-316350
+/trunk:1-318053

Modified: team/group/pine-multiple-externip-trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/CHANGES?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/CHANGES (original)
+++ team/group/pine-multiple-externip-trunk/CHANGES Sat May  7 12:26:17 2011
@@ -26,6 +26,7 @@
  * DAHDIShowChannels, SIPshowpeer, SIPpeers, and IAXpeers now contains a
    Description field that is set by 'description' in the channel configuration
    file.
+ * Added Uniqueid header to UserEvent.
 
 Asterisk HTTP Server
 --------------------------
@@ -93,6 +94,8 @@
 --------------------------
  * Added setvar option to calendar.conf to allow setting channel variables on
    notification channels.
+ * Added "calendar show types" CLI command to list registered calendar
+   connectors.
 
 MixMonitor
 --------------------------
@@ -106,6 +109,24 @@
  * Added a new option, l, which will disable local call optimization for
    channels involved with the FollowMe thread.  Use this option to improve
    compatability for a FollowMe call with certain dialplan apps, options, and
+   functions.
+
+CEL
+--------------------------
+ * cel_pgsql now supports the 'extra' column for data added using the
+   CELGenUserEvent() application.
+
+pbx_lua
+--------------------------
+ * Support for defining hints has been added to pbx_lua.  See the 'hints' table
+   in the sample extensions.lua file for syntax details.
+ * Applications that perform jumps in the dialplan such as Goto will now
+   execute properly.  When pbx_lua detects that the context, extension, or
+   priority we are executing on has changed it will immediatly return control
+   to the asterisk PBX engine.  Currently the engine cannot detect a Goto to
+   the priority after the currently executing priority.
+ * An autoservice is now started by default for pbx_lua channels.  It can be
+   stopped and restarted using the autoservice_stop() and autoservice_start()
    functions.
 
 ------------------------------------------------------------------------------

Modified: team/group/pine-multiple-externip-trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/Makefile?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/Makefile (original)
+++ team/group/pine-multiple-externip-trunk/Makefile Sat May  7 12:26:17 2011
@@ -545,7 +545,6 @@
 	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)"
 	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cdr-csv"
 	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cdr-custom"
-	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cel-csv"
 	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cel-custom"
 	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)"
 	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/documentation"
@@ -925,7 +924,7 @@
 menuselect/makeopts: makeopts
 	+$(MAKE_MENUSELECT) makeopts
 
-menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml utils/utils.xml agi/agi.xml configure
+menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml utils/utils.xml agi/agi.xml configure makeopts
 	@echo "Generating input for menuselect ..."
 	@echo "<?xml version=\"1.0\"?>" > $@
 	@echo >> $@

Modified: team/group/pine-multiple-externip-trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/UPGRADE.txt?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/UPGRADE.txt (original)
+++ team/group/pine-multiple-externip-trunk/UPGRADE.txt Sat May  7 12:26:17 2011
@@ -21,6 +21,10 @@
 
 From 1.8 to 1.10:
 
+cel_pgsql:
+ - This module now expects an 'extra' column in the database for data added
+   using the CELGenUserEvent() application.
+
 ConfBridge
  - ConfBridge's dialplan arguments have changed and are not
    backwards compatible.
@@ -38,5 +42,13 @@
  - The mohinterpret=passthrough setting is deprecated in favor of
    moh_signaling=notify.
 
+pbx_lua:
+ - Execution no longer continues after applications that do dialplan jumps
+   (such as app.goto).  Now when an application such as app.goto() is called,
+   control is returned back to the pbx engine and the current extension
+   function stops executing.
+ - the autoservice now defaults to being on by default
+ - autoservice_start() and autoservice_start() no longer return a value.
+
 ===========================================================
 ===========================================================

Modified: team/group/pine-multiple-externip-trunk/addons/app_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/addons/app_mysql.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/addons/app_mysql.c (original)
+++ team/group/pine-multiple-externip-trunk/addons/app_mysql.c Sat May  7 12:26:17 2011
@@ -546,7 +546,10 @@
 	result = 0;
 
 	if (autoclear) {
-		struct ast_datastore *mysql_store = ast_channel_datastore_find(chan, &mysql_ds_info, NULL);
+		struct ast_datastore *mysql_store = NULL;
+
+		ast_channel_lock(chan);
+		mysql_store = ast_channel_datastore_find(chan, &mysql_ds_info, NULL);
 		if (!mysql_store) {
 			if (!(mysql_store = ast_datastore_alloc(&mysql_ds_info, NULL))) {
 				ast_log(LOG_WARNING, "Unable to allocate new datastore.\n");
@@ -555,6 +558,7 @@
 				ast_channel_datastore_add(chan, mysql_store);
 			}
 		}
+		ast_channel_unlock(chan);
 	}
 	ast_mutex_lock(&_mysql_mutex);
 

Modified: team/group/pine-multiple-externip-trunk/addons/cdr_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/addons/cdr_mysql.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/addons/cdr_mysql.c (original)
+++ team/group/pine-multiple-externip-trunk/addons/cdr_mysql.c Sat May  7 12:26:17 2011
@@ -325,7 +325,7 @@
 				ast_str_make_space(&escape, (valsz = strlen(value)) * 2 + 1);
 				mysql_real_escape_string(&mysql, ast_str_buffer(escape), value, valsz);
 
-				ast_str_append(&sql1, 0, "%s", entry->name);
+				ast_str_append(&sql1, 0, "`%s`", entry->name);
 				ast_str_append(&sql2, 0, "'%s'", ast_str_buffer(escape));
 			}
 		}

Modified: team/group/pine-multiple-externip-trunk/addons/res_config_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/addons/res_config_mysql.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/addons/res_config_mysql.c (original)
+++ team/group/pine-multiple-externip-trunk/addons/res_config_mysql.c Sat May  7 12:26:17 2011
@@ -398,7 +398,7 @@
 				} else if (ast_strlen_zero(row[i])) {
 					row[i] = " ";
 				}
-				for (stringp = ast_strdupa(row[i]), chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
+				for (stringp = row[i], chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
 					if (prev) {
 						if ((prev->next = ast_variable_new(fields[i].name, decode_chunk(chunk), ""))) {
 							prev = prev->next;
@@ -524,7 +524,7 @@
 			for (i = 0; i < numFields; i++) {
 				if (ast_strlen_zero(row[i]))
 					continue;
-				for (stringp = ast_strdupa(row[i]), chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
+				for (stringp = row[i], chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
 					if (chunk && !ast_strlen_zero(decode_chunk(ast_strip(chunk)))) {
 						if (initfield && !strcmp(initfield, fields[i].name)) {
 							ast_category_rename(cat, chunk);
@@ -608,7 +608,7 @@
 	   If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */
 
 	ESCAPE_STRING(buf, newval);
-	ast_str_set(&sql, 0, "UPDATE %s SET %s = '%s'", tablename, newparam, ast_str_buffer(buf));
+	ast_str_set(&sql, 0, "UPDATE %s SET `%s` = '%s'", tablename, newparam, ast_str_buffer(buf));
 
 	/* If the column length isn't long enough, give a chance to lengthen it. */
 	if (strncmp(column->type, "char", 4) == 0 || strncmp(column->type, "varchar", 7) == 0) {
@@ -625,7 +625,7 @@
 		}
 
 		ESCAPE_STRING(buf, newval);
-		ast_str_append(&sql, 0, ", %s = '%s'", newparam, ast_str_buffer(buf));
+		ast_str_append(&sql, 0, ", `%s` = '%s'", newparam, ast_str_buffer(buf));
 
 		/* If the column length isn't long enough, give a chance to lengthen it. */
 		if (strncmp(column->type, "char", 4) == 0 || strncmp(column->type, "varchar", 7) == 0) {
@@ -635,7 +635,7 @@
 	va_end(ap);
 
 	ESCAPE_STRING(buf, lookup);
-	ast_str_append(&sql, 0, " WHERE %s = '%s'", keyfield, ast_str_buffer(buf));
+	ast_str_append(&sql, 0, " WHERE `%s` = '%s'", keyfield, ast_str_buffer(buf));
 
 	ast_debug(1, "MySQL RealTime: Update SQL: %s\n", ast_str_buffer(sql));
 
@@ -719,7 +719,7 @@
 			return -1;
 		}
 		ESCAPE_STRING(buf, newval);
-		ast_str_append(&where, 0, "%s %s='%s'", first ? "" : " AND", newparam, ast_str_buffer(buf));
+		ast_str_append(&where, 0, "%s `%s` = '%s'", first ? "" : " AND", newparam, ast_str_buffer(buf));
 		first = 0;
 
 		/* If the column length isn't long enough, give a chance to lengthen it. */
@@ -744,7 +744,7 @@
 		}
 
 		ESCAPE_STRING(buf, newval);
-		ast_str_append(&sql, 0, "%s %s = '%s'", first ? "" : ",", newparam, ast_str_buffer(buf));
+		ast_str_append(&sql, 0, "%s `%s` = '%s'", first ? "" : ",", newparam, ast_str_buffer(buf));
 		first = 0;
 
 		/* If the column length isn't long enough, give a chance to lengthen it. */
@@ -816,7 +816,7 @@
 	/* Create the first part of the query using the first parameter/value pairs we just extracted
 		If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */
 	ESCAPE_STRING(buf, newval);
-	ast_str_set(&sql, 0, "INSERT INTO %s (%s", table, newparam);
+	ast_str_set(&sql, 0, "INSERT INTO %s (`%s`", table, newparam);
 	ast_str_set(&sql2, 0, ") VALUES ('%s'", ast_str_buffer(buf));
 
 	internal_require(database, table, newparam, RQ_CHAR, ast_str_strlen(buf), SENTINEL);
@@ -828,7 +828,7 @@
 			ast_str_reset(buf);
 		}
 		if (internal_require(database, table, newparam, RQ_CHAR, ast_str_strlen(buf), SENTINEL) == 0) {
-			ast_str_append(&sql, 0, ", %s", newparam);
+			ast_str_append(&sql, 0, ", `%s`", newparam);
 			ast_str_append(&sql2, 0, ", '%s'", ast_str_buffer(buf));
 		}
 	}
@@ -894,11 +894,11 @@
 	/* Create the first part of the query using the first parameter/value pairs we just extracted
 	   If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */
 	ESCAPE_STRING(buf, lookup);
-	ast_str_set(&sql, 0, "DELETE FROM %s WHERE %s = '%s'", table, keyfield, ast_str_buffer(buf));
+	ast_str_set(&sql, 0, "DELETE FROM %s WHERE `%s` = '%s'", table, keyfield, ast_str_buffer(buf));
 	while ((newparam = va_arg(ap, const char *))) {
 		newval = va_arg(ap, const char *);
 		ESCAPE_STRING(buf, newval);
-		ast_str_append(&sql, 0, " AND %s = '%s'", newparam, ast_str_buffer(buf));
+		ast_str_append(&sql, 0, " AND `%s` = '%s'", newparam, ast_str_buffer(buf));
 	}
 	va_end(ap);
 
@@ -1074,7 +1074,7 @@
 			res = -1;
 			break;
 		}
-		ast_str_set(&sql, 0, "ALTER TABLE %s MODIFY %s %s", tablename, column->name, ast_str_buffer(typestr));
+		ast_str_set(&sql, 0, "ALTER TABLE %s MODIFY `%s` %s", tablename, column->name, ast_str_buffer(typestr));
 		if (!column->null) {
 			ast_str_append(&sql, 0, " NOT NULL");
 		}

Modified: team/group/pine-multiple-externip-trunk/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/apps/app_chanspy.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/apps/app_chanspy.c (original)
+++ team/group/pine-multiple-externip-trunk/apps/app_chanspy.c Sat May  7 12:26:17 2011
@@ -404,6 +404,7 @@
 	struct ast_audiohook bridge_whisper_audiohook;
 	int fd;
 	int volfactor;
+	struct ast_flags flags;
 };
 
 struct spy_dtmf_options {
@@ -438,7 +439,7 @@
 		return -1;
 	}
 
-	if (ast_test_flag(&csth->spy_audiohook, OPTION_READONLY)) {
+	if (ast_test_flag(&csth->flags, OPTION_READONLY)) {
 		/* Option 'o' was set, so don't mix channel audio */
 		f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_READ, &format_slin);
 	} else {
@@ -539,7 +540,7 @@
 			spyer_name, name);
 
 	memset(&csth, 0, sizeof(csth));
-	ast_copy_flags(&csth.spy_audiohook, flags, AST_FLAGS_ALL);
+	ast_copy_flags(&csth.flags, flags, AST_FLAGS_ALL);
 
 	ast_audiohook_init(&csth.spy_audiohook, AST_AUDIOHOOK_TYPE_SPY, "ChanSpy", 0);
 

Modified: team/group/pine-multiple-externip-trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/apps/app_meetme.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/apps/app_meetme.c (original)
+++ team/group/pine-multiple-externip-trunk/apps/app_meetme.c Sat May  7 12:26:17 2011
@@ -2246,7 +2246,6 @@
 	int talkreq_manager = 0;
 	int using_pseudo = 0;
 	int duration = 20;
-	int hr, min, sec;
 	int sent_event = 0;
 	int checked = 0;
 	int announcement_played = 0;
@@ -2733,7 +2732,7 @@
 		ao2_ref(item, -1);
 	}
 
-	if (ast_test_flag64(confflags, CONFFLAG_WAITMARKED && !conf->markedusers))
+	if (ast_test_flag64(confflags, CONFFLAG_WAITMARKED) && !conf->markedusers)
 		dahdic.confmode = DAHDI_CONF_CONF;
 	else if (ast_test_flag64(confflags, CONFFLAG_MONITOR))
 		dahdic.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
@@ -2918,6 +2917,11 @@
  						res = ast_streamfile(chan, user->end_sound, chan->language);
  						res = ast_waitstream(chan, "");
  					}
+					if (ast_test_flag64(confflags, CONFFLAG_KICK_CONTINUE)) {
+						ret = 0;
+					} else {
+						ret = -1;
+					}
  					break;
  				}
  				
@@ -3803,9 +3807,6 @@
 	if (user->user_no) {
 		/* Only cleanup users who really joined! */
 		now = ast_tvnow();
-		hr = (now.tv_sec - user->jointime) / 3600;
-		min = ((now.tv_sec - user->jointime) % 3600) / 60;
-		sec = (now.tv_sec - user->jointime) % 60;
 
 		if (sent_event) {
 			ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeLeave",
@@ -3907,7 +3908,7 @@
 			ast_localtime(&now, &tm, NULL);
 			ast_strftime(currenttime, sizeof(currenttime), DATE_FORMAT, &tm);
 
-			ast_debug(1, "Looking for conference %s that starts after %s\n", confno, eatime);
+			ast_debug(1, "Looking for conference %s that starts after %s\n", confno, currenttime);
 
 			var = ast_load_realtime("meetme", "confno",
 				confno, "starttime <= ", currenttime, "endtime >= ",
@@ -6454,7 +6455,6 @@
 		AST_APP_ARG(options);
 	);
 	char *opts[SLA_TRUNK_OPT_ARG_ARRAY_SIZE] = { NULL, };
-	char *conf_opt_args[OPT_ARG_ARRAY_SIZE] = { NULL, };
 	struct ast_flags opt_flags = { 0 };
 	char *parse;
 
@@ -6517,7 +6517,6 @@
 	if (ast_test_flag(&opt_flags, SLA_TRUNK_OPT_MOH)) {
 		ast_indicate(chan, -1);
 		ast_set_flag64(&conf_flags, CONFFLAG_MOH);
-		conf_opt_args[OPT_ARG_MOH_CLASS] = opts[SLA_TRUNK_OPT_ARG_MOH_CLASS];
 	} else
 		ast_indicate(chan, AST_CONTROL_RINGING);
 

Modified: team/group/pine-multiple-externip-trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/apps/app_queue.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/apps/app_queue.c (original)
+++ team/group/pine-multiple-externip-trunk/apps/app_queue.c Sat May  7 12:26:17 2011
@@ -999,7 +999,7 @@
 struct queue_ent {
 	struct call_queue *parent;             /*!< What queue is our parent */
 	char moh[80];                          /*!< Name of musiconhold to be used */
-	char announce[80];                     /*!< Announcement to play for member when call is answered */
+	char announce[PATH_MAX];               /*!< Announcement to play for member when call is answered */
 	char context[AST_MAX_CONTEXT];         /*!< Context when user exits queue */
 	char digits[AST_MAX_EXTENSION];        /*!< Digits entered while in queue */
 	int valid_digits;                      /*!< Digits entered correspond to valid extension. Exited */
@@ -4566,6 +4566,17 @@
 	if (need_weight)
 		ao2_unlock(queues);
 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed, update_connectedline);
+	/* The ast_channel_datastore_remove() function could fail here if the
+	 * datastore was moved to another channel during a masquerade. If this is
+	 * the case, don't free the datastore here because later, when the channel
+	 * to which the datastore was moved hangs up, it will attempt to free this
+	 * datastore again, causing a crash
+	 */
+	ast_channel_lock(qe->chan);
+	if (datastore && !ast_channel_datastore_remove(qe->chan, datastore)) {
+		ast_datastore_free(datastore);
+	}
+	ast_channel_unlock(qe->chan);
 	ao2_lock(qe->parent);
 	if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY || qe->parent->strategy == QUEUE_STRATEGY_RRORDERED) {
 		store_next_rr(qe, outgoing);

Modified: team/group/pine-multiple-externip-trunk/apps/app_rpt.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/apps/app_rpt.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/apps/app_rpt.c (original)
+++ team/group/pine-multiple-externip-trunk/apps/app_rpt.c Sat May  7 12:26:17 2011
@@ -1975,7 +1975,11 @@
 		return;
 	}
 	n = finddelim(astr,astrs,100);
-	if (n < 1) return;
+	if (n < 1) {
+		ast_free(str);
+		ast_free(astr);
+		return;
+	}
 	ast_mutex_lock(&myrpt->statpost_lock);
 	seq = ++myrpt->statpost_seqno;
 	ast_mutex_unlock(&myrpt->statpost_lock);
@@ -12218,7 +12222,7 @@
 						// ctcss code autopatch initiate
 						if (strstr((char *)f->data.ptr,"/M/")&& !myrpt->macropatch)
 						{
-						    char value[16];
+							char value[16] = "";
 							strcat(value,"*6");
 							myrpt->macropatch=1;
 							rpt_mutex_lock(&myrpt->lock);

Modified: team/group/pine-multiple-externip-trunk/apps/app_userevent.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/apps/app_userevent.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/apps/app_userevent.c (original)
+++ team/group/pine-multiple-externip-trunk/apps/app_userevent.c Sat May  7 12:26:17 2011
@@ -85,7 +85,12 @@
 		ast_str_append(&body, 0, "%s\r\n", args.extra[x]);
 	}
 
-	manager_event(EVENT_FLAG_USER, "UserEvent", "UserEvent: %s\r\n%s", args.eventname, ast_str_buffer(body));
+	manager_event(EVENT_FLAG_USER, "UserEvent",
+			"UserEvent: %s\r\n"
+			"Uniqueid: %s\r\n"
+			"%s",
+			args.eventname, chan->uniqueid, ast_str_buffer(body));
+
 	ast_free(body);
 
 	return 0;

Modified: team/group/pine-multiple-externip-trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/apps/app_voicemail.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/apps/app_voicemail.c (original)
+++ team/group/pine-multiple-externip-trunk/apps/app_voicemail.c Sat May  7 12:26:17 2011
@@ -4734,6 +4734,7 @@
 	char fname[256];
 	char tmpcmd[256];
 	int tmpfd = -1;
+	int soxstatus = 0;
 
 	/* Eww. We want formats to tell us their own MIME type */
 	char *ctype = (!strcasecmp(format, "ogg")) ? "application/" : "audio/x-";
@@ -4745,7 +4746,6 @@
 		chmod(newtmp, VOICEMAIL_FILE_MODE & ~my_umask);
 		ast_debug(3, "newtmp: %s\n", newtmp);
 		if (tmpfd > -1) {
-			int soxstatus;
 			snprintf(tmpcmd, sizeof(tmpcmd), "sox -v %.4f %s.%s %s.%s", vmu->volgain, attach, format, newtmp, format);
 			if ((soxstatus = ast_safe_system(tmpcmd)) == 0) {
 				attach = newtmp;
@@ -4773,7 +4773,9 @@
 	if (last)
 		fprintf(p, ENDL ENDL "--%s--" ENDL "." ENDL, bound);
 	if (tmpfd > -1) {
-		unlink(fname);
+		if (soxstatus == 0) {
+			unlink(fname);
+		}
 		close(tmpfd);
 		unlink(newtmp);
 	}

Modified: team/group/pine-multiple-externip-trunk/autoconf/ast_check_pwlib.m4
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/autoconf/ast_check_pwlib.m4?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/autoconf/ast_check_pwlib.m4 (original)
+++ team/group/pine-multiple-externip-trunk/autoconf/ast_check_pwlib.m4 Sat May  7 12:26:17 2011
@@ -205,9 +205,9 @@
 		$2_VER=$((${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER}))
 		$2_REQ=$(($4*10000+$5*100+$6))
 		if test "x$10" = "x"; then
-			let $2_MAX=9999999
+			$2_MAX=9999999
 		else
-			let $2_MAX=$8*10000+$9*100+$10
+			$2_MAX=$(($8*10000+$9*100+$10))
 		fi
 
 		AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)

Modified: team/group/pine-multiple-externip-trunk/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/bridges/bridge_softmix.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/bridges/bridge_softmix.c (original)
+++ team/group/pine-multiple-externip-trunk/bridges/bridge_softmix.c Sat May  7 12:26:17 2011
@@ -429,15 +429,20 @@
 		bridge_channel->tech_args.silence_threshold :
 		DEFAULT_SOFTMIX_SILENCE_THRESHOLD;
 	char update_talking = -1;  /* if this is set to 0 or 1, tell the bridge that the channel has started or stopped talking. */
+	int res = AST_BRIDGE_WRITE_SUCCESS;
 
 	/* Only accept audio frames, all others are unsupported */
 	if (frame->frametype == AST_FRAME_DTMF_END || frame->frametype == AST_FRAME_DTMF_BEGIN) {
 		softmix_pass_dtmf(bridge, bridge_channel, frame);
-		return AST_BRIDGE_WRITE_SUCCESS;
+		goto no_audio;
 	} else if (frame->frametype != AST_FRAME_VOICE) {
-		return AST_BRIDGE_WRITE_UNSUPPORTED;
-	}
-
+		res = AST_BRIDGE_WRITE_UNSUPPORTED;
+		goto no_audio;
+	} else if (frame->datalen == 0) {
+		goto no_audio;
+	}
+
+	/* If we made it here, we are going to write the frame into the conference */
 	ast_mutex_lock(&sc->lock);
 
 	ast_dsp_silence(sc->dsp, frame, &totalsilence);
@@ -480,7 +485,20 @@
 		ast_bridge_notify_talking(bridge, bridge_channel, update_talking);
 	}
 
-	return AST_BRIDGE_WRITE_SUCCESS;
+	return res;
+
+no_audio:
+	/* Even though the frame is not being written into the conference because it is not audio,
+	 * we should use this opportunity to check to see if a frame is ready to be written out from
+	 * the conference to the channel. */
+	ast_mutex_lock(&sc->lock);
+	if (sc->have_frame) {
+		ast_write(bridge_channel->chan, &sc->write_frame);
+		sc->have_frame = 0;
+	}
+	ast_mutex_unlock(&sc->lock);
+
+	return res;
 }
 
 /*! \brief Function called when the channel's thread is poked */

Modified: team/group/pine-multiple-externip-trunk/cdr/cdr_radius.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/cdr/cdr_radius.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/cdr/cdr_radius.c (original)
+++ team/group/pine-multiple-externip-trunk/cdr/cdr_radius.c Sat May  7 12:26:17 2011
@@ -231,7 +231,6 @@
 {
 	struct ast_config *cfg;
 	struct ast_flags config_flags = { 0 };
-	int res;
 	const char *tmp;
 
 	if ((cfg = ast_config_load(cdr_config, config_flags)) && cfg != CONFIG_STATUS_FILEINVALID) {
@@ -259,7 +258,7 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
-	res = ast_cdr_register(name, desc, radius_log);
+	ast_cdr_register(name, desc, radius_log);
 	return AST_MODULE_LOAD_SUCCESS;
 }
 

Modified: team/group/pine-multiple-externip-trunk/cdr/cdr_syslog.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/cdr/cdr_syslog.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/cdr/cdr_syslog.c (original)
+++ team/group/pine-multiple-externip-trunk/cdr/cdr_syslog.c Sat May  7 12:26:17 2011
@@ -264,8 +264,10 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
-	free_config();
-	res = load_config(1);
+	if ((res = load_config(1))) {
+		free_config();
+	}
+
 	AST_RWLIST_UNLOCK(&sinks);
 
 	return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;

Modified: team/group/pine-multiple-externip-trunk/cel/cel_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/cel/cel_pgsql.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/cel/cel_pgsql.c (original)
+++ team/group/pine-multiple-externip-trunk/cel/cel_pgsql.c Sat May  7 12:26:17 2011
@@ -239,6 +239,8 @@
 					value = record.user_field;
 				} else if (strcmp(cur->name, "peer") == 0) {
 					value = record.peer;
+				} else if (strcmp(cur->name, "extra") == 0) {
+					value = record.extra;
 				} else {
 					value = NULL;
 				}
@@ -535,7 +537,6 @@
 static int my_load_module(int reload)
 {
 	struct ast_config *cfg;
-	int res;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
 	if ((cfg = ast_config_load(config, config_flags)) == NULL || cfg == CONFIG_STATUS_FILEINVALID) {
@@ -545,7 +546,7 @@
 		return AST_MODULE_LOAD_SUCCESS;
 	}
 
-	res = process_my_load_module(cfg);
+	process_my_load_module(cfg);
 	ast_config_destroy(cfg);
 
 	event_sub = ast_event_subscribe(AST_EVENT_CEL, pgsql_log, "CEL PGSQL backend", NULL, AST_EVENT_IE_END);

Modified: team/group/pine-multiple-externip-trunk/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_alsa.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_alsa.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_alsa.c Sat May  7 12:26:17 2011
@@ -57,13 +57,14 @@
 #include "asterisk/musiconhold.h"
 #include "asterisk/poll-compat.h"
 
-/*! Global jitterbuffer configuration - by default, jb is disabled */
+/*! Global jitterbuffer configuration - by default, jb is disabled
+ *  \note Values shown here match the defaults shown in alsa.conf.sample */
 static struct ast_jb_conf default_jbconf = {
 	.flags = 0,
-	.max_size = -1,
-	.resync_threshold = -1,
-	.impl = "",
-	.target_extra = -1,
+	.max_size = 200,
+	.resync_threshold = 1000,
+	.impl = "fixed",
+	.target_extra = 40,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: team/group/pine-multiple-externip-trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_console.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_console.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_console.c Sat May  7 12:26:17 2011
@@ -172,13 +172,14 @@
  * \brief Global jitterbuffer configuration 
  *
  * \note Disabled by default.
+ * \note Values shown here match the defaults shown in console.conf.sample
  */
 static struct ast_jb_conf default_jbconf = {
 	.flags = 0,
-	.max_size = -1,
-	.resync_threshold = -1,
-	.impl = "",
-	.target_extra = -1,
+	.max_size = 200,
+	.resync_threshold = 1000,
+	.impl = "fixed",
+	.target_extra = 40,
 };
 static struct ast_jb_conf global_jbconf;
 
@@ -725,7 +726,7 @@
 
 	unref_pvt(pvt);
 
-	return CLI_SUCCESS;
+	return res;
 }
 
 static char *cli_console_flash(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)

Modified: team/group/pine-multiple-externip-trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_dahdi.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_dahdi.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_dahdi.c Sat May  7 12:26:17 2011
@@ -280,14 +280,15 @@
 "-22.5db (CSU)"
 };
 
-/*! Global jitterbuffer configuration - by default, jb is disabled */
+/*! Global jitterbuffer configuration - by default, jb is disabled
+ *  \note Values shown here match the defaults shown in chan_dahdi.conf.sample */
 static struct ast_jb_conf default_jbconf =
 {
 	.flags = 0,
-	.max_size = -1,
-	.resync_threshold = -1,
-	.impl = "",
-	.target_extra = -1,
+	.max_size = 200,
+	.resync_threshold = 1000,
+	.impl = "fixed",
+	.target_extra = 40,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: team/group/pine-multiple-externip-trunk/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_h323.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_h323.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_h323.c Sat May  7 12:26:17 2011
@@ -114,14 +114,15 @@
 
 int h323debug; /*!< global debug flag */
 
-/*! \brief Global jitterbuffer configuration - by default, jb is disabled */
+/*! \brief Global jitterbuffer configuration - by default, jb is disabled
+ *  \note Values shown here match the defaults shown in h323.conf.sample */
 static struct ast_jb_conf default_jbconf =
 {
 	.flags = 0,
-	.max_size = -1,
-	.resync_threshold = -1,
-	.impl = "",
-	.target_extra = -1,
+	.max_size = 200,
+	.resync_threshold = 1000,
+	.impl = "fixed",
+	.target_extra = 40,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: team/group/pine-multiple-externip-trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_iax2.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_iax2.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_iax2.c Sat May  7 12:26:17 2011
@@ -6161,7 +6161,6 @@
 	struct iax2_trunk_peer *tpeer;
 	void *tmp, *ptr;
 	struct timeval now;
-	int res;
 	struct ast_iax2_meta_trunk_entry *met;
 	struct ast_iax2_meta_trunk_mini *mtm;
 
@@ -6217,7 +6216,7 @@
 		/* if we have enough for a full MTU, ship it now without waiting */
 		if (global_max_trunk_mtu > 0 && tpeer->trunkdatalen + f->datalen + 4 >= global_max_trunk_mtu) {
 			now = ast_tvnow();
-			res = send_trunk(tpeer, &now); 
+			send_trunk(tpeer, &now); 
 			trunk_untimed ++; 
 		}
 
@@ -9350,7 +9349,6 @@
 	struct iax_dual *d;
 	struct ast_frame *f;
 	int ext;
-	int res;
 	d = stuff;
 	chan1 = d->chan1;
 	chan2 = d->chan2;
@@ -9358,7 +9356,7 @@
 	f = ast_read(chan1);
 	if (f)
 		ast_frfree(f);
-	res = ast_park_call(chan1, chan2, 0, d->parkexten, &ext);
+	ast_park_call(chan1, chan2, 0, d->parkexten, &ext);
 	ast_hangup(chan2);
 	ast_log(LOG_NOTICE, "Parked on extension '%d'\n", ext);
 	return NULL;

Modified: team/group/pine-multiple-externip-trunk/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_jingle.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_jingle.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_jingle.c Sat May  7 12:26:17 2011
@@ -587,7 +587,6 @@
 	struct ast_sockaddr sin_tmp;
 	struct ast_sockaddr us_tmp;
 	struct ast_sockaddr bindaddr_tmp;
-	struct sockaddr_in dest;
 	struct in_addr us;
 	struct in_addr externaddr;
 	iks *iq, *jingle, *content, *transport, *candidate;
@@ -668,9 +667,6 @@
 		ours2 = NULL;
 	}
 	ours1 = NULL;
-	dest.sin_addr = __ourip;
-	dest.sin_port = sin.sin_port;
-
 
 	for (tmp = p->ourcandidates; tmp; tmp = tmp->next) {
 		snprintf(component, sizeof(component), "%u", tmp->component);

Modified: team/group/pine-multiple-externip-trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_mgcp.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_mgcp.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_mgcp.c Sat May  7 12:26:17 2011
@@ -93,14 +93,15 @@
 #define INADDR_NONE (in_addr_t)(-1)
 #endif
 
-/*! Global jitterbuffer configuration - by default, jb is disabled */
+/*! Global jitterbuffer configuration - by default, jb is disabled
+ *  \note Values shown here match the defaults shown in mgcp.conf.sample */
 static struct ast_jb_conf default_jbconf =
 {
 	.flags = 0,
-	.max_size = -1,
-	.resync_threshold = -1,
-	.impl = "",
-	.target_extra = -1,
+	.max_size = 200,
+	.resync_threshold = 1000,
+	.impl = "fixed",
+	.target_extra = 40,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: team/group/pine-multiple-externip-trunk/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_oss.c?view=diff&rev=318054&r1=318053&r2=318054
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_oss.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_oss.c Sat May  7 12:26:17 2011
@@ -65,14 +65,15 @@
 
 #include "console_video.h"
 
-/*! Global jitterbuffer configuration - by default, jb is disabled */
+/*! Global jitterbuffer configuration - by default, jb is disabled
+ *  \note Values shown here match the defaults shown in oss.conf.sample */
 static struct ast_jb_conf default_jbconf =
 {
 	.flags = 0,
-	.max_size = -1,

[... 3449 lines stripped ...]



More information about the asterisk-commits mailing list