[asterisk-commits] sgriepentrog: branch sgriepentrog/12-linkedid r407566 - in /team/sgriepentrog...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 6 09:42:57 CST 2014


Author: sgriepentrog
Date: Thu Feb  6 09:42:40 2014
New Revision: 407566

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407566
Log:
patched to include review 3191

Modified:
    team/sgriepentrog/12-linkedid/apps/app_chanspy.c
    team/sgriepentrog/12-linkedid/apps/app_confbridge.c
    team/sgriepentrog/12-linkedid/apps/app_dumpchan.c
    team/sgriepentrog/12-linkedid/apps/app_followme.c
    team/sgriepentrog/12-linkedid/apps/app_minivm.c
    team/sgriepentrog/12-linkedid/apps/app_queue.c
    team/sgriepentrog/12-linkedid/apps/app_voicemail.c
    team/sgriepentrog/12-linkedid/channels/chan_console.c
    team/sgriepentrog/12-linkedid/channels/chan_iax2.c
    team/sgriepentrog/12-linkedid/channels/chan_mgcp.c
    team/sgriepentrog/12-linkedid/channels/chan_motif.c
    team/sgriepentrog/12-linkedid/channels/chan_multicast_rtp.c
    team/sgriepentrog/12-linkedid/channels/chan_oss.c
    team/sgriepentrog/12-linkedid/channels/chan_phone.c
    team/sgriepentrog/12-linkedid/channels/chan_pjsip.c
    team/sgriepentrog/12-linkedid/channels/chan_sip.c
    team/sgriepentrog/12-linkedid/channels/chan_skinny.c
    team/sgriepentrog/12-linkedid/channels/chan_unistim.c
    team/sgriepentrog/12-linkedid/funcs/func_channel.c
    team/sgriepentrog/12-linkedid/include/asterisk/channel.h
    team/sgriepentrog/12-linkedid/include/asterisk/channel_internal.h
    team/sgriepentrog/12-linkedid/main/bridge_channel.c
    team/sgriepentrog/12-linkedid/main/cel.c
    team/sgriepentrog/12-linkedid/main/channel.c
    team/sgriepentrog/12-linkedid/main/channel_internal_api.c
    team/sgriepentrog/12-linkedid/main/core_unreal.c
    team/sgriepentrog/12-linkedid/main/endpoints.c
    team/sgriepentrog/12-linkedid/main/features.c
    team/sgriepentrog/12-linkedid/main/manager.c
    team/sgriepentrog/12-linkedid/main/pbx.c
    team/sgriepentrog/12-linkedid/main/stasis_bridges.c
    team/sgriepentrog/12-linkedid/main/stasis_channels.c
    team/sgriepentrog/12-linkedid/res/ari/resource_channels.c
    team/sgriepentrog/12-linkedid/res/parking/parking_applications.c
    team/sgriepentrog/12-linkedid/res/parking/parking_bridge_features.c
    team/sgriepentrog/12-linkedid/res/res_agi.c
    team/sgriepentrog/12-linkedid/res/res_fax.c
    team/sgriepentrog/12-linkedid/res/res_monitor.c
    team/sgriepentrog/12-linkedid/res/res_musiconhold.c
    team/sgriepentrog/12-linkedid/res/res_pjsip_refer.c
    team/sgriepentrog/12-linkedid/res/res_stasis.c
    team/sgriepentrog/12-linkedid/res/res_stasis_playback.c
    team/sgriepentrog/12-linkedid/res/res_stasis_recording.c
    team/sgriepentrog/12-linkedid/res/res_stasis_snoop.c
    team/sgriepentrog/12-linkedid/res/snmp/agent.c
    team/sgriepentrog/12-linkedid/res/stasis/app.c
    team/sgriepentrog/12-linkedid/res/stasis/control.c

