[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r351026 - in /team/irroot/di...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 16 12:47:25 CST 2012


Author: irroot
Date: Mon Jan 16 12:47:00 2012
New Revision: 351026

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351026
Log:
Update Branch

Added:
    team/irroot/distrotech-customers-trunk/contrib/scripts/valgrind_compare
      - copied unchanged from r350936, trunk/contrib/scripts/valgrind_compare
    team/irroot/distrotech-customers-trunk/main/channel_internal_api.c
      - copied unchanged from r350936, trunk/main/channel_internal_api.c
Modified:
    team/irroot/distrotech-customers-trunk/   (props changed)
    team/irroot/distrotech-customers-trunk/CHANGES
    team/irroot/distrotech-customers-trunk/UPGRADE.txt
    team/irroot/distrotech-customers-trunk/addons/chan_mobile.c
    team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c
    team/irroot/distrotech-customers-trunk/apps/app_adsiprog.c
    team/irroot/distrotech-customers-trunk/apps/app_alarmreceiver.c
    team/irroot/distrotech-customers-trunk/apps/app_amd.c
    team/irroot/distrotech-customers-trunk/apps/app_authenticate.c
    team/irroot/distrotech-customers-trunk/apps/app_chanisavail.c
    team/irroot/distrotech-customers-trunk/apps/app_chanspy.c
    team/irroot/distrotech-customers-trunk/apps/app_confbridge.c
    team/irroot/distrotech-customers-trunk/apps/app_dahdibarge.c
    team/irroot/distrotech-customers-trunk/apps/app_dahdiras.c
    team/irroot/distrotech-customers-trunk/apps/app_dial.c
    team/irroot/distrotech-customers-trunk/apps/app_directed_pickup.c
    team/irroot/distrotech-customers-trunk/apps/app_disa.c
    team/irroot/distrotech-customers-trunk/apps/app_dumpchan.c
    team/irroot/distrotech-customers-trunk/apps/app_externalivr.c
    team/irroot/distrotech-customers-trunk/apps/app_fax.c
    team/irroot/distrotech-customers-trunk/apps/app_flash.c
    team/irroot/distrotech-customers-trunk/apps/app_followme.c
    team/irroot/distrotech-customers-trunk/apps/app_getcpeid.c
    team/irroot/distrotech-customers-trunk/apps/app_jack.c
    team/irroot/distrotech-customers-trunk/apps/app_macro.c
    team/irroot/distrotech-customers-trunk/apps/app_meetme.c
    team/irroot/distrotech-customers-trunk/apps/app_milliwatt.c
    team/irroot/distrotech-customers-trunk/apps/app_minivm.c
    team/irroot/distrotech-customers-trunk/apps/app_mixmonitor.c
    team/irroot/distrotech-customers-trunk/apps/app_originate.c
    team/irroot/distrotech-customers-trunk/apps/app_page.c
    team/irroot/distrotech-customers-trunk/apps/app_parkandannounce.c
    team/irroot/distrotech-customers-trunk/apps/app_playback.c
    team/irroot/distrotech-customers-trunk/apps/app_queue.c
    team/irroot/distrotech-customers-trunk/apps/app_readexten.c
    team/irroot/distrotech-customers-trunk/apps/app_record.c
    team/irroot/distrotech-customers-trunk/apps/app_rpt.c
    team/irroot/distrotech-customers-trunk/apps/app_sms.c
    team/irroot/distrotech-customers-trunk/apps/app_softhangup.c
    team/irroot/distrotech-customers-trunk/apps/app_stack.c
    team/irroot/distrotech-customers-trunk/apps/app_talkdetect.c
    team/irroot/distrotech-customers-trunk/apps/app_test.c
    team/irroot/distrotech-customers-trunk/apps/app_voicemail.c
    team/irroot/distrotech-customers-trunk/apps/app_waitforsilence.c
    team/irroot/distrotech-customers-trunk/apps/confbridge/   (props changed)
    team/irroot/distrotech-customers-trunk/apps/confbridge/conf_config_parser.c
    team/irroot/distrotech-customers-trunk/autoconf/ast_gcc_attribute.m4
    team/irroot/distrotech-customers-trunk/autoconf/libcurl.m4
    team/irroot/distrotech-customers-trunk/bootstrap.sh
    team/irroot/distrotech-customers-trunk/bridges/bridge_builtin_features.c
    team/irroot/distrotech-customers-trunk/bridges/bridge_multiplexed.c
    team/irroot/distrotech-customers-trunk/cel/cel_manager.c
    team/irroot/distrotech-customers-trunk/cel/cel_odbc.c
    team/irroot/distrotech-customers-trunk/cel/cel_pgsql.c
    team/irroot/distrotech-customers-trunk/cel/cel_sqlite3_custom.c
    team/irroot/distrotech-customers-trunk/channels/chan_agent.c
    team/irroot/distrotech-customers-trunk/channels/chan_alsa.c
    team/irroot/distrotech-customers-trunk/channels/chan_bridge.c
    team/irroot/distrotech-customers-trunk/channels/chan_console.c
    team/irroot/distrotech-customers-trunk/channels/chan_dahdi.c
    team/irroot/distrotech-customers-trunk/channels/chan_gtalk.c
    team/irroot/distrotech-customers-trunk/channels/chan_h323.c
    team/irroot/distrotech-customers-trunk/channels/chan_iax2.c
    team/irroot/distrotech-customers-trunk/channels/chan_jingle.c
    team/irroot/distrotech-customers-trunk/channels/chan_local.c
    team/irroot/distrotech-customers-trunk/channels/chan_mgcp.c
    team/irroot/distrotech-customers-trunk/channels/chan_misdn.c
    team/irroot/distrotech-customers-trunk/channels/chan_nbs.c
    team/irroot/distrotech-customers-trunk/channels/chan_oss.c
    team/irroot/distrotech-customers-trunk/channels/chan_phone.c
    team/irroot/distrotech-customers-trunk/channels/chan_sip.c
    team/irroot/distrotech-customers-trunk/channels/chan_skinny.c
    team/irroot/distrotech-customers-trunk/channels/chan_unistim.c
    team/irroot/distrotech-customers-trunk/channels/chan_usbradio.c
    team/irroot/distrotech-customers-trunk/channels/chan_vpb.cc
    team/irroot/distrotech-customers-trunk/channels/console_video.c
    team/irroot/distrotech-customers-trunk/channels/sig_analog.c
    team/irroot/distrotech-customers-trunk/channels/sig_pri.c
    team/irroot/distrotech-customers-trunk/channels/sig_ss7.c
    team/irroot/distrotech-customers-trunk/channels/sip/config_parser.c
    team/irroot/distrotech-customers-trunk/channels/sip/include/dialog.h
    team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h
    team/irroot/distrotech-customers-trunk/codecs/speex/   (props changed)
    team/irroot/distrotech-customers-trunk/configs/cel.conf.sample
    team/irroot/distrotech-customers-trunk/configs/cel_custom.conf.sample
    team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample
    team/irroot/distrotech-customers-trunk/configs/cel_pgsql.conf.sample
    team/irroot/distrotech-customers-trunk/configs/cel_sqlite3_custom.conf.sample
    team/irroot/distrotech-customers-trunk/configs/chan_dahdi.conf.sample
    team/irroot/distrotech-customers-trunk/configs/chan_ooh323.conf.sample
    team/irroot/distrotech-customers-trunk/configs/extensions.conf.sample
    team/irroot/distrotech-customers-trunk/configs/extensions.lua.sample
    team/irroot/distrotech-customers-trunk/configs/features.conf.sample
    team/irroot/distrotech-customers-trunk/configs/iax.conf.sample
    team/irroot/distrotech-customers-trunk/configs/logger.conf.sample
    team/irroot/distrotech-customers-trunk/configs/sip.conf.sample
    team/irroot/distrotech-customers-trunk/configs/voicemail.conf.sample
    team/irroot/distrotech-customers-trunk/configs/vpb.conf.sample
    team/irroot/distrotech-customers-trunk/configure
    team/irroot/distrotech-customers-trunk/configure.ac
    team/irroot/distrotech-customers-trunk/contrib/init.d/rc.debian.asterisk
    team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/voicemail.sql
    team/irroot/distrotech-customers-trunk/contrib/scripts/autosupport
    team/irroot/distrotech-customers-trunk/contrib/scripts/autosupport.8
    team/irroot/distrotech-customers-trunk/contrib/scripts/install_prereq
    team/irroot/distrotech-customers-trunk/contrib/scripts/safe_asterisk
    team/irroot/distrotech-customers-trunk/funcs/func_audiohookinherit.c
    team/irroot/distrotech-customers-trunk/funcs/func_cdr.c
    team/irroot/distrotech-customers-trunk/funcs/func_channel.c
    team/irroot/distrotech-customers-trunk/funcs/func_frame_trace.c
    team/irroot/distrotech-customers-trunk/funcs/func_global.c
    team/irroot/distrotech-customers-trunk/funcs/func_groupcount.c
    team/irroot/distrotech-customers-trunk/funcs/func_lock.c
    team/irroot/distrotech-customers-trunk/include/asterisk/astobj2.h
    team/irroot/distrotech-customers-trunk/include/asterisk/autoconfig.h.in
    team/irroot/distrotech-customers-trunk/include/asterisk/bridging.h
    team/irroot/distrotech-customers-trunk/include/asterisk/cdr.h
    team/irroot/distrotech-customers-trunk/include/asterisk/channel.h
    team/irroot/distrotech-customers-trunk/include/asterisk/dsp.h
    team/irroot/distrotech-customers-trunk/include/asterisk/file.h
    team/irroot/distrotech-customers-trunk/include/asterisk/format_pref.h
    team/irroot/distrotech-customers-trunk/include/asterisk/logger.h
    team/irroot/distrotech-customers-trunk/include/asterisk/module.h
    team/irroot/distrotech-customers-trunk/include/asterisk/pbx.h
    team/irroot/distrotech-customers-trunk/include/asterisk/res_fax.h
    team/irroot/distrotech-customers-trunk/main/abstract_jb.c
    team/irroot/distrotech-customers-trunk/main/aoc.c
    team/irroot/distrotech-customers-trunk/main/app.c
    team/irroot/distrotech-customers-trunk/main/asterisk.c
    team/irroot/distrotech-customers-trunk/main/astobj2.c
    team/irroot/distrotech-customers-trunk/main/audiohook.c
    team/irroot/distrotech-customers-trunk/main/autochan.c
    team/irroot/distrotech-customers-trunk/main/bridging.c
    team/irroot/distrotech-customers-trunk/main/ccss.c
    team/irroot/distrotech-customers-trunk/main/cdr.c
    team/irroot/distrotech-customers-trunk/main/cel.c
    team/irroot/distrotech-customers-trunk/main/channel.c
    team/irroot/distrotech-customers-trunk/main/cli.c
    team/irroot/distrotech-customers-trunk/main/config.c
    team/irroot/distrotech-customers-trunk/main/db.c
    team/irroot/distrotech-customers-trunk/main/dial.c
    team/irroot/distrotech-customers-trunk/main/dsp.c
    team/irroot/distrotech-customers-trunk/main/features.c
    team/irroot/distrotech-customers-trunk/main/file.c
    team/irroot/distrotech-customers-trunk/main/indications.c
    team/irroot/distrotech-customers-trunk/main/loader.c
    team/irroot/distrotech-customers-trunk/main/logger.c
    team/irroot/distrotech-customers-trunk/main/manager.c
    team/irroot/distrotech-customers-trunk/main/message.c
    team/irroot/distrotech-customers-trunk/main/pbx.c
    team/irroot/distrotech-customers-trunk/main/rtp_engine.c
    team/irroot/distrotech-customers-trunk/main/say.c
    team/irroot/distrotech-customers-trunk/main/udptl.c
    team/irroot/distrotech-customers-trunk/pbx/pbx_config.c
    team/irroot/distrotech-customers-trunk/pbx/pbx_dundi.c
    team/irroot/distrotech-customers-trunk/pbx/pbx_lua.c
    team/irroot/distrotech-customers-trunk/pbx/pbx_realtime.c
    team/irroot/distrotech-customers-trunk/res/res_adsi.c
    team/irroot/distrotech-customers-trunk/res/res_agi.c
    team/irroot/distrotech-customers-trunk/res/res_calendar.c
    team/irroot/distrotech-customers-trunk/res/res_fax.c
    team/irroot/distrotech-customers-trunk/res/res_fax_spandsp.c
    team/irroot/distrotech-customers-trunk/res/res_jabber.c
    team/irroot/distrotech-customers-trunk/res/res_monitor.c
    team/irroot/distrotech-customers-trunk/res/res_musiconhold.c
    team/irroot/distrotech-customers-trunk/res/res_mutestream.c
    team/irroot/distrotech-customers-trunk/res/res_pktccops.c
    team/irroot/distrotech-customers-trunk/res/res_srtp.c
    team/irroot/distrotech-customers-trunk/res/res_timing_dahdi.c
    team/irroot/distrotech-customers-trunk/res/res_timing_pthread.c
    team/irroot/distrotech-customers-trunk/res/res_timing_timerfd.c
    team/irroot/distrotech-customers-trunk/res/snmp/agent.c
    team/irroot/distrotech-customers-trunk/utils/   (props changed)
    team/irroot/distrotech-customers-trunk/utils/ael_main.c
    team/irroot/distrotech-customers-trunk/utils/extconf.c
    team/irroot/distrotech-customers-trunk/utils/hashtest.c
    team/irroot/distrotech-customers-trunk/utils/hashtest2.c
    team/irroot/distrotech-customers-trunk/utils/refcounter.c

Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 16 12:47:00 2012
@@ -1,1 +1,1 @@
-/trunk:1-347948
+/trunk:1-350936

Modified: team/irroot/distrotech-customers-trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/CHANGES?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/CHANGES (original)
+++ team/irroot/distrotech-customers-trunk/CHANGES Mon Jan 16 12:47:00 2012
@@ -21,12 +21,20 @@
  * Added menu action participant_count.  This will playback the number of current
    participants in a conference.
 
+Voicemail
+------------------
+ * Addition of the VM_INFO function - see Dialplan function changes
+ * The imapserver, imapport, and imapflags configuration options can now be
+   overriden on a user by user basis.
+
 SIP Changes
 -----------
  * Asterisk will no longer substitute CID number for CID name into display
    name field if CID number exists without a CID name. This change improves
    compatibility with certain device features such as Avaya IP500's directory
    lookup service.
+ * A new setting for autocreatepeer (autocreatepeer=persistent) allows peers
+   created using that setting to not be removed during SIP reload.
 
 Chan_local changes
 ------------------
@@ -45,6 +53,22 @@
  * Added queue options autopausebusy and autopauseunavail for automatically
    pausing a queue member when their device reports busy or congestion.
 
+Voicemail changes
+-----------------
+ * When voicemail plays a message's envelope with saycid set to yes, when reaching
+   the caller id field it will play a recording of a file with the same base name
+   as the sender's callerid if there is a similarly named file in
+   <astspooldir>/recordings/callerids/
+
+Applications
+------------
+ * Added 'j' option to SayUnixTime. SayUnixTime no longer auto jumps to extension
+   when receiving DTMF.  Use the 'j' option to enable extension jumping. Also
+   changed arguments to SayUnixTime so that every option is truly optional even
+   when using multiple options (so that j option could be used without having to
+   manually specify timezone and format) There are other beneftis eg. format can
+   now be used without specifying time zone as well.
+
 CDR postgresql driver changes
 -----------------------------
  * Added command "cdr show pgsql status" to check connection status
@@ -69,16 +93,6 @@
 -------------
  * Allow the built in variables ${NUMBER}, ${IPADDR} and ${SECRET} to be
    used within the dynamic weight attribute when specifying a mapping.
-
-Core changes
-------------
- * Each logging destination and console now have an independent notion of the
-   current verbosity level.  Logger.conf now allows an optional argument to
-   the 'verbose' specifier, indicating the level of verbosity sent to that
-   particular logging destination.  Additionally, remote consoles now each
-   have their own verbosity level.  While 'core set verbose' still works to
-   affect the core console verbosity, 'remote set verbose' will now set a
-   separate level for each remote console without affecting any other console.
 
 Dialplan functions
 ------------------
@@ -86,6 +100,14 @@
    user information, such as the email address and full name.
    The MAILBOX_EXISTS dialplan function has been deprecated in favour of
    VM_INFO.
+
+Followme changes
+-------------
+ * A new option, 'I' has been added to app_followme.
+   By setting this option, Asterisk will not update the caller with
+   connected line changes when they occur.  This is similar to app_dial
+   and app_queue.
+ * The 'N' option is now ignored if the call is already answered.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.8 to Asterisk 10 -------------------

Modified: team/irroot/distrotech-customers-trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/UPGRADE.txt?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/UPGRADE.txt (original)
+++ team/irroot/distrotech-customers-trunk/UPGRADE.txt Mon Jan 16 12:47:00 2012
@@ -40,10 +40,6 @@
    - dnsmgr.conf
    - dsp.conf
 
- - The 'verbose' setting in logger.conf now takes an optional argument,
-   specifying the verbosity level for each logging destination.  The default,
-   if not otherwise specified, is a verbosity of 3.
-
 AMI:
   - DBDelTree now correctly returns an error when 0 rows are deleted just as
     the DBDel action does.
@@ -52,6 +48,11 @@
 ===
  - A new option "tonezone" for setting default tonezone for the channel driver
    or individual devices
+
+users.conf:
+ - A defined user with hasvoicemail=yes now finally uses a Gosub to stdexten
+   as documented in extensions.conf.sample since v1.6.0 instead of a Macro as
+   documented in v1.4.
 
 From 1.8 to 10:
 

Modified: team/irroot/distrotech-customers-trunk/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/addons/chan_mobile.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/addons/chan_mobile.c (original)
+++ team/irroot/distrotech-customers-trunk/addons/chan_mobile.c Mon Jan 16 12:47:00 2012
@@ -960,11 +960,11 @@
 	}
 
 	if ((ast->_state != AST_STATE_DOWN) && (ast->_state != AST_STATE_RESERVED)) {
-		ast_log(LOG_WARNING, "mbl_call called on %s, neither down nor reserved\n", ast->name);
+		ast_log(LOG_WARNING, "mbl_call called on %s, neither down nor reserved\n", ast_channel_name(ast));
 		return -1;
 	}
 
