[asterisk-commits] dlee: branch dlee/record-controls r395356 - in /team/dlee/record-controls: ./...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 24 20:10:14 CDT 2013


Author: dlee
Date: Wed Jul 24 20:10:12 2013
New Revision: 395356

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395356
Log:
Merged revisions 395167-395351 from http://svn.asterisk.org/svn/asterisk/trunk

Added:
    team/dlee/record-controls/include/asterisk/bridging_channel.h
      - copied unchanged from r395351, trunk/include/asterisk/bridging_channel.h
    team/dlee/record-controls/include/asterisk/bridging_channel_internal.h
      - copied unchanged from r395351, trunk/include/asterisk/bridging_channel_internal.h
    team/dlee/record-controls/main/bridging_channel.c
      - copied unchanged from r395351, trunk/main/bridging_channel.c
Modified:
    team/dlee/record-controls/   (props changed)
    team/dlee/record-controls/apps/app_agent_pool.c
    team/dlee/record-controls/apps/app_confbridge.c
    team/dlee/record-controls/bridges/bridge_builtin_features.c
    team/dlee/record-controls/bridges/bridge_builtin_interval_features.c
    team/dlee/record-controls/bridges/bridge_native_rtp.c
    team/dlee/record-controls/bridges/bridge_softmix.c
    team/dlee/record-controls/channels/chan_dahdi.c
    team/dlee/record-controls/channels/chan_dahdi.h
    team/dlee/record-controls/channels/chan_gulp.c
    team/dlee/record-controls/channels/chan_mgcp.c
    team/dlee/record-controls/channels/dahdi/bridge_native_dahdi.c
    team/dlee/record-controls/contrib/scripts/install_prereq
    team/dlee/record-controls/funcs/func_channel.c
    team/dlee/record-controls/include/asterisk/bridging.h
    team/dlee/record-controls/include/asterisk/bridging_basic.h
    team/dlee/record-controls/include/asterisk/bridging_features.h
    team/dlee/record-controls/include/asterisk/bridging_internal.h
    team/dlee/record-controls/include/asterisk/bridging_technology.h
    team/dlee/record-controls/include/asterisk/channel.h
    team/dlee/record-controls/include/asterisk/features.h
    team/dlee/record-controls/main/asterisk.exports.in
    team/dlee/record-controls/main/bridging.c
    team/dlee/record-controls/main/bridging_basic.c
    team/dlee/record-controls/main/channel.c
    team/dlee/record-controls/main/features.c
    team/dlee/record-controls/main/manager_bridging.c
    team/dlee/record-controls/main/utils.c
    team/dlee/record-controls/res/parking/parking_bridge.c
    team/dlee/record-controls/res/parking/parking_bridge_features.c
    team/dlee/record-controls/res/res_sip.c
    team/dlee/record-controls/res/res_sip/sip_distributor.c
    team/dlee/record-controls/res/res_sip/sip_global_headers.c
    team/dlee/record-controls/res/res_sip_session.c

Propchange: team/dlee/record-controls/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul 24 20:10:12 2013
@@ -1,1 +1,1 @@
-/trunk:1-395155
+/trunk:1-395355

Modified: team/dlee/record-controls/apps/app_agent_pool.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/apps/app_agent_pool.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/apps/app_agent_pool.c (original)
+++ team/dlee/record-controls/apps/app_agent_pool.c Wed Jul 24 20:10:12 2013
@@ -41,6 +41,7 @@
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
 #include "asterisk/bridging.h"
+#include "asterisk/bridging_internal.h"
 #include "asterisk/bridging_basic.h"
 #include "asterisk/config_options.h"
 #include "asterisk/features_config.h"
@@ -1054,7 +1055,7 @@
 
 	if (!caller_bridge) {
 		/* Reset agent. */
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+		ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 		return;
 	}
 	res = ast_bridge_move(caller_bridge, bridge_channel->bridge, bridge_channel->chan,
@@ -1062,7 +1063,7 @@
 	if (res) {
 		/* Reset agent. */
 		ast_bridge_destroy(caller_bridge);
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+		ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 		return;
 	}
 	ast_bridge_channel_write_control_data(bridge_channel, AST_CONTROL_ANSWER, NULL, 0);
@@ -1158,13 +1159,13 @@
 
 	if (deferred_logoff) {
 		ast_debug(1, "Agent %s: Deferred logoff.\n", agent->username);
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+		ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 	} else if (probation_timedout) {
 		ast_debug(1, "Agent %s: Login complete.\n", agent->username);
 		agent_devstate_changed(agent->username);
 	} else if (ack_timedout) {
 		ast_debug(1, "Agent %s: Ack call timeout.\n", agent->username);
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+		ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 	} else if (wrapup_timedout) {
 		ast_debug(1, "Agent %s: Wrapup timeout. Ready for new call.\n", agent->username);
 		agent_devstate_changed(agent->username);
@@ -1269,7 +1270,7 @@
 		 * agent will have some slightly different behavior in corner
 		 * cases.
 		 */
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+		ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 		return 0;
 	}
 
@@ -1393,11 +1394,11 @@
 {
 	struct ast_bridge *bridge;
 
-	bridge = ast_bridge_alloc(sizeof(struct ast_bridge), &bridge_agent_hold_v_table);
-	bridge = ast_bridge_base_init(bridge, AST_BRIDGE_CAPABILITY_HOLDING,
+	bridge = bridge_alloc(sizeof(struct ast_bridge), &bridge_agent_hold_v_table);
+	bridge = bridge_base_init(bridge, AST_BRIDGE_CAPABILITY_HOLDING,
 		AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
 			| AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED);
-	bridge = ast_bridge_register(bridge);
+	bridge = bridge_register(bridge);
 	return bridge;
 }
 
@@ -1703,7 +1704,7 @@
 	}
 
 	/* Kick the agent out of the holding bridge to reset it. */
-	ast_bridge_change_state_nolock(logged, AST_BRIDGE_CHANNEL_STATE_END);
+	ast_bridge_channel_leave_bridge_nolock(logged, AST_BRIDGE_CHANNEL_STATE_END);
 	ast_bridge_channel_unlock(logged);
 }
 