Modified: team/sgriepentrog/12-linkedid/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_chanspy.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_chanspy.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_chanspy.c Thu Feb  6 09:42:40 2014
@@ -525,7 +525,7 @@
 									 struct ast_multi_channel_blob *payload)
 {
 	RAII_VAR(struct ast_channel_snapshot *, snapshot,
-			ast_channel_snapshot_get_latest(ast_channel_uniqueid(chan)),
+			ast_channel_snapshot_get_latest(ast_channel_uniqueid(chan)->unique_id),
 			ao2_cleanup);
 
 	if (!snapshot) {

Modified: team/sgriepentrog/12-linkedid/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_confbridge.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_confbridge.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_confbridge.c Thu Feb  6 09:42:40 2014
@@ -1511,7 +1511,7 @@
 	}
 	snprintf(user->name_rec_location, sizeof(user->name_rec_location),
 		 "%s/confbridge-name-%s-%s", destdir,
-		 conf_name, ast_channel_uniqueid(user->chan));
+		 conf_name, ast_channel_uniqueid(user->chan)->unique_id);
 
 	res = ast_play_and_record(user->chan,
 		"vm-rec-name",

Modified: team/sgriepentrog/12-linkedid/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_dumpchan.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_dumpchan.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_dumpchan.c Thu Feb  6 09:42:40 2014
@@ -130,8 +130,8 @@
 		"Blocking_in=        %s\n",
 		ast_channel_name(c),
 		ast_channel_tech(c)->type,
-		ast_channel_uniqueid(c),
-		ast_channel_linkedid(c),
+		ast_channel_uniqueid(c)->unique_id,
+		ast_channel_linkedid(c)->unique_id,
 		S_COR(ast_channel_caller(c)->id.number.valid, ast_channel_caller(c)->id.number.str, "(N/A)"),
 		S_COR(ast_channel_caller(c)->id.name.valid, ast_channel_caller(c)->id.name.str, "(N/A)"),
 		S_COR(ast_channel_connected(c)->id.number.valid, ast_channel_connected(c)->id.number.str, "(N/A)"),

Modified: team/sgriepentrog/12-linkedid/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_followme.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_followme.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_followme.c Thu Feb  6 09:42:40 2014
@@ -1407,7 +1407,7 @@
 			int duration = 5;
 
 			snprintf(targs->namerecloc, sizeof(targs->namerecloc), "%s/followme.%s",
-				ast_config_AST_SPOOL_DIR, ast_channel_uniqueid(chan));
+				ast_config_AST_SPOOL_DIR, ast_channel_uniqueid(chan)->unique_id);
 			if (ast_play_and_record(chan, "vm-rec-name", targs->namerecloc, 5, "sln", &duration,
 				NULL, ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE), 0, NULL) < 0) {
 				goto outrun;

Modified: team/sgriepentrog/12-linkedid/apps/app_minivm.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_minivm.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_minivm.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_minivm.c Thu Feb  6 09:42:40 2014
@@ -1850,7 +1850,7 @@
 	if (!mwi_state) {
 		goto notify_cleanup;
 	}
-	mwi_state->snapshot = ast_channel_snapshot_get_latest(ast_channel_uniqueid(chan));
+	mwi_state->snapshot = ast_channel_snapshot_get_latest(ast_channel_uniqueid(chan)->unique_id);
 
 	json_object = ast_json_pack("{s: s, s: s}",
 			"Event", "MiniVoiceMail"
@@ -2094,7 +2094,7 @@
 		ast_log(LOG_ERROR, "Need mailbox at context as argument. Sorry. Argument 0 %s\n", argv[0]);
 		return -1;
 	}
-	queue_mwi_event(ast_channel_uniqueid(chan), mailbox, domain, atoi(argv[1]), atoi(argv[2]), atoi(argv[3]));
+	queue_mwi_event(ast_channel_uniqueid(chan)->unique_id, mailbox, domain, atoi(argv[1]), atoi(argv[2]), atoi(argv[3]));
 
 	return res;
 }

Modified: team/sgriepentrog/12-linkedid/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_queue.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_queue.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_queue.c Thu Feb  6 09:42:40 2014
@@ -4366,7 +4366,7 @@
 			     "RingTime", rnatime);
 	queue_publish_multi_channel_blob(qe->chan, peer, queue_agent_ringnoanswer_type(), blob);
 
-	ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), membername, "RINGNOANSWER", "%d", rnatime);
+	ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan)->unique_id, membername, "RINGNOANSWER", "%d", rnatime);
 	if (qe->parent->autopause != QUEUE_AUTOPAUSE_OFF && autopause) {
 		if (qe->parent->autopausedelay > 0) {
 			struct member *mem;
@@ -5100,7 +5100,7 @@
 
 			if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty))) {
 				*reason = QUEUE_LEAVEEMPTY;
-				ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+				ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan)->unique_id, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 				leave_queue(qe);
 				break;
 			}
@@ -5464,8 +5464,8 @@
 		return NULL;
 	}
 
-	ast_string_field_set(queue_data, caller_uniqueid, ast_channel_uniqueid(qe->chan));
-	ast_string_field_set(queue_data, member_uniqueid, ast_channel_uniqueid(peer));
+	ast_string_field_set(queue_data, caller_uniqueid, ast_channel_uniqueid(qe->chan)->unique_id);
+	ast_string_field_set(queue_data, member_uniqueid, ast_channel_uniqueid(peer)->unique_id);
 	queue_data->queue = queue_ref(qe->parent);
 	queue_data->starttime = starttime;
 	queue_data->holdstart = holdstart;
@@ -6059,7 +6059,7 @@
 	if (filename) {
 		escape_and_substitute(qe->chan, filename, escaped_filename, sizeof(escaped_filename));
 	} else {
-		ast_copy_string(escaped_filename, ast_channel_uniqueid(qe->chan), sizeof(escaped_filename));
+		ast_copy_string(escaped_filename, ast_channel_uniqueid(qe->chan)->unique_id, sizeof(escaped_filename));
 	}
 
 	ast_channel_lock(qe->chan);