-	ast_debug(1, "Calling %s on %s\n", dest, ast->name);
+	ast_debug(1, "Calling %s on %s\n", dest, ast_channel_name(ast));
 
 	ast_mutex_lock(&pvt->lock);
 	if (pvt->type == MBL_TYPE_PHONE) {
@@ -2273,14 +2273,13 @@
  */
 static char *hfp_parse_cusd(struct hfp_pvt *hfp, char *buf)
 {
-	int i, state, message_start, message_end;
+	int i, message_start, message_end;
 	char *cusd;
 	size_t s;
 
 	/* parse cusd message in the following format:
 	 * +CUSD: 0,"100,00 EURO, valid till 01.01.2010, you are using tariff "Mega Tariff". More informations *111#."
 	 */
-	state = 0;
 	message_start = 0;
 	message_end = 0;
 	s = strlen(buf);
@@ -2678,7 +2677,7 @@
 {
 	int i, state, group;
 	size_t s;
-	char *indicator = NULL, *values;
+	char *indicator = NULL;
 
 	hfp->nocallsetup = 1;
 
@@ -2717,7 +2716,6 @@
 			}
 			break;
 		case 5: /* mark the start of the value range */
-			values = &buf[i];
 			state++;
 			break;
 		case 6: /* find the end of the value range */
@@ -2989,7 +2987,6 @@
 	sdp_list_t  *l2cap_list = 0, *rfcomm_list = 0, *root_list = 0, *proto_list = 0, *access_proto_list = 0, *svc_uuid_list = 0;
 	sdp_data_t *channel = 0;
 
-	int err = 0;
 	sdp_session_t *session = 0;
 
 	sdp_record_t *record = sdp_record_alloc();
@@ -3026,7 +3023,7 @@
 	if (!(session = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY)))
 		ast_log(LOG_WARNING, "Failed to connect sdp and create session.\n");
 	else
-		err = sdp_record_register(session, record, 0);
+		sdp_record_register(session, record, 0);
 
 	sdp_data_free(channel);
 	sdp_list_free(rfcomm_list, 0);

Modified: team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c (original)
+++ team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c Mon Jan 16 12:47:00 2012
@@ -469,7 +469,7 @@
 		ast_setstate(ch, state);
 		if (state != AST_STATE_DOWN) {
          		if (ast_pbx_start(ch)) {
-				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ch->name);
+				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ast_channel_name(ch));
             			ast_channel_unlock(ch);
 				ast_hangup(ch);
 				ch = NULL;
@@ -477,7 +477,7 @@
 	 	}
 
 		manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", "Channel: %s\r\nChanneltype: %s\r\n"
