Index: asterisk/apps/app_meetme.c
===================================================================
--- asterisk/apps/app_meetme.c (revision 376309)
+++ asterisk/apps/app_meetme.c (working copy)
@@ -455,6 +455,12 @@
+
+
+
+
+
+
@@ -5800,6 +5806,22 @@
}
/* Track the channel that answered this trunk */
s_trunk_ref->chan = ast_dial_answered(ringing_station->station->dial);
+ /* Set variable to track the name of the channel that actually answered the call */
+ if (strcasecmp(ast_channel_tech(ringing_trunk->trunk->chan)->type, "Local")==0) {
+ /* if we are in a "Local" channel then both the ;1 and ;2 versions of this channel should have variable set */
+ char *name;
+ name = ast_strdupa(ast_channel_name(ringing_trunk->trunk->chan));
+ name[strlen(name)-1]='1';
+ pbx_builtin_setvar_helper(ast_channel_get_by_name(name), "SLATRUNK_ANSWEREDCHANNEL", ast_channel_name(s_trunk_ref->chan));
+ pbx_builtin_setvar_helper(ast_channel_get_by_name(name), "SLATRUNK_ANSWEREDSTATION", ringing_station->station->name);
+ name[strlen(name)-1]='2';
+ pbx_builtin_setvar_helper(ast_channel_get_by_name(name), "SLATRUNK_ANSWEREDCHANNEL", ast_channel_name(s_trunk_ref->chan));
+ pbx_builtin_setvar_helper(ast_channel_get_by_name(name), "SLATRUNK_ANSWEREDSTATION", ringing_station->station->name);
+ }
+ else {
+ pbx_builtin_setvar_helper(ringing_trunk->trunk->chan, "SLATRUNK_ANSWEREDCHANNEL", ast_channel_name(s_trunk_ref->chan));
+ pbx_builtin_setvar_helper(ringing_trunk->trunk->chan, "SLATRUNK_ANSWEREDSTATION", ringing_station->station->name);
+ }
/* Actually answer the trunk */
answer_trunk_chan(ringing_trunk->trunk->chan);
sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);