@@ -6467,7 +6467,7 @@
 			if (ast_check_hangup(peer)) {
 				/* Agent must have hung up */
 				ast_log(LOG_WARNING, "Agent on %s hungup on the customer.\n", ast_channel_name(peer));
-				ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "AGENTDUMP", "%s", "");
+				ast_queue_log(queuename, ast_channel_uniqueid(qe->chan)->unique_id, member->membername, "AGENTDUMP", "%s", "");
 
 				blob = ast_json_pack("{s: s, s: s, s: s}",
 						     "Queue", queuename,
@@ -6482,7 +6482,7 @@
 			} else if (ast_check_hangup(qe->chan)) {
 				/* Caller must have hung up just before being connected */
 				ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer));
-				ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+				ast_queue_log(queuename, ast_channel_uniqueid(qe->chan)->unique_id, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 				record_abandoned(qe);
 				ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));
 				ast_autoservice_chan_hangup_peer(qe->chan, peer);
@@ -6500,7 +6500,7 @@
 		/* Make sure channels are compatible */
 		res = ast_channel_make_compatible(qe->chan, peer);
 		if (res < 0) {
-			ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "SYSCOMPAT", "%s", "");
+			ast_queue_log(queuename, ast_channel_uniqueid(qe->chan)->unique_id, member->membername, "SYSCOMPAT", "%s", "");
 			ast_log(LOG_WARNING, "Had to drop call because I couldn't make %s compatible with %s\n", ast_channel_name(qe->chan), ast_channel_name(peer));
 			record_abandoned(qe);
 			ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));
@@ -6564,7 +6564,7 @@
 				if (monitorfilename) {
 					ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT);
 				} else if (qe->chan) {
-					ast_monitor_start(which, qe->parent->monfmt, ast_channel_uniqueid(qe->chan), 1, X_REC_IN | X_REC_OUT);
+					ast_monitor_start(which, qe->parent->monfmt, ast_channel_uniqueid(qe->chan)->unique_id, 1, X_REC_IN | X_REC_OUT);
 				} else {
 					/* Last ditch effort -- no channel, make up something */
 					snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random());
@@ -6656,7 +6656,7 @@
 			}
 		}
 		qe->handled++;
-		ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, ast_channel_uniqueid(peer),
+		ast_queue_log(queuename, ast_channel_uniqueid(qe->chan)->unique_id, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, ast_channel_uniqueid(peer)->unique_id,
 													(long)(orig - to > 0 ? (orig - to) / 1000 : 0));
 
 		blob = ast_json_pack("{s: s, s: s, s: s, s: i, s: i}",
@@ -7361,9 +7361,9 @@
 	switch (remove_from_queue(args.queuename, args.interface)) {
 	case RES_OKAY:
 		if (!mem || ast_strlen_zero(mem->membername)) {
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.interface, "REMOVEMEMBER", "%s", "");
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, args.interface, "REMOVEMEMBER", "%s", "");
 		} else {
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), mem->membername, "REMOVEMEMBER", "%s", "");
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, mem->membername, "REMOVEMEMBER", "%s", "");
 		}
 		ast_log(LOG_NOTICE, "Removed interface '%s' from queue '%s'\n", args.interface, args.queuename);
 		pbx_builtin_setvar_helper(chan, "RQMSTATUS", "REMOVED");
@@ -7435,9 +7435,9 @@
 	switch (add_to_queue(args.queuename, args.interface, args.membername, penalty, 0, queue_persistent_members, args.state_interface)) {
 	case RES_OKAY:
 		if (ast_strlen_zero(args.membername) || !log_membername_as_agent) {
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.interface, "ADDMEMBER", "%s", "");
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, args.interface, "ADDMEMBER", "%s", "");
 		} else {
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.membername, "ADDMEMBER", "%s", "");
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, args.membername, "ADDMEMBER", "%s", "");
 		}
 		ast_log(LOG_NOTICE, "Added interface '%s' to queue '%s'\n", args.interface, args.queuename);
 		pbx_builtin_setvar_helper(chan, "AQMSTATUS", "ADDED");
@@ -7687,7 +7687,7 @@
 	}
 	ast_assert(qe.parent != NULL);
 
-	ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ENTERQUEUE", "%s|%s|%d",
+	ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, "NONE", "ENTERQUEUE", "%s|%s|%d",
 		S_OR(args.url, ""),
 		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, ""),
 		qe.opos);
@@ -7719,7 +7719,7 @@
 			record_abandoned(&qe);
 			reason = QUEUE_TIMEOUT;
 			res = 0;
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
 				qe.pos, qe.opos, (long) time(NULL) - qe.start);
 			break;
 		}
@@ -7744,7 +7744,7 @@
 			record_abandoned(&qe);
 			reason = QUEUE_TIMEOUT;
 			res = 0;
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
 			break;
 		}
 