-				"CallRef: %d\r\n", ch->name, "OOH323", i->call_reference);
+				"CallRef: %d\r\n", ast_channel_name(ch), "OOH323", i->call_reference);
 	} else
 		ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
 
@@ -927,7 +927,7 @@
 
    	if ((ast->_state != AST_STATE_DOWN) && (ast->_state != AST_STATE_RESERVED)) {
 		ast_log(LOG_WARNING, "ooh323_call called on %s, neither down nor "
-								"reserved\n", ast->name);
+								"reserved\n", ast_channel_name(ast));
 		return -1;
 	}
 	ast_mutex_lock(&p->lock);
@@ -1096,7 +1096,7 @@
 			}
 			ast_setstate(ast, AST_STATE_UP);
       			if (option_debug)
-				ast_debug(1, "ooh323_answer(%s)\n", ast->name);
+				ast_debug(1, "ooh323_answer(%s)\n", ast_channel_name(ast));
 			ast_channel_unlock(ast);
 			ooAnswerCall(p->callToken);
 		}
@@ -1141,7 +1141,7 @@
 
 		if (f->frametype == AST_FRAME_MODEM) {
 			ast_debug(1, "Send UDPTL %d/%d len %d for %s\n",
-				f->frametype, f->subclass.integer, f->datalen, ast->name);
+				f->frametype, f->subclass.integer, f->datalen, ast_channel_name(ast));
 			if (p->udptl)
 				res = ast_udptl_write(p->udptl, f);
 			ast_mutex_unlock(&p->lock);