@@ -1713,7 +1714,7 @@
 
 	if (agent->state == AGENT_STATE_CALL_PRESENT) {
 		ast_verb(3, "Agent '%s' did not respond.  Safety timeout.\n", agent->username);
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+		ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 		caller_abort_agent(agent);
 	}
 

Modified: team/dlee/record-controls/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/apps/app_confbridge.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/apps/app_confbridge.c (original)
+++ team/dlee/record-controls/apps/app_confbridge.c Wed Jul 24 20:10:12 2013
@@ -1402,25 +1402,26 @@
 	ast_free(pvt_data);
 }
 
-static void conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *pvt_data, int talking)
+static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *pvt_data, int talking)
 {
 	const char *conf_name = pvt_data;
 	struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
 	struct ast_json *talking_extras;
 
 	if (!conference) {
-		return;
+		/* Remove the hook since the conference does not exist. */
+		return -1;
 	}
 
 	talking_extras = ast_json_pack("{s: s}",
-					 "talking_status", talking ? "on" : "off");
-
+		"talking_status", talking ? "on" : "off");
 	if (!talking_extras) {
-		return;
+		return 0;
 	}
 
 	send_conf_stasis(conference, bridge_channel->chan, confbridge_talking_type(), talking_extras, 0);
 	ast_json_unref(talking_extras);
+	return 0;
 }
 
 static int conf_get_pin(struct ast_channel *chan, struct confbridge_user *user)
@@ -1599,14 +1600,17 @@
 	/* Set a talker indicate call back if talking detection is requested */
 	if (ast_test_flag(&user.u_profile, USER_OPT_TALKER_DETECT)) {
 		char *conf_name = ast_strdup(args.conf_name); /* this is freed during feature cleanup */
-		if (!(conf_name)) {
+
+		if (!conf_name) {
 			res = -1; /* invalid PIN */
 			goto confbridge_cleanup;
 		}
-		ast_bridge_features_set_talk_detector(&user.features,
-			conf_handle_talker_cb,
-			conf_handle_talker_destructor,
-			conf_name);
+		if (ast_bridge_talk_detector_hook(&user.features, conf_handle_talker_cb,
+			conf_name, conf_handle_talker_destructor, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
+			ast_free(conf_name);
+			res = -1;
+			goto confbridge_cleanup;
+		}
 	}
 
 	/* Look for a conference bridge matching the provided name */

Modified: team/dlee/record-controls/bridges/bridge_builtin_features.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/bridges/bridge_builtin_features.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/bridges/bridge_builtin_features.c (original)
+++ team/dlee/record-controls/bridges/bridge_builtin_features.c Wed Jul 24 20:10:12 2013
@@ -483,7 +483,7 @@
 	 * bridge_channel to force the channel out of the bridge and the
 	 * core takes care of the rest.
 	 */
-	ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+	ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 	return 0;
 }
 

Modified: team/dlee/record-controls/bridges/bridge_builtin_interval_features.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/bridges/bridge_builtin_interval_features.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/bridges/bridge_builtin_interval_features.c (original)
+++ team/dlee/record-controls/bridges/bridge_builtin_interval_features.c Wed Jul 24 20:10:12 2013
@@ -58,7 +58,7 @@
 		ast_stream_and_wait(bridge_channel->chan, limits->duration_sound, AST_DIGIT_NONE);
 	}
 
-	ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+	ast_bridge_channel_leave_bridge(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
 
 	ast_test_suite_event_notify("BRIDGE_TIMELIMIT", "Channel1: %s", ast_channel_name(bridge_channel->chan));
 	return -1;

Modified: team/dlee/record-controls/bridges/bridge_native_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/bridges/bridge_native_rtp.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/bridges/bridge_native_rtp.c (original)
+++ team/dlee/record-controls/bridges/bridge_native_rtp.c Wed Jul 24 20:10:12 2013
@@ -84,7 +84,7 @@
 /*! \brief Internal helper function which checks whether the channels are compatible with our native bridging */
 static int native_rtp_bridge_capable(struct ast_channel *chan)
 {
-	return ast_channel_has_audio_frame_or_monitor(chan);
+	return !ast_channel_has_audio_frame_or_monitor(chan);
 }
 
 /*! \brief Internal helper function which gets all RTP information (glue and instances) relating to the given channels */
@@ -249,7 +249,7 @@
 	ast_channel_lock(bridge_channel->chan);
 	data->id = ast_framehook_attach(bridge_channel->chan, &hook);
 	ast_channel_unlock(bridge_channel->chan);
-	if (!data->id < 0) {
+	if (data->id < 0) {
 		ao2_cleanup(data);
 		return -1;
 	}
@@ -323,11 +323,15 @@
 		}
 		ast_rtp_instance_set_bridged(instance0, instance1);
 		ast_rtp_instance_set_bridged(instance1, instance0);
+		ast_debug(2, "Locally RTP bridged '%s' and '%s' in stack\n",
+			ast_channel_name(c0->chan), ast_channel_name(c1->chan));
 		break;
 
 	case AST_RTP_GLUE_RESULT_REMOTE:
 		glue0->update_peer(c0->chan, instance1, vinstance1, tinstance1, cap1, 0);
 		glue1->update_peer(c1->chan, instance0, vinstance0, tinstance0, cap0, 0);
+		ast_debug(2, "Remotely bridged '%s' and '%s' - media will flow directly between them\n",
+			ast_channel_name(c0->chan), ast_channel_name(c1->chan));
 		break;
 	case AST_RTP_GLUE_RESULT_FORBID:
 		break;
@@ -378,6 +382,9 @@
 	case AST_RTP_GLUE_RESULT_FORBID:
 		break;
 	}