@@ -7764,7 +7764,7 @@
 			if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty))) {
 				record_abandoned(&qe);
 				reason = QUEUE_LEAVEEMPTY;
-				ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
+				ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
 				res = 0;
 				break;
 			}
@@ -7773,7 +7773,7 @@
 		/* exit after 'timeout' cycle if 'n' option enabled */
 		if (noption && tries >= ao2_container_count(qe.parent->members)) {
 			ast_verb(3, "Exiting on time-out cycle\n");
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
 			record_abandoned(&qe);
 			reason = QUEUE_TIMEOUT;
 			res = 0;
@@ -7786,7 +7786,7 @@
 			record_abandoned(&qe);
 			reason = QUEUE_TIMEOUT;
 			res = 0;
-			ast_queue_log(qe.parent->name, ast_channel_uniqueid(qe.chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
+			ast_queue_log(qe.parent->name, ast_channel_uniqueid(qe.chan)->unique_id,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
 			break;
 		}
 
@@ -7813,7 +7813,7 @@
 		if (res < 0) {
 			if (!qe.handled) {
 				record_abandoned(&qe);
-				ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ABANDON",
+				ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, "NONE", "ABANDON",
 					"%d|%d|%ld", qe.pos, qe.opos,
 					(long) time(NULL) - qe.start);
 				res = -1;
@@ -7822,7 +7822,7 @@
 				res = 0;
 			}
 		} else if (qe.valid_digits) {
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan)->unique_id, "NONE", "EXITWITHKEY",
 				"%s|%d|%d|%ld", qe.digits, qe.pos, qe.opos, (long) time(NULL) - qe.start);
 		}
 	}
@@ -9332,7 +9332,7 @@
 					"Wait: %ld\r\n"
 					"%s"
 					"\r\n",
-					q->name, pos++, ast_channel_name(qe->chan), ast_channel_uniqueid(qe->chan),
+					q->name, pos++, ast_channel_name(qe->chan), ast_channel_uniqueid(qe->chan)->unique_id,
 					S_COR(ast_channel_caller(qe->chan)->id.number.valid, ast_channel_caller(qe->chan)->id.number.str, "unknown"),
 					S_COR(ast_channel_caller(qe->chan)->id.name.valid, ast_channel_caller(qe->chan)->id.name.str, "unknown"),
 					S_COR(ast_channel_connected(qe->chan)->id.number.valid, ast_channel_connected(qe->chan)->id.number.str, "unknown"),

Modified: team/sgriepentrog/12-linkedid/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/apps/app_voicemail.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/apps/app_voicemail.c (original)
+++ team/sgriepentrog/12-linkedid/apps/app_voicemail.c Thu Feb  6 09:42:40 2014
@@ -7889,7 +7889,7 @@
 	if (ast_app_has_voicemail(ext_context, NULL)) 
 		ast_app_inboxcount2(ext_context, &urgentmsgs, &newmsgs, &oldmsgs);
 
-	queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgentmsgs, newmsgs, oldmsgs);
+	queue_mwi_event(ast_channel_uniqueid(chan)->unique_id, ext_context, urgentmsgs, newmsgs, oldmsgs);
 	run_externnotify(vmu->context, vmu->mailbox, flag);
 
 #ifdef IMAP_STORAGE
@@ -11566,7 +11566,7 @@
 		/* Urgent flag not passwd to externnotify here */
 		run_externnotify(vmu->context, vmu->mailbox, NULL);
 		ast_app_inboxcount2(ext_context, &urgent, &new, &old);
-		queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgent, new, old);
+		queue_mwi_event(ast_channel_uniqueid(chan)->unique_id, ext_context, urgent, new, old);
 	}
 #ifdef IMAP_STORAGE
 	/* expunge message - use UID Expunge if supported on IMAP server*/

Modified: team/sgriepentrog/12-linkedid/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_console.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_console.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_console.c Thu Feb  6 09:42:40 2014
@@ -419,7 +419,7 @@
 /*!
  * \note Called with the pvt struct locked
  */
-static struct ast_channel *console_new(struct console_pvt *pvt, const char *ext, const char *ctx, int state, const char *linkedid)
+static struct ast_channel *console_new(struct console_pvt *pvt, const char *ext, const char *ctx, int state, const struct ast_channel_uniqueid *linkedid)
 {
 	struct ast_channel *chan;
 

Modified: team/sgriepentrog/12-linkedid/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_iax2.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_iax2.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_iax2.c Thu Feb  6 09:42:40 2014
@@ -5673,7 +5673,7 @@
 }
 
 /*! \brief  Create new call, interface with the PBX core */