@@ -1388,7 +1388,7 @@
 	ast_mutex_lock(&p->lock);
 
 	if (gH323Debug)
-		ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast->name);
+		ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
 	 
 	switch (option) {
 
@@ -1418,7 +1418,7 @@
 			cp = (char *) data;
 			*cp = p->vad ? 1 : 0;
 			ast_debug(1, "Reporting digit detection %sabled on %s\n",
-							 *cp ? "en" : "dis", ast->name);
+							 *cp ? "en" : "dis", ast_channel_name(ast));
 
 			res = 0;
 			break;
@@ -1428,7 +1428,7 @@
 	}
 
 	if (gH323Debug)
-		ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast->name);
+		ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
 	 
    	ast_mutex_unlock(&p->lock);
 
@@ -2103,7 +2103,7 @@
 			ast_queue_control(c, AST_CONTROL_ANSWER);
    			ast_channel_unlock(p->owner);
 			manager_event(EVENT_FLAG_SYSTEM,"ChannelUpdate","Channel: %s\r\nChanneltype: %s\r\n"
-				"CallRef: %d\r\n", c->name, "OOH323", p->call_reference);
+				"CallRef: %d\r\n", ast_channel_name(c), "OOH323", p->call_reference);
 		}
 		ast_mutex_unlock(&p->lock);
 