+
+	ast_debug(2, "Discontinued RTP bridging of '%s' and '%s' - media will flow through Asterisk core\n",
+		ast_channel_name(c0->chan), ast_channel_name(c1->chan));
 }
 
 static int native_rtp_bridge_write(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)

Modified: team/dlee/record-controls/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/bridges/bridge_softmix.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/bridges/bridge_softmix.c (original)
+++ team/dlee/record-controls/bridges/bridge_softmix.c Wed Jul 24 20:10:12 2013
@@ -477,7 +477,7 @@
 	int video_src_priority;
 
 	/* Determine if the video frame should be distributed or not */
-	switch (bridge->video_mode.mode) {
+	switch (bridge->softmix.video_mode.mode) {
 	case AST_BRIDGE_VIDEO_MODE_NONE:
 		break;
 	case AST_BRIDGE_VIDEO_MODE_SINGLE_SRC:
@@ -533,7 +533,7 @@
 	ast_mutex_lock(&sc->lock);
 	ast_dsp_silence_with_energy(sc->dsp, frame, &totalsilence, &cur_energy);
 
-	if (bridge->video_mode.mode == AST_BRIDGE_VIDEO_MODE_TALKER_SRC) {
+	if (bridge->softmix.video_mode.mode == AST_BRIDGE_VIDEO_MODE_TALKER_SRC) {
 		int cur_slot = sc->video_talker.energy_history_cur_slot;
 
 		sc->video_talker.energy_accum -= sc->video_talker.energy_history[cur_slot];
@@ -851,7 +851,7 @@
 		/* These variables help determine if a rate change is required */
 		if (!stat_iteration_counter) {
 			memset(&stats, 0, sizeof(stats));
-			stats.locked_rate = bridge->internal_sample_rate;
+			stats.locked_rate = bridge->softmix.internal_sample_rate;
 		}
 
 		/* If the sample rate has changed, update the translator helper */
@@ -942,8 +942,9 @@
 		ast_bridge_lock(bridge);
 
 		/* make sure to detect mixing interval changes if they occur. */
-		if (bridge->internal_mixing_interval && (bridge->internal_mixing_interval != softmix_data->internal_mixing_interval)) {
-			softmix_data->internal_mixing_interval = bridge->internal_mixing_interval;
+		if (bridge->softmix.internal_mixing_interval
+			&& (bridge->softmix.internal_mixing_interval != softmix_data->internal_mixing_interval)) {
+			softmix_data->internal_mixing_interval = bridge->softmix.internal_mixing_interval;
 			ast_timer_set_rate(timer, (1000 / softmix_data->internal_mixing_interval));
 			update_all_rates = 1; /* if the interval changes, the rates must be adjusted as well just to be notified new interval.*/
 		}

Modified: team/dlee/record-controls/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/channels/chan_dahdi.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/channels/chan_dahdi.c (original)
+++ team/dlee/record-controls/channels/chan_dahdi.c Wed Jul 24 20:10:12 2013
@@ -62,6 +62,7 @@
 #else
 #include <sys/signal.h>
 #endif
+#include <sys/stat.h>
 #include <math.h>
 
 #include "sig_analog.h"
@@ -1744,7 +1745,7 @@
 	if (bridged && ast_channel_tech(bridged) == &dahdi_tech) {
 		struct dahdi_pvt *p = ast_channel_tech_pvt(bridged);
 
-		if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+		if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 			return p->sig_pvt;
 		}
 	}
@@ -2429,9 +2430,9 @@
 	struct dahdi_pvt *p = pvt;
 
 	if (enable)
-		dahdi_enable_ec(p);
+		dahdi_ec_enable(p);
 	else
-		dahdi_disable_ec(p);
+		dahdi_ec_disable(p);
 
 	return 0;
 }
@@ -3578,7 +3579,7 @@
 	struct ast_callid *callid = NULL;
 	int callid_created = ast_callid_threadstorage_auto(&callid);
 	p = openr2_chan_get_client_data(r2chan);
-	dahdi_enable_ec(p);
+	dahdi_ec_enable(p);
 	p->mfcr2_call_accepted = 1;
 	/* if it's an incoming call ... */
 	if (OR2_DIR_BACKWARD == openr2_chan_get_direction(r2chan)) {
@@ -4364,7 +4365,7 @@
 	return 0;
 }
 
-void update_conf(struct dahdi_pvt *p)
+void dahdi_conf_update(struct dahdi_pvt *p)
 {
 	int needconf = 0;
 	int x;
@@ -4419,7 +4420,7 @@
 	ast_debug(1, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
 }
 
-void dahdi_enable_ec(struct dahdi_pvt *p)
+void dahdi_ec_enable(struct dahdi_pvt *p)
 {
 	int res;
 	if (!p)
@@ -4491,7 +4492,7 @@
 	}
 }
 
-void dahdi_disable_ec(struct dahdi_pvt *p)
+void dahdi_ec_disable(struct dahdi_pvt *p)
 {
 	int res;
 
@@ -4993,7 +4994,7 @@
 #endif	/* defined(HAVE_SS7) */
 
 	/* If this is analog signalling we can exit here */
-	if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+	if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 		p->callwaitrings = 0;
 		res = analog_call(p->sig_pvt, ast, rdest, timeout);
 		ast_mutex_unlock(&p->lock);
@@ -5344,7 +5345,7 @@
 	}
 
 	if (p->sig_pvt) {
-		if (analog_lib_handles(p->sig, 0, 0)) {
+		if (dahdi_analog_lib_handles(p->sig, 0, 0)) {
 			analog_delete(p->sig_pvt);
 		}
 		switch (p->sig) {
@@ -5747,7 +5748,7 @@
 
 	ast_mutex_lock(&p->lock);
 	p->exten[0] = '\0';
-	if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+	if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 		dahdi_confmute(p, 0);
 		restore_gains(p);
 		p->ignoredtmf = 0;
@@ -5805,14 +5806,14 @@
 		sig_pri_hangup(p->sig_pvt, ast);
 
 		tone_zone_play_tone(p->subs[SUB_REAL].dfd, -1);
-		dahdi_disable_ec(p);
+		dahdi_ec_disable(p);
 
 		x = 0;
 		ast_channel_setoption(ast, AST_OPTION_TDD, &x, sizeof(char), 0);
 		p->didtdd = 0;/* Probably not used in this mode. Reset anyway. */
 
 		p->rdnis[0] = '\0';
-		update_conf(p);
+		dahdi_conf_update(p);
 		reset_conf(p);
 
 		/* Restore data mode */
@@ -5867,13 +5868,13 @@
 		sig_ss7_hangup(p->sig_pvt, ast);
 
 		tone_zone_play_tone(p->subs[SUB_REAL].dfd, -1);
-		dahdi_disable_ec(p);
+		dahdi_ec_disable(p);
 
 		x = 0;
 		ast_channel_setoption(ast, AST_OPTION_TDD, &x, sizeof(char), 0);
 		p->didtdd = 0;/* Probably not used in this mode. Reset anyway. */
 
-		update_conf(p);
+		dahdi_conf_update(p);
 		reset_conf(p);
 
 		/* Restore data mode */
@@ -6094,7 +6095,7 @@
 			break;
 		}
 		if (p->sig)
-			dahdi_disable_ec(p);
+			dahdi_ec_disable(p);
 		x = 0;
 		ast_channel_setoption(ast,AST_OPTION_TONE_VERIFY,&x,sizeof(char),0);
 		ast_channel_setoption(ast,AST_OPTION_TDD,&x,sizeof(char),0);
@@ -6105,7 +6106,7 @@
 		p->waitingfordt.tv_sec = 0;
 		p->dialing = 0;
 		p->rdnis[0] = '\0';
-		update_conf(p);
+		dahdi_conf_update(p);
 		reset_conf(p);
 		/* Restore data mode */
 		switch (p->sig) {
@@ -6163,7 +6164,7 @@
 		return 0;
 	}
 
-	if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+	if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 		res = analog_answer(p->sig_pvt, ast);
 		ast_mutex_unlock(&p->lock);
 		return res;
@@ -6211,7 +6212,7 @@
 	return res;
 }
 
-void disable_dtmf_detect(struct dahdi_pvt *p)
+void dahdi_dtmf_detect_disable(struct dahdi_pvt *p)
 {
 	int val = 0;
 
@@ -6225,7 +6226,7 @@
 	}
 }
 
-void enable_dtmf_detect(struct dahdi_pvt *p)
+void dahdi_dtmf_detect_enable(struct dahdi_pvt *p)
 {
 	int val = DAHDI_TONEDETECT_ON | DAHDI_TONEDETECT_MUTE;
 
@@ -6350,7 +6351,7 @@
 		}
 		ast_debug(1, "Set option TDD MODE, value: %s(%d) on %s\n",
 			(*cp == 2) ? "MATE" : "ON", (int) *cp, ast_channel_name(chan));
-		dahdi_disable_ec(p);
+		dahdi_ec_disable(p);
 		/* otherwise, turn it on */
 		if (!p->didtdd) { /* if havent done it yet */
 			unsigned char mybuf[41000];/*! \todo XXX This is an abuse of the stack!! */
@@ -6432,7 +6433,7 @@
 		if (!*cp) {
 			ast_debug(1, "Set option AUDIO MODE, value: OFF(0) on %s\n", ast_channel_name(chan));
 			x = 0;
-			dahdi_disable_ec(p);
+			dahdi_ec_disable(p);
 		} else {
 			ast_debug(1, "Set option AUDIO MODE, value: ON(1) on %s\n", ast_channel_name(chan));
 			x = 1;
@@ -6467,19 +6468,19 @@
 		cp = (char *) data;
 		if (*cp) {
 			ast_debug(1, "Enabling echo cancellation on %s\n", ast_channel_name(chan));
-			dahdi_enable_ec(p);
+			dahdi_ec_enable(p);
 		} else {
 			ast_debug(1, "Disabling echo cancellation on %s\n", ast_channel_name(chan));
-			dahdi_disable_ec(p);
+			dahdi_ec_disable(p);
 		}
 		break;
 	case AST_OPTION_DIGIT_DETECT:
 		cp = (char *) data;
 		ast_debug(1, "%sabling digit detection on %s\n", *cp ? "En" : "Dis", ast_channel_name(chan));
 		if (*cp) {
-			enable_dtmf_detect(p);
+			dahdi_dtmf_detect_enable(p);
 		} else {
-			disable_dtmf_detect(p);
+			dahdi_dtmf_detect_disable(p);
 		}
 		break;
 	case AST_OPTION_FAX_DETECT:
@@ -6674,11 +6675,11 @@
 	} else if (!strcasecmp(data, "echocan_mode")) {
 		if (!strcasecmp(value, "on")) {
 			ast_mutex_lock(&p->lock);
-			dahdi_enable_ec(p);
+			dahdi_ec_enable(p);
 			ast_mutex_unlock(&p->lock);
 		} else if (!strcasecmp(value, "off")) {
 			ast_mutex_lock(&p->lock);
-			dahdi_disable_ec(p);
+			dahdi_ec_disable(p);
 			ast_mutex_unlock(&p->lock);
 #ifdef HAVE_DAHDI_ECHOCANCEL_FAX_MODE
 		} else if (!strcasecmp(value, "fax")) {
@@ -6686,7 +6687,7 @@
 
 			ast_mutex_lock(&p->lock);
 			if (!p->echocanon) {
-				dahdi_enable_ec(p);
+				dahdi_ec_enable(p);
 			}
 			if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_FAX_MODE, &blah)) {
 				ast_log(LOG_WARNING, "Unable to place echocan into fax mode on channel %d: %s\n", p->channel, strerror(errno));
@@ -6697,7 +6698,7 @@
 
 			ast_mutex_lock(&p->lock);
 			if (!p->echocanon) {
-				dahdi_enable_ec(p);
+				dahdi_ec_enable(p);
 			}
 			if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_FAX_MODE, &blah)) {
 				ast_log(LOG_WARNING, "Unable to place echocan into voice mode on channel %d: %s\n", p->channel, strerror(errno));
@@ -6715,7 +6716,7 @@
 	return res;
 }
 
-void dahdi_unlink(struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock)
+void dahdi_master_slave_unlink(struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock)
 {
 	/* Unlink a specific slave or all slaves/masters from a given master */
 	int x;
@@ -6763,7 +6764,7 @@
 		}
 		master->master = NULL;
 	}
-	update_conf(master);
+	dahdi_conf_update(master);
 	if (needlock) {
 		if (slave)
 			ast_mutex_unlock(&slave->lock);
@@ -6771,7 +6772,7 @@
 	}
 }
 
-void dahdi_link(struct dahdi_pvt *slave, struct dahdi_pvt *master)
+void dahdi_master_slave_link(struct dahdi_pvt *slave, struct dahdi_pvt *master)
 {
 	int x;
 	if (!slave || !master) {
@@ -6809,12 +6810,12 @@
 	for (x = 0; x < 3; x++) {
 		if (p->subs[x].owner == oldchan) {
 			if (!x) {
-				dahdi_unlink(NULL, p, 0);
+				dahdi_master_slave_unlink(NULL, p, 0);
 			}
 			p->subs[x].owner = newchan;
 		}
 	}
-	if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+	if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 		analog_fixup(oldchan, newchan, p->sig_pvt);
 #if defined(HAVE_PRI)
 	} else if (dahdi_sig_pri_lib_handles(p->sig)) {
@@ -6825,7 +6826,7 @@
 		sig_ss7_fixup(oldchan, newchan, p->sig_pvt);
 #endif	/* defined(HAVE_SS7) */
 	}
-	update_conf(p);
+	dahdi_conf_update(p);
 
 	ast_mutex_unlock(&p->lock);
 
@@ -7268,7 +7269,7 @@
 			return NULL;
 		}
 		if (!x) { /* if not still dialing in driver */
-			dahdi_enable_ec(p);
+			dahdi_ec_enable(p);
 			if (p->echobreak) {
 				dahdi_train_ec(p);
 				ast_copy_string(p->dop.dialstr, p->echorest, sizeof(p->dop.dialstr));
@@ -7463,7 +7464,7 @@
 			}
 			/* Fall through */
 		default:
-			dahdi_disable_ec(p);
+			dahdi_ec_disable(p);
 			return NULL;
 		}
 		break;
@@ -7518,7 +7519,7 @@
 		case SIG_FXOKS:
 			switch (ast_channel_state(ast)) {
 			case AST_STATE_RINGING:
-				dahdi_enable_ec(p);
+				dahdi_ec_enable(p);
 				dahdi_train_ec(p);
 				p->subs[idx].f.frametype = AST_FRAME_CONTROL;
 				p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
@@ -7786,7 +7787,7 @@
 					/* Swap things around between the three-way and real call */
 					swap_subs(p, SUB_THREEWAY, SUB_REAL);
 					/* Disable echo canceller for better dialing */
-					dahdi_disable_ec(p);
+					dahdi_ec_disable(p);
 					res = tone_zone_play_tone(p->subs[SUB_REAL].dfd, DAHDI_TONE_DIALRECALL);
 					if (res)
 						ast_log(LOG_WARNING, "Unable to start dial recall tone on channel %d\n", p->channel);
@@ -7796,7 +7797,7 @@
 					} else if (ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan)) {
 						ast_log(LOG_WARNING, "Unable to start simple switch on channel %d\n", p->channel);
 						res = tone_zone_play_tone(p->subs[SUB_REAL].dfd, DAHDI_TONE_CONGESTION);
-						dahdi_enable_ec(p);
+						dahdi_ec_enable(p);
 						ast_hangup(chan);
 					} else {
 						ast_verb(3, "Started three way call on channel %d\n", p->channel);
@@ -7853,12 +7854,12 @@
 							ast_queue_unhold(p->subs[SUB_REAL].owner);
 						}
 						p->subs[SUB_REAL].needunhold = 1;