-static struct ast_channel *ast_iax2_new(int callno, int state, iax2_format capability, const char *linkedid, unsigned int cachable)
+static struct ast_channel *ast_iax2_new(int callno, int state, iax2_format capability, const struct ast_channel_uniqueid *linkedid, unsigned int cachable)
 {
 	struct ast_channel *tmp;
 	struct chan_iax2_pvt *i;

Modified: team/sgriepentrog/12-linkedid/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_mgcp.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_mgcp.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_mgcp.c Thu Feb  6 09:42:40 2014
@@ -1221,7 +1221,7 @@
 {
 	sub->owner = chan;
 	if (sub->rtp) {
-		ast_rtp_instance_set_channel_id(sub->rtp, sub->owner ? ast_channel_uniqueid(chan) : "");
+		ast_rtp_instance_set_channel_id(sub->rtp, sub->owner ? ast_channel_uniqueid(chan)->unique_id : "");
 	}
 }
 
@@ -1488,14 +1488,26 @@
 	return res;
 }
 
-static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state, const char *linkedid)
+static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state, const struct ast_channel_uniqueid *linkedid)
 {
 	struct ast_channel *tmp;
 	struct ast_variable *v = NULL;
 	struct mgcp_endpoint *i = sub->parent;
 	struct ast_format tmpfmt;
 
-	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, linkedid, i->accountcode, i->exten, i->context, i->amaflags, "MGCP/%s@%s-%d", i->name, i->parent->name, sub->id);
+	/*
+	 * The previous ast_channel_alloc here was (when linkedid was a char *):
+	 *
+	 * ast_channel_alloc(1, state, i->cid_num, i->cid_name, linkedid, i->accountcode, i->exten, i->context, i->amaflags, "MGCP/%s@%s-%d", i->name, i->parent->name, sub->id);
+	 *
+	 * But: the ast_channel_alloc is defined as:
+	 *
+	 * #define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, linkedid, amaflag, ...)
+	 *
+	 * So, this has been fixed up to match the correct arguments for creating the channel...
+	 *
+	 */
+	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, linkedid, i->amaflags, "MGCP/%s@%s-%d", i->name, i->parent->name, sub->id);
 	if (tmp) {
 		ast_channel_stage_snapshot(tmp);
 		ast_channel_tech_set(tmp, &mgcp_tech);

Modified: team/sgriepentrog/12-linkedid/channels/chan_motif.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_motif.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_motif.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_motif.c Thu Feb  6 09:42:40 2014
@@ -662,10 +662,10 @@
 {
 	session->owner = chan;
 	if (session->rtp) {
-		ast_rtp_instance_set_channel_id(session->rtp, session->owner ? ast_channel_uniqueid(session->owner) : "");
+		ast_rtp_instance_set_channel_id(session->rtp, session->owner ? ast_channel_uniqueid(session->owner)->unique_id : "");
 	}
 	if (session->vrtp) {
-		ast_rtp_instance_set_channel_id(session->vrtp, session->owner ? ast_channel_uniqueid(session->owner) : "");
+		ast_rtp_instance_set_channel_id(session->vrtp, session->owner ? ast_channel_uniqueid(session->owner)->unique_id : "");
 	}
 }
 
@@ -692,7 +692,7 @@
 	}
 
 	ast_rtp_instance_set_prop(session->vrtp, AST_RTP_PROPERTY_RTCP, 1);
-	ast_rtp_instance_set_channel_id(session->vrtp, ast_channel_uniqueid(session->owner));
+	ast_rtp_instance_set_channel_id(session->vrtp, ast_channel_uniqueid(session->owner)->unique_id);
 	ast_channel_set_fd(session->owner, 2, ast_rtp_instance_fd(session->vrtp, 0));
 	ast_channel_set_fd(session->owner, 3, ast_rtp_instance_fd(session->vrtp, 1));
 	ast_rtp_codecs_packetization_set(ast_rtp_instance_get_codecs(session->vrtp), session->vrtp, &session->prefs);
@@ -772,7 +772,7 @@
 }
 
 /*! \brief Function called to create a new Jingle Asterisk channel */
-static struct ast_channel *jingle_new(struct jingle_endpoint *endpoint, struct jingle_session *session, int state, const char *title, const char *linkedid, const char *cid_name)
+static struct ast_channel *jingle_new(struct jingle_endpoint *endpoint, struct jingle_session *session, int state, const char *title, const struct ast_channel_uniqueid *linkedid, const char *cid_name)
 {
 	struct ast_channel *chan;
 	const char *str = S_OR(title, session->remote);

Modified: team/sgriepentrog/12-linkedid/channels/chan_multicast_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_multicast_rtp.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_multicast_rtp.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_multicast_rtp.c Thu Feb  6 09:42:40 2014
@@ -149,11 +149,11 @@
 		goto failure;
 	}
 