@@ -3844,7 +3844,7 @@
             			ast_debug(1, "Failed to grab lock, trying again\n");
 				DEADLOCK_AVOIDANCE(&cur->lock);
          		}           
-			ast_debug(1, "Detaching from %s\n", cur->owner->name);
+			ast_debug(1, "Detaching from %s\n", ast_channel_name(cur->owner));
 			cur->owner->tech_pvt = NULL;
 			ast_channel_unlock(cur->owner);
 			cur->owner = NULL;
@@ -4179,7 +4179,7 @@
 	int mode;
 
 	if (gH323Debug)
-		ast_verb(0, "---   ooh323_set_peer - %s\n", chan->name);
+		ast_verb(0, "---   ooh323_set_peer - %s\n", ast_channel_name(chan));
 
 	if (!rtp) {
 		return 0;
@@ -4469,7 +4469,7 @@
 	ast_sockaddr_set_port(&them, remotePort);
 
 	ast_udptl_set_peer(p->udptl, &them);
-	ast_udptl_set_tag(p->udptl, "%s", p->owner->name);
+	ast_udptl_set_tag(p->udptl, "%s", ast_channel_name(p->owner));
 	p->t38_tx_enable = 1;
 	p->lastTxT38 = time(NULL);
 	if (p->t38support == T38_ENABLED) {
@@ -4592,7 +4592,7 @@
 		f = ast_udptl_read(p->udptl);		/* UDPTL t.38 data */
 		if (gH323Debug) {
 			 ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
-				f->frametype, f->subclass.integer, f->datalen, ast->name);
+				f->frametype, f->subclass.integer, f->datalen, ast_channel_name(ast));
 		}
 		break;
 