-						dahdi_enable_ec(p);
+						dahdi_ec_enable(p);
 					}
 				}
 			}
 winkflashdone:
-			update_conf(p);
+			dahdi_conf_update(p);
 			break;
 		case SIG_EM:
 		case SIG_EM_E1:
@@ -8051,7 +8052,7 @@
 		}
 		switch (res) {
 		case DAHDI_EVENT_ONHOOK:
-			dahdi_disable_ec(p);
+			dahdi_ec_disable(p);
 			if (p->owner) {
 				ast_verb(3, "Channel %s still has call, ringing phone\n", ast_channel_name(p->owner));
 				dahdi_ring_phone(p);
@@ -8060,10 +8061,10 @@
 				p->cid_suppress_expire = 0;
 			} else
 				ast_log(LOG_WARNING, "Absorbed on hook, but nobody is left!?!?\n");
-			update_conf(p);
+			dahdi_conf_update(p);
 			break;
 		case DAHDI_EVENT_RINGOFFHOOK:
-			dahdi_enable_ec(p);
+			dahdi_ec_enable(p);
 			dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_OFFHOOK);
 			if (p->owner && (ast_channel_state(p->owner) == AST_STATE_RINGING)) {
 				p->subs[SUB_REAL].needanswer = 1;
@@ -8094,7 +8095,7 @@
 				p->subs[SUB_REAL].needunhold = 1;
 			} else
 				ast_log(LOG_WARNING, "Absorbed on hook, but nobody is left!?!?\n");