-	if (!(chan = ast_channel_alloc(1, AST_STATE_DOWN, "", "", "", "", "", requestor ? ast_channel_linkedid(requestor) : "", 0, "MulticastRTP/%p", instance))) {
+	if (!(chan = ast_channel_alloc(1, AST_STATE_DOWN, "", "", "", "", "", requestor ? ast_channel_linkedid(requestor) : NULL, 0, "MulticastRTP/%p", instance))) {
 		ast_rtp_instance_destroy(instance);
 		goto failure;
 	}
-	ast_rtp_instance_set_channel_id(instance, ast_channel_uniqueid(chan));
+	ast_rtp_instance_set_channel_id(instance, ast_channel_uniqueid(chan)->unique_id);
 	ast_rtp_instance_set_remote_address(instance, &destination_address);
 
 	ast_channel_tech_set(chan, &multicast_rtp_tech);

Modified: team/sgriepentrog/12-linkedid/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_oss.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_oss.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_oss.c Thu Feb  6 09:42:40 2014
@@ -792,7 +792,7 @@
 /*!
  * \brief allocate a new channel.
  */
-static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx, int state, const char *linkedid)
+static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx, int state, const struct ast_channel_uniqueid *linkedid)
 {
 	struct ast_channel *c;
 

Modified: team/sgriepentrog/12-linkedid/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_phone.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_phone.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_phone.c Thu Feb  6 09:42:40 2014
@@ -855,7 +855,7 @@
 	return 0;
 }
 
-static struct ast_channel *phone_new(struct phone_pvt *i, int state, char *cntx, const char *linkedid)
+static struct ast_channel *phone_new(struct phone_pvt *i, int state, char *cntx, const struct ast_channel_uniqueid *linkedid)
 {
 	struct ast_channel *tmp;
 	struct phone_codec_data queried_codec;

Modified: team/sgriepentrog/12-linkedid/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_pjsip.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_pjsip.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_pjsip.c Thu Feb  6 09:42:40 2014
@@ -340,7 +340,7 @@
 };
 
 /*! \brief Function called to create a new PJSIP Asterisk channel */
-static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int state, const char *exten, const char *title, const char *linkedid, const char *cid_name)
+static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int state, const char *exten, const char *title, const struct ast_channel_uniqueid *linkedid, const char *cid_name)
 {
 	struct ast_channel *chan;
 	struct ast_format fmt;
@@ -424,10 +424,10 @@
 	pvt->media[SIP_MEDIA_AUDIO] = ao2_find(session->media, "audio", OBJ_KEY);
 	pvt->media[SIP_MEDIA_VIDEO] = ao2_find(session->media, "video", OBJ_KEY);
 	if (pvt->media[SIP_MEDIA_AUDIO] && pvt->media[SIP_MEDIA_AUDIO]->rtp) {
-		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_AUDIO]->rtp, ast_channel_uniqueid(chan));
+		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_AUDIO]->rtp, ast_channel_uniqueid(chan)->unique_id);
 	}
 	if (pvt->media[SIP_MEDIA_VIDEO] && pvt->media[SIP_MEDIA_VIDEO]->rtp) {
-		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_VIDEO]->rtp, ast_channel_uniqueid(chan));
+		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_VIDEO]->rtp, ast_channel_uniqueid(chan)->unique_id);
 	}
 
 	ast_endpoint_add_channel(session->endpoint->persistent, chan);
@@ -647,10 +647,10 @@
 
 	channel->session->channel = fix_data->chan;
 	if (pvt->media[SIP_MEDIA_AUDIO] && pvt->media[SIP_MEDIA_AUDIO]->rtp) {
-		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_AUDIO]->rtp, ast_channel_uniqueid(fix_data->chan));
+		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_AUDIO]->rtp, ast_channel_uniqueid(fix_data->chan)->unique_id);
 	}
 	if (pvt->media[SIP_MEDIA_VIDEO] && pvt->media[SIP_MEDIA_VIDEO]->rtp) {
-		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_VIDEO]->rtp, ast_channel_uniqueid(fix_data->chan));
+		ast_rtp_instance_set_channel_id(pvt->media[SIP_MEDIA_VIDEO]->rtp, ast_channel_uniqueid(fix_data->chan)->unique_id);
 	}
 
 	return 0;
@@ -1128,7 +1128,7 @@
 		res = -1;
 		break;
 	case AST_CONTROL_HOLD:
-		chan_pjsip_add_hold(ast_channel_uniqueid(ast));
+		chan_pjsip_add_hold(ast_channel_uniqueid(ast)->unique_id);
 		device_buf_size = strlen(ast_channel_name(ast)) + 1;
 		device_buf = alloca(device_buf_size);
 		ast_channel_get_device_name(ast, device_buf, device_buf_size);
@@ -1136,7 +1136,7 @@
 		ast_moh_start(ast, data, NULL);
 		break;
 	case AST_CONTROL_UNHOLD:
-		chan_pjsip_remove_hold(ast_channel_uniqueid(ast));
+		chan_pjsip_remove_hold(ast_channel_uniqueid(ast)->unique_id);
 		device_buf_size = strlen(ast_channel_name(ast)) + 1;
 		device_buf = alloca(device_buf_size);
 		ast_channel_get_device_name(ast, device_buf, device_buf_size);
@@ -1879,7 +1879,7 @@
 		return;
 	}
 