@@ -4633,10 +4633,10 @@
 			if ((strcmp(p->owner->exten, "fax")) &&
 			    (ast_exists_extension(p->owner, target_context, "fax", 1,
 		            S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL)))) {
-				ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", p->owner->name);
+				ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", ast_channel_name(p->owner));
 				pbx_builtin_setvar_helper(p->owner, "FAXEXTEN", p->owner->exten);
 				if (ast_async_goto(p->owner, target_context, "fax", 1)) {
-					ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", p->owner->name,target_context);
+					ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(p->owner),target_context);
 				}
 				p->faxdetected = 1;
 				if (dfr) {
@@ -4711,10 +4711,10 @@
                         	if ((strcmp(p->owner->exten, "fax")) &&
                             		(ast_exists_extension(p->owner, target_context, "fax", 1,
                             		S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL)))) {
-                                	ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", p->owner->name);
+                                	ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", ast_channel_name(p->owner));
                                 	pbx_builtin_setvar_helper(p->owner, "FAXEXTEN", p->owner->exten);
                                 	if (ast_async_goto(p->owner, target_context, "fax", 1)) {
-                                        	ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", p->owner->name,target_context);
+                                        	ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(p->owner),target_context);
 					}
                                 }
                                 p->faxdetected = 1;

Modified: team/irroot/distrotech-customers-trunk/apps/app_adsiprog.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_adsiprog.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/apps/app_adsiprog.c (original)
+++ team/irroot/distrotech-customers-trunk/apps/app_adsiprog.c Mon Jan 16 12:47:00 2012
@@ -1469,7 +1469,7 @@
 	if (ast_adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
 		/* User rejected us for some reason */
 		ast_verb(3, "User rejected download attempt\n");
-		ast_log(LOG_NOTICE, "User rejected download on channel %s\n", chan->name);
+		ast_log(LOG_NOTICE, "User rejected download on channel %s\n", ast_channel_name(chan));
 		ast_free(scr);
 		return -1;
 	}
@@ -1554,7 +1554,7 @@
 	if (ast_adsi_end_download(chan)) {
 		/* Download failed for some reason */
 		ast_verb(3, "Download attempt failed\n");
-		ast_log(LOG_NOTICE, "Download failed on %s\n", chan->name);
+		ast_log(LOG_NOTICE, "Download failed on %s\n", ast_channel_name(chan));
 		ast_free(scr);
 		return -1;
 	}

Modified: team/irroot/distrotech-customers-trunk/apps/app_alarmreceiver.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_alarmreceiver.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/apps/app_alarmreceiver.c (original)
+++ team/irroot/distrotech-customers-trunk/apps/app_alarmreceiver.c Mon Jan 16 12:47:00 2012
@@ -210,8 +210,8 @@
 				break;
 			}
 			if (ast_write(chan, &wf)) {
-				ast_verb(4, "AlarmReceiver: Failed to write frame on %s\n", chan->name);
-				ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
+				ast_verb(4, "AlarmReceiver: Failed to write frame on %s\n", ast_channel_name(chan));
+				ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",ast_channel_name(chan));
 				res = -1;
 				ast_frfree(f);
 				break;
@@ -245,8 +245,8 @@
 	for (;;) {
 		/* if outa time, leave */
 		if (ast_tvdiff_ms(ast_tvnow(), lastdigittime) > ((i > 0) ? sdto : fdto)) {
-			ast_verb(4, "AlarmReceiver: DTMF Digit Timeout on %s\n", chan->name);
-			ast_debug(1,"AlarmReceiver: DTMF timeout on chan %s\n",chan->name);
+			ast_verb(4, "AlarmReceiver: DTMF Digit Timeout on %s\n", ast_channel_name(chan));
+			ast_debug(1,"AlarmReceiver: DTMF timeout on chan %s\n",ast_channel_name(chan));
 			res = 1;
 			break;
 		}
@@ -583,12 +583,12 @@
 	ast_verb(4, "AlarmReceiver: Setting read and write formats to ULAW\n");
 
 	if (ast_set_write_format_by_id(chan,AST_FORMAT_ULAW)) {
-		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
+		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",ast_channel_name(chan));
 		return -1;
 	}
 
 	if (ast_set_read_format_by_id(chan,AST_FORMAT_ULAW)) {
-		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name);
+		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",ast_channel_name(chan));
 		return -1;
 	}
 

Modified: team/irroot/distrotech-customers-trunk/apps/app_amd.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_amd.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/apps/app_amd.c (original)
+++ team/irroot/distrotech-customers-trunk/apps/app_amd.c Mon Jan 16 12:47:00 2012
@@ -192,7 +192,7 @@
 	);
 
 	ast_format_clear(&readFormat);