-			update_conf(p);
+			dahdi_conf_update(p);
 			break;
 		default:
 			ast_log(LOG_WARNING, "Don't know how to absorb event %s\n", event2str(res));
@@ -8132,7 +8133,7 @@
 	struct dahdi_pvt *p = ast_channel_tech_pvt(ast);
 	struct ast_frame *f;
 	ast_mutex_lock(&p->lock);
-	if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+	if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 		struct analog_pvt *analog_p = p->sig_pvt;
 		f = analog_exception(analog_p, ast);
 	} else {
@@ -8329,7 +8330,7 @@
 	 * if this channel owns the private.
 	 */
 	if (p->fake_event && p->owner == ast) {
-		if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+		if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 			struct analog_pvt *analog_p = p->sig_pvt;
 
 			f = analog_exception(analog_p, ast);
@@ -8373,7 +8374,7 @@
 				ast_mutex_unlock(&p->lock);
 				return &p->subs[idx].f;
 			} else if (errno == ELAST) {
-				if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+				if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 					struct analog_pvt *analog_p = p->sig_pvt;
 					f = analog_exception(analog_p, ast);
 				} else {
@@ -8387,7 +8388,7 @@
 	}
 	if (res != (p->subs[idx].linear ? READ_SIZE * 2 : READ_SIZE)) {
 		ast_debug(1, "Short read (%d/%d), must be an event...\n", res, p->subs[idx].linear ? READ_SIZE * 2 : READ_SIZE);
-		if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+		if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 			struct analog_pvt *analog_p = p->sig_pvt;
 			f = analog_exception(analog_p, ast);
 		} else {
@@ -8565,7 +8566,7 @@
 		switch (f->frametype) {
 		case AST_FRAME_DTMF_BEGIN:
 		case AST_FRAME_DTMF_END:
-			if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+			if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 				analog_handle_dtmf(p->sig_pvt, ast, idx, &f);
 			} else {
 				dahdi_handle_dtmf(ast, idx, &f);
@@ -9013,7 +9014,7 @@
 		ast_channel_amaflags_set(tmp, i->amaflags);
 	i->subs[idx].owner = tmp;
 	ast_channel_context_set(tmp, i->context);
-	if (!analog_lib_handles(i->sig, i->radio, i->oprmode)) {
+	if (!dahdi_analog_lib_handles(i->sig, i->radio, i->oprmode)) {
 		ast_channel_call_forward_set(tmp, i->call_forward);
 	}
 	/* If we've been told "no ADSI" then enforce it */
@@ -9157,7 +9158,7 @@
  */
 static int dahdi_dnd(struct dahdi_pvt *dahdichan, int flag)
 {
-	if (analog_lib_handles(dahdichan->sig, dahdichan->radio, dahdichan->oprmode)) {
+	if (dahdi_analog_lib_handles(dahdichan->sig, dahdichan->radio, dahdichan->oprmode)) {
 		return analog_dnd(dahdichan->sig_pvt, flag);
 	}
 
@@ -9494,7 +9495,7 @@
 				goto quit;
 			}
 		}
-		dahdi_enable_ec(p);
+		dahdi_ec_enable(p);
 		if (NEED_MFDETECT(p)) {
 			if (p->dsp) {
 				if (!p->hardwaredtmf)
@@ -9593,7 +9594,7 @@
 								ast_set_callerid(chan, NULL, p->cid_name, NULL);
 						}
 						ast_setstate(chan, AST_STATE_RING);
-						dahdi_enable_ec(p);
+						dahdi_ec_enable(p);
 						res = ast_pbx_run(chan);
 						if (res) {
 							ast_log(LOG_WARNING, "PBX exited non-zero\n");
@@ -9640,7 +9641,7 @@
 						swap_subs(p, SUB_CALLWAIT, SUB_THREEWAY);
 						unalloc_sub(p, SUB_THREEWAY);
 					}
-					dahdi_enable_ec(p);
+					dahdi_ec_enable(p);
 					if (ast_pickup_call(chan)) {
 						ast_debug(1, "No call pickup possible...\n");
 						res = tone_zone_play_tone(p->subs[idx].dfd, DAHDI_TONE_CONGESTION);
@@ -10424,7 +10425,7 @@
 			case DAHDI_EVENT_BITSCHANGED:
 				break;
 			case DAHDI_EVENT_NOALARM:
-				if (analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
+				if (dahdi_analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
 					struct analog_pvt *analog_p = mtd->pvt->sig_pvt;
 
 					analog_p->inalarm = 0;
@@ -10433,7 +10434,7 @@
 				handle_clear_alarms(mtd->pvt);
 				break;
 			case DAHDI_EVENT_ALARM:
-				if (analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
+				if (dahdi_analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
 					struct analog_pvt *analog_p = mtd->pvt->sig_pvt;
 
 					analog_p->inalarm = 1;
@@ -10453,7 +10454,7 @@
 				if ((chan = dahdi_new(mtd->pvt, AST_STATE_RING, 0, SUB_REAL, 0, NULL, callid))) {
 					int result;
 
-					if (analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
+					if (dahdi_analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
 						result = analog_ss_thread_start(mtd->pvt->sig_pvt, chan);
 					} else {
 						result = ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan);
@@ -10780,7 +10781,7 @@
 			restore_conference(i);
 
 			if (i->immediate) {
-				dahdi_enable_ec(i);
+				dahdi_ec_enable(i);
 				/* The channel is immediately up.  Start right away */
 				res = tone_zone_play_tone(i->subs[SUB_REAL].dfd, DAHDI_TONE_RINGTONE);
 				chan = dahdi_new(i, AST_STATE_RING, 1, SUB_REAL, 0, NULL, callid);
@@ -10929,7 +10930,7 @@
 		case SIG_FXSGS:
 		case SIG_FXSKS:
 		case SIG_FXOKS:
-			dahdi_disable_ec(i);
+			dahdi_ec_disable(i);
 			/* Diddle the battery for the zhone */
 #ifdef ZHONE_HACK
 			dahdi_set_hook(i->subs[SUB_REAL].dfd, DAHDI_OFFHOOK);
@@ -10940,7 +10941,7 @@
 			break;
 		case SIG_SS7:
 		case SIG_PRI_LIB_HANDLE_CASES:
-			dahdi_disable_ec(i);
+			dahdi_ec_disable(i);
 			res = tone_zone_play_tone(i->subs[SUB_REAL].dfd, -1);
 			break;
 		default:
@@ -11048,7 +11049,7 @@
 		for (i = iflist; i; i = i->next) {
 			ast_mutex_lock(&i->lock);
 			if (pfds && (i->subs[SUB_REAL].dfd > -1) && i->sig && (!i->radio) && !(i->sig & SIG_MFCR2)) {
-				if (analog_lib_handles(i->sig, i->radio, i->oprmode)) {
+				if (dahdi_analog_lib_handles(i->sig, i->radio, i->oprmode)) {
 					struct analog_pvt *p = i->sig_pvt;
 
 					if (!p) {
@@ -11162,7 +11163,7 @@
 						ast_debug(1, "Monitor doohicky got event %s on radio channel %d\n", event2str(res), i->channel);
 						/* Don't hold iflock while handling init events */
 						ast_mutex_unlock(&iflock);
-						if (analog_lib_handles(i->sig, i->radio, i->oprmode))
+						if (dahdi_analog_lib_handles(i->sig, i->radio, i->oprmode))
 							doomed = (struct dahdi_pvt *) analog_handle_init_event(i->sig_pvt, dahdievent_to_analogevent(res));
 						else
 							doomed = handle_init_event(i, res);
@@ -11228,7 +11229,7 @@
 									pthread_t threadid;
 									struct ast_channel *chan;
 									ast_mutex_unlock(&iflock);
-									if (analog_lib_handles(i->sig, i->radio, i->oprmode)) {
+									if (dahdi_analog_lib_handles(i->sig, i->radio, i->oprmode)) {
 										/* just in case this event changes or somehow destroys a channel, set doomed here too */
 										doomed = analog_handle_init_event(i->sig_pvt, ANALOG_EVENT_DTMFCID);  
 										i->dtmfcid_holdoff_state = 1;
@@ -11273,7 +11274,7 @@
 					/* Don't hold iflock while handling init events */
 					ast_mutex_unlock(&iflock);
 					if (0 == i->mwisendactive || 0 == mwi_send_process_event(i, res)) {
-						if (analog_lib_handles(i->sig, i->radio, i->oprmode))
+						if (dahdi_analog_lib_handles(i->sig, i->radio, i->oprmode))
 							doomed = (struct dahdi_pvt *) analog_handle_init_event(i->sig_pvt, dahdievent_to_analogevent(res));
 						else
 							doomed = handle_init_event(i, res);
@@ -11742,7 +11743,7 @@
 			tmp->sig = chan_sig;
 			tmp->outsigmod = conf->chan.outsigmod;
 
-			if (analog_lib_handles(chan_sig, tmp->radio, tmp->oprmode)) {
+			if (dahdi_analog_lib_handles(chan_sig, tmp->radio, tmp->oprmode)) {
 				analog_p = analog_new(dahdisig_to_analogsig(chan_sig), tmp);
 				if (!analog_p) {
 					destroy_dahdi_pvt(tmp);
@@ -12256,7 +12257,7 @@
 		ast_copy_string(tmp->description, conf->chan.description, sizeof(tmp->description));
 		ast_copy_string(tmp->parkinglot, conf->chan.parkinglot, sizeof(tmp->parkinglot));
 		tmp->cid_ton = 0;
-		if (analog_lib_handles(tmp->sig, tmp->radio, tmp->oprmode)) {
+		if (dahdi_analog_lib_handles(tmp->sig, tmp->radio, tmp->oprmode)) {
 			ast_copy_string(tmp->cid_num, conf->chan.cid_num, sizeof(tmp->cid_num));
 			ast_copy_string(tmp->cid_name, conf->chan.cid_name, sizeof(tmp->cid_name));
 		} else {
@@ -12322,7 +12323,7 @@
 			set_actual_gain(tmp->subs[SUB_REAL].dfd, tmp->rxgain, tmp->txgain, tmp->rxdrc, tmp->txdrc, tmp->law);
 			if (tmp->dsp)
 				ast_dsp_set_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
-			update_conf(tmp);
+			dahdi_conf_update(tmp);
 			if (!here) {
 				switch (chan_sig) {
 				case SIG_PRI_LIB_HANDLE_CASES:
@@ -12582,7 +12583,7 @@
 	if (p->inalarm)
 		return 0;
 
-	if (analog_lib_handles(p->sig, p->radio, p->oprmode))
+	if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode))
 		return analog_available(p->sig_pvt);
 
 	switch (p->sig) {
@@ -13088,7 +13089,7 @@
 			}
 
 			p->outgoing = 1;
-			if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
+			if (dahdi_analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 				tmp = analog_request(p->sig_pvt, &callwait, requestor);
 #ifdef HAVE_PRI
 			} else if (dahdi_sig_pri_lib_handles(p->sig)) {
@@ -15432,7 +15433,7 @@
 		astman_send_error(s, m, "No such channel");
 		return 0;
 	}
-	if (!analog_lib_handles(p->sig, 0, 0)) {
+	if (!dahdi_analog_lib_handles(p->sig, 0, 0)) {
 		astman_send_error(s, m, "Channel signaling is not analog");
 		return 0;
 	}
@@ -15455,7 +15456,7 @@
 		astman_send_error(s, m, "No such channel");
 		return 0;
 	}
-	if (!analog_lib_handles(p->sig, 0, 0)) {
+	if (!dahdi_analog_lib_handles(p->sig, 0, 0)) {
 		astman_send_error(s, m, "Channel signaling is not analog");
 		return 0;
 	}

Modified: team/dlee/record-controls/channels/chan_dahdi.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/channels/chan_dahdi.h?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/channels/chan_dahdi.h (original)
+++ team/dlee/record-controls/channels/chan_dahdi.h Wed Jul 24 20:10:12 2013
@@ -745,7 +745,7 @@
 	return handles;
 }
 
-static inline int analog_lib_handles(int signalling, int radio, int oprmode)
+static inline int dahdi_analog_lib_handles(int signalling, int radio, int oprmode)
 {
 	switch (signalling) {
 	case SIG_FXOLS:
@@ -789,15 +789,15 @@
 #define dahdi_get_index(ast, p, nullok)	_dahdi_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__)
 int _dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line);
 
-void disable_dtmf_detect(struct dahdi_pvt *p);
-void enable_dtmf_detect(struct dahdi_pvt *p);
-
-void dahdi_enable_ec(struct dahdi_pvt *p);
-void dahdi_disable_ec(struct dahdi_pvt *p);
-
-void update_conf(struct dahdi_pvt *p);
-void dahdi_link(struct dahdi_pvt *slave, struct dahdi_pvt *master);
-void dahdi_unlink(struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock);
+void dahdi_dtmf_detect_disable(struct dahdi_pvt *p);
+void dahdi_dtmf_detect_enable(struct dahdi_pvt *p);
+
+void dahdi_ec_enable(struct dahdi_pvt *p);
+void dahdi_ec_disable(struct dahdi_pvt *p);
+
+void dahdi_conf_update(struct dahdi_pvt *p);
+void dahdi_master_slave_link(struct dahdi_pvt *slave, struct dahdi_pvt *master);
+void dahdi_master_slave_unlink(struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock);
 
 /* ------------------------------------------------------------------- */
 

Modified: team/dlee/record-controls/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/channels/chan_gulp.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/channels/chan_gulp.c (original)
+++ team/dlee/record-controls/channels/chan_gulp.c Wed Jul 24 20:10:12 2013
@@ -1510,7 +1510,7 @@
 	}
 
 	clear_session_and_channel(session, ast, pvt);
-	ao2_cleanup(pvt);
+	ao2_cleanup(channel);
 	ao2_cleanup(h_data);
 
 	return 0;
@@ -1540,7 +1540,7 @@
 	 * to be able to send our SIP request/response
 	 */
 	clear_session_and_channel(channel->session, ast, pvt);
-	ao2_cleanup(pvt);
+	ao2_cleanup(channel);
 	ao2_cleanup(h_data);
 
 	return -1;
@@ -1604,7 +1604,7 @@
 static struct ast_channel *gulp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct request_data req_data;
-	struct ast_sip_session *session;
+	RAII_VAR(struct ast_sip_session *, session, NULL, ao2_cleanup);
 
 	req_data.caps = cap;
 	req_data.dest = data;

Modified: team/dlee/record-controls/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/channels/chan_mgcp.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/channels/chan_mgcp.c (original)
+++ team/dlee/record-controls/channels/chan_mgcp.c Wed Jul 24 20:10:12 2013
@@ -3049,7 +3049,6 @@
 						p->hidecallerid ? "" : p->cid_name,
 						ast_channel_caller(chan)->ani.number.valid ? NULL : p->cid_num);
 					ast_setstate(chan, AST_STATE_RING);
-					/*dahdi_enable_ec(p);*/
 					if (p->dtmfmode & MGCP_DTMF_HYBRID) {
 						p->dtmfmode |= MGCP_DTMF_INBAND;
 						ast_indicate(chan, -1);

Modified: team/dlee/record-controls/channels/dahdi/bridge_native_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record-controls/channels/dahdi/bridge_native_dahdi.c?view=diff&rev=395356&r1=395355&r2=395356
==============================================================================
--- team/dlee/record-controls/channels/dahdi/bridge_native_dahdi.c (original)
+++ team/dlee/record-controls/channels/dahdi/bridge_native_dahdi.c Wed Jul 24 20:10:12 2013
@@ -156,16 +156,16 @@
 
 		ast_mutex_lock(&chan_tech_pvt->pvt->lock);
 		if (chan_tech_pvt->pvt == ast_channel_tech_pvt(cur->chan)) {
-			dahdi_enable_ec(chan_tech_pvt->pvt);
+			dahdi_ec_enable(chan_tech_pvt->pvt);
 		}
 		if (chan_tech_pvt->index == SUB_REAL) {
-			enable_dtmf_detect(chan_tech_pvt->pvt);
+			dahdi_dtmf_detect_enable(chan_tech_pvt->pvt);
 		}

[... 5387 lines stripped ...]



More information about the asterisk-commits mailing list