-	chan_pjsip_remove_hold(ast_channel_uniqueid(session->channel));
+	chan_pjsip_remove_hold(ast_channel_uniqueid(session->channel)->unique_id);
 
 	if (!ast_channel_hangupcause(session->channel) && session->inv_session) {
 		int cause = hangup_sip2cause(session->inv_session->cause);

Modified: team/sgriepentrog/12-linkedid/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_sip.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_sip.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_sip.c Thu Feb  6 09:42:40 2014
@@ -8059,7 +8059,7 @@
  *
  * \return New ast_channel locked.
  */
-static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *title, const char *linkedid, struct ast_callid *callid)
+static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *title, const struct ast_channel_uniqueid *linkedid, struct ast_callid *callid)
 {
 	struct ast_channel *tmp;
 	struct ast_variable *v = NULL;
@@ -9310,13 +9310,13 @@
 {
 	p->owner = chan;
 	if (p->rtp) {
-		ast_rtp_instance_set_channel_id(p->rtp, p->owner ? ast_channel_uniqueid(p->owner) : "");
+		ast_rtp_instance_set_channel_id(p->rtp, p->owner ? ast_channel_uniqueid(p->owner)->unique_id : "");
 	}
 	if (p->vrtp) {
-		ast_rtp_instance_set_channel_id(p->vrtp, p->owner ? ast_channel_uniqueid(p->owner) : "");
+		ast_rtp_instance_set_channel_id(p->vrtp, p->owner ? ast_channel_uniqueid(p->owner)->unique_id : "");
 	}
 	if (p->trtp) {
-		ast_rtp_instance_set_channel_id(p->trtp, p->owner ? ast_channel_uniqueid(p->owner) : "");
+		ast_rtp_instance_set_channel_id(p->trtp, p->owner ? ast_channel_uniqueid(p->owner)->unique_id : "");
 	}
 }
 

Modified: team/sgriepentrog/12-linkedid/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_skinny.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_skinny.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_skinny.c Thu Feb  6 09:42:40 2014
@@ -4816,12 +4816,12 @@
 	}
 
 	if (sub->rtp && sub->owner) {
-		ast_rtp_instance_set_channel_id(sub->rtp, ast_channel_uniqueid(sub->owner));
+		ast_rtp_instance_set_channel_id(sub->rtp, ast_channel_uniqueid(sub->owner)->unique_id);
 		ast_channel_set_fd(sub->owner, 0, ast_rtp_instance_fd(sub->rtp, 0));
 		ast_channel_set_fd(sub->owner, 1, ast_rtp_instance_fd(sub->rtp, 1));
 	}
 	if (hasvideo && sub->vrtp && sub->owner) {
-		ast_rtp_instance_set_channel_id(sub->vrtp, ast_channel_uniqueid(sub->owner));
+		ast_rtp_instance_set_channel_id(sub->vrtp, ast_channel_uniqueid(sub->owner)->unique_id);
 		ast_channel_set_fd(sub->owner, 2, ast_rtp_instance_fd(sub->vrtp, 0));
 		ast_channel_set_fd(sub->owner, 3, ast_rtp_instance_fd(sub->vrtp, 1));
 	}
@@ -5390,14 +5390,14 @@
 {
 	sub->owner = chan;
 	if (sub->rtp) {
-		ast_rtp_instance_set_channel_id(sub->rtp, sub->owner ? ast_channel_uniqueid(sub->owner) : "");
+		ast_rtp_instance_set_channel_id(sub->rtp, sub->owner ? ast_channel_uniqueid(sub->owner)->unique_id : "");
 	}
 	if (sub->vrtp) {
-		ast_rtp_instance_set_channel_id(sub->vrtp, sub->owner ? ast_channel_uniqueid(sub->owner) : "");
-	}
-}
-
-static struct ast_channel *skinny_new(struct skinny_line *l, struct skinny_subline *subline, int state, const char *linkedid, int direction)
+		ast_rtp_instance_set_channel_id(sub->vrtp, sub->owner ? ast_channel_uniqueid(sub->owner)->unique_id : "");
+	}
+}
+
+static struct ast_channel *skinny_new(struct skinny_line *l, struct skinny_subline *subline, int state, const struct ast_channel_uniqueid *linkedid, int direction)
 {
 	struct ast_channel *tmp;
 	struct skinny_subchannel *sub;

Modified: team/sgriepentrog/12-linkedid/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/channels/chan_unistim.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/channels/chan_unistim.c (original)
+++ team/sgriepentrog/12-linkedid/channels/chan_unistim.c Thu Feb  6 09:42:40 2014
@@ -669,7 +669,7 @@
 static const char channel_type[] = "USTM";
 
 /*! Protos */
-static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state, const char *linkedid);
+static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state, const struct ast_channel_uniqueid *linkedid);
 static int load_module(void);
 static int reload(void);
 static int unload_module(void);