-	ast_verb(3, "AMD: %s %s %s (Fmt: %s)\n", chan->name,
+	ast_verb(3, "AMD: %s %s %s (Fmt: %s)\n", ast_channel_name(chan),
 		S_COR(chan->caller.ani.number.valid, chan->caller.ani.number.str, "(N/A)"),
 		S_COR(chan->redirecting.from.number.valid, chan->redirecting.from.number.str, "(N/A)"),
 		ast_getformatname(&chan->readformat));
@@ -246,7 +246,7 @@
 	/* Set read format to signed linear so we get signed linear frames in */
 	ast_format_copy(&readFormat, &chan->readformat);
 	if (ast_set_read_format_by_id(chan, AST_FORMAT_SLINEAR) < 0 ) {
-		ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to set to linear mode, giving up\n", chan->name );
+		ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to set to linear mode, giving up\n", ast_channel_name(chan));
 		pbx_builtin_setvar_helper(chan , "AMDSTATUS", "");
 		pbx_builtin_setvar_helper(chan , "AMDCAUSE", "");
 		return;
@@ -254,7 +254,7 @@
 
 	/* Create a new DSP that will detect the silence */
 	if (!(silenceDetector = ast_dsp_new())) {
-		ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to create silence detector :(\n", chan->name );
+		ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to create silence detector :(\n", ast_channel_name(chan));
 		pbx_builtin_setvar_helper(chan , "AMDSTATUS", "");
 		pbx_builtin_setvar_helper(chan , "AMDCAUSE", "");
 		return;
@@ -268,7 +268,7 @@
 
 		/* If we fail to read in a frame, that means they hung up */
 		if (!(f = ast_read(chan))) {
-			ast_verb(3, "AMD: Channel [%s]. HANGUP\n", chan->name);
+			ast_verb(3, "AMD: Channel [%s]. HANGUP\n", ast_channel_name(chan));
 			ast_debug(1, "Got hangup\n");
 			strcpy(amdStatus, "HANGUP");
 			res = 1;
@@ -285,7 +285,7 @@
 
 			iTotalTime += framelength;
 			if (iTotalTime >= totalAnalysisTime) {
-				ast_verb(3, "AMD: Channel [%s]. Too long...\n", chan->name );
+				ast_verb(3, "AMD: Channel [%s]. Too long...\n", ast_channel_name(chan));
 				ast_frfree(f);
 				strcpy(amdStatus , "NOTSURE");
 				sprintf(amdCause , "TOOLONG-%d", iTotalTime);
@@ -305,11 +305,11 @@
 				
 				if (silenceDuration >= betweenWordsSilence) {
 					if (currentState != STATE_IN_SILENCE ) {
-						ast_verb(3, "AMD: Channel [%s]. Changed state to STATE_IN_SILENCE\n", chan->name);
+						ast_verb(3, "AMD: Channel [%s]. Changed state to STATE_IN_SILENCE\n", ast_channel_name(chan));
 					}
 					/* Find words less than word duration */
 					if (consecutiveVoiceDuration < minimumWordLength && consecutiveVoiceDuration > 0){
-						ast_verb(3, "AMD: Channel [%s]. Short Word Duration: %d\n", chan->name, consecutiveVoiceDuration);
+						ast_verb(3, "AMD: Channel [%s]. Short Word Duration: %d\n", ast_channel_name(chan), consecutiveVoiceDuration);
 					}
 					currentState  = STATE_IN_SILENCE;
 					consecutiveVoiceDuration = 0;
@@ -317,7 +317,7 @@
 
 				if (inInitialSilence == 1  && silenceDuration >= initialSilence) {
 					ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
-						chan->name, silenceDuration, initialSilence);
+						ast_channel_name(chan), silenceDuration, initialSilence);
 					ast_frfree(f);
 					strcpy(amdStatus , "MACHINE");
 					sprintf(amdCause , "INITIALSILENCE-%d-%d", silenceDuration, initialSilence);
@@ -327,7 +327,7 @@
 				
 				if (silenceDuration >= afterGreetingSilence  &&  inGreeting == 1) {
 					ast_verb(3, "AMD: Channel [%s]. HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
-						chan->name, silenceDuration, afterGreetingSilence);
+						ast_channel_name(chan), silenceDuration, afterGreetingSilence);
 					ast_frfree(f);
 					strcpy(amdStatus , "HUMAN");
 					sprintf(amdCause , "HUMAN-%d-%d", silenceDuration, afterGreetingSilence);
@@ -343,18 +343,18 @@
 				   number of words if my previous state was Silence, which means that I moved into a word. */
 				if (consecutiveVoiceDuration >= minimumWordLength && currentState == STATE_IN_SILENCE) {
 					iWordsCount++;
-					ast_verb(3, "AMD: Channel [%s]. Word detected. iWordsCount:%d\n", chan->name, iWordsCount);
+					ast_verb(3, "AMD: Channel [%s]. Word detected. iWordsCount:%d\n", ast_channel_name(chan), iWordsCount);
 					currentState = STATE_IN_WORD;
 				}
 				if (consecutiveVoiceDuration >= maximumWordLength){
-					ast_verb(3, "AMD: Channel [%s]. Maximum Word Length detected. [%d]\n", chan->name, consecutiveVoiceDuration);
+					ast_verb(3, "AMD: Channel [%s]. Maximum Word Length detected. [%d]\n", ast_channel_name(chan), consecutiveVoiceDuration);
 					ast_frfree(f);
 					strcpy(amdStatus , "MACHINE");
 					sprintf(amdCause , "MAXWORDLENGTH-%d", consecutiveVoiceDuration);
 					break;
 				}
 				if (iWordsCount >= maximumNumberOfWords) {
-					ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: iWordsCount:%d\n", chan->name, iWordsCount);
+					ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: iWordsCount:%d\n", ast_channel_name(chan), iWordsCount);
 					ast_frfree(f);
 					strcpy(amdStatus , "MACHINE");
 					sprintf(amdCause , "MAXWORDS-%d-%d", iWordsCount, maximumNumberOfWords);
@@ -363,7 +363,7 @@
 				}
 
 				if (inGreeting == 1 && voiceDuration >= greeting) {
-					ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", chan->name, voiceDuration, greeting);
+					ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", ast_channel_name(chan), voiceDuration, greeting);
 					ast_frfree(f);
 					strcpy(amdStatus , "MACHINE");
 					sprintf(amdCause , "LONGGREETING-%d-%d", voiceDuration, greeting);
@@ -373,13 +373,13 @@
 
 				if (voiceDuration >= minimumWordLength ) {
 					if (silenceDuration > 0)
-						ast_verb(3, "AMD: Channel [%s]. Detected Talk, previous silence duration: %d\n", chan->name, silenceDuration);
+						ast_verb(3, "AMD: Channel [%s]. Detected Talk, previous silence duration: %d\n", ast_channel_name(chan), silenceDuration);
 					silenceDuration = 0;
 				}
 				if (consecutiveVoiceDuration >= minimumWordLength && inGreeting == 0) {
 					/* Only go in here once to change the greeting flag when we detect the 1st word */
 					if (silenceDuration > 0)
-						ast_verb(3, "AMD: Channel [%s]. Before Greeting Time:  silenceDuration: %d voiceDuration: %d\n", chan->name, silenceDuration, voiceDuration);
+						ast_verb(3, "AMD: Channel [%s]. Before Greeting Time:  silenceDuration: %d voiceDuration: %d\n", ast_channel_name(chan), silenceDuration, voiceDuration);
 					inInitialSilence = 0;
 					inGreeting = 1;
 				}
@@ -391,7 +391,7 @@
 	
 	if (!res) {
 		/* It took too long to get a frame back. Giving up. */
-		ast_verb(3, "AMD: Channel [%s]. Too long...\n", chan->name);
+		ast_verb(3, "AMD: Channel [%s]. Too long...\n", ast_channel_name(chan));
 		strcpy(amdStatus , "NOTSURE");
 		sprintf(amdCause , "TOOLONG-%d", iTotalTime);
 	}
@@ -402,7 +402,7 @@
 
 	/* Restore channel read format */
 	if (readFormat.id && ast_set_read_format(chan, &readFormat))
-		ast_log(LOG_WARNING, "AMD: Unable to restore read format on '%s'\n", chan->name);
+		ast_log(LOG_WARNING, "AMD: Unable to restore read format on '%s'\n", ast_channel_name(chan));
 
 	/* Free the DSP used to detect silence */
 	ast_dsp_free(silenceDetector);

Modified: team/irroot/distrotech-customers-trunk/apps/app_authenticate.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_authenticate.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/apps/app_authenticate.c (original)
+++ team/irroot/distrotech-customers-trunk/apps/app_authenticate.c Mon Jan 16 12:47:00 2012
@@ -213,14 +213,20 @@
 						continue;
 					ast_md5_hash(md5passwd, passwd);
 					if (!strcmp(md5passwd, md5secret)) {
-						if (ast_test_flag(&flags,OPT_ACCOUNT))
+						if (ast_test_flag(&flags,OPT_ACCOUNT)) {
+							ast_channel_lock(chan);
 							ast_cdr_setaccount(chan, buf);
+							ast_channel_unlock(chan);
+						}
 						break;
 					}
 				} else {
 					if (!strcmp(passwd, buf)) {
-						if (ast_test_flag(&flags, OPT_ACCOUNT))
+						if (ast_test_flag(&flags, OPT_ACCOUNT)) {
+							ast_channel_lock(chan);
 							ast_cdr_setaccount(chan, buf);
+							ast_channel_unlock(chan);
+						}
 						break;
 					}
 				}
@@ -242,8 +248,11 @@
 	}
 
 	if ((retries < 3) && !res) {
-		if (ast_test_flag(&flags,OPT_ACCOUNT) && !ast_test_flag(&flags,OPT_MULTIPLE))
+		if (ast_test_flag(&flags,OPT_ACCOUNT) && !ast_test_flag(&flags,OPT_MULTIPLE)) {
+			ast_channel_lock(chan);
 			ast_cdr_setaccount(chan, passwd);
+			ast_channel_unlock(chan);
+		}
 		if (!(res = ast_streamfile(chan, "auth-thankyou", chan->language)))
 			res = ast_waitstream(chan, "");
 	} else {

Modified: team/irroot/distrotech-customers-trunk/apps/app_chanisavail.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_chanisavail.c?view=diff&rev=351026&r1=351025&r2=351026
==============================================================================
--- team/irroot/distrotech-customers-trunk/apps/app_chanisavail.c (original)
+++ team/irroot/distrotech-customers-trunk/apps/app_chanisavail.c Mon Jan 16 12:47:00 2012
@@ -170,7 +170,7 @@
 			snprintf(tmp, sizeof(tmp), "%d", status);
 			ast_str_append(&tmp_availstat, 0, "%s%s", ast_str_strlen(tmp_availstat) ? "&" : "", tmp);
 			if ((inuse <= 1) && (tempchan = ast_request(tech, chan->nativeformats, chan, number, &status))) {
-					ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", tempchan->name);
+					ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", ast_channel_name(tempchan));
 					
 					snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
 					ast_str_append(&tmp_availorig, 0, "%s%s", ast_str_strlen(tmp_availorig) ? "&" : "", tmp);

Modified: team/irroot/distrotech-customers-trunk/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_chanspy.c?view=diff&rev=351026&r1=351025&r2=351026

[... 20187 lines stripped ...]



More information about the asterisk-commits mailing list