@@ -2751,7 +2751,7 @@
 		return;
 	}
 	ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_RTCP, 1);
-	ast_rtp_instance_set_channel_id(sub->rtp, ast_channel_uniqueid(sub->owner));
+	ast_rtp_instance_set_channel_id(sub->rtp, ast_channel_uniqueid(sub->owner)->unique_id);
 	ast_channel_internal_fd_set(sub->owner, 0, ast_rtp_instance_fd(sub->rtp, 0));
 	ast_channel_internal_fd_set(sub->owner, 1, ast_rtp_instance_fd(sub->rtp, 1));
 	ast_rtp_instance_set_qos(sub->rtp, qos.tos_audio, qos.cos_audio, "UNISTIM RTP");
@@ -5530,7 +5530,7 @@
 
 /*--- unistim_new: Initiate a call in the UNISTIM channel */
 /*      called from unistim_request (calls from the pbx ) */
-static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state, const char *linkedid)
+static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state, const struct ast_channel_uniqueid *linkedid)
 {
 	struct ast_channel *tmp;
 	struct unistim_line *l;
@@ -5639,7 +5639,7 @@
 {
 	sub->owner = chan;
 	if (sub->rtp) {
-		ast_rtp_instance_set_channel_id(sub->rtp, sub->owner ? ast_channel_uniqueid(sub->owner) : "");
+		ast_rtp_instance_set_channel_id(sub->rtp, sub->owner ? ast_channel_uniqueid(sub->owner)->unique_id : "");
 	}
 }
 

Modified: team/sgriepentrog/12-linkedid/funcs/func_channel.c
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/funcs/func_channel.c?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/funcs/func_channel.c (original)
+++ team/sgriepentrog/12-linkedid/funcs/func_channel.c Thu Feb  6 09:42:40 2014
@@ -487,12 +487,12 @@
 		locked_copy_string(chan, buf, ast_channel_name(chan), len);
 	else if (!strcasecmp(data, "linkedid")) {
 		ast_channel_lock(chan);
-		if (ast_strlen_zero(ast_channel_linkedid(chan))) {
+		if (ast_strlen_zero(ast_channel_linkedid(chan)->unique_id)) {
 			/* fall back on the channel's uniqueid if linkedid is unset */
-			ast_copy_string(buf, ast_channel_uniqueid(chan), len);
+			ast_copy_string(buf, ast_channel_uniqueid(chan)->unique_id, len);
 		}
 		else {
-			ast_copy_string(buf, ast_channel_linkedid(chan), len);
+			ast_copy_string(buf, ast_channel_linkedid(chan)->unique_id, len);
 		}
 		ast_channel_unlock(chan);
 	} else if (!strcasecmp(data, "peer")) {
@@ -513,7 +513,7 @@
 		}
 		ast_channel_unlock(chan);
 	} else if (!strcasecmp(data, "uniqueid")) {
-		locked_copy_string(chan, buf, ast_channel_uniqueid(chan), len);
+		locked_copy_string(chan, buf, ast_channel_uniqueid(chan)->unique_id, len);
 	} else if (!strcasecmp(data, "transfercapability")) {
 		locked_copy_string(chan, buf, transfercapability_table[ast_channel_transfercapability(chan) & 0x1f], len);
 	} else if (!strcasecmp(data, "callgroup")) {
@@ -806,7 +806,7 @@
 static int func_mchan_read(struct ast_channel *chan, const char *function,
 			     char *data, struct ast_str **buf, ssize_t len)
 {
-	struct ast_channel *mchan = ast_channel_get_by_name(ast_channel_linkedid(chan));
+	struct ast_channel *mchan = ast_channel_get_by_name(ast_channel_linkedid(chan)->unique_id);
 	char *template = ast_alloca(4 + strlen(data));
 	sprintf(template, "${%s}", data); /* SAFE */
 	ast_str_substitute_variables(buf, len, mchan ? mchan : chan, template);
@@ -819,7 +819,7 @@
 static int func_mchan_write(struct ast_channel *chan, const char *function,
 			      char *data, const char *value)
 {
-	struct ast_channel *mchan = ast_channel_get_by_name(ast_channel_linkedid(chan));
+	struct ast_channel *mchan = ast_channel_get_by_name(ast_channel_linkedid(chan)->unique_id);
 	pbx_builtin_setvar_helper(mchan ? mchan : chan, data, value);
 	if (mchan) {
 		ast_channel_unref(mchan);

Modified: team/sgriepentrog/12-linkedid/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/sgriepentrog/12-linkedid/include/asterisk/channel.h?view=diff&rev=407566&r1=407565&r2=407566
==============================================================================
--- team/sgriepentrog/12-linkedid/include/asterisk/channel.h (original)
+++ team/sgriepentrog/12-linkedid/include/asterisk/channel.h Thu Feb  6 09:42:40 2014
@@ -174,6 +174,17 @@

[... 1005 lines stripped ...]



More information about the asterisk-commits mailing list