revert to the last transfered conference on recover

This commit is contained in:
Anthony Minessale 2010-12-13 18:28:43 -06:00
parent 7f8ba794c9
commit d11c83b16e
1 changed files with 10 additions and 0 deletions

View File

@ -4366,6 +4366,8 @@ static switch_status_t conf_api_sub_transfer(conference_obj_t *conference, switc
}
}
switch_channel_set_variable(channel, "last_transfered_conference", argv[2]);
unlock_member(member);
stream->write_function(stream, "OK Member '%d' sent to conference %s.\n", member->id, argv[2]);
@ -5374,6 +5376,14 @@ SWITCH_STANDARD_APP(conference_function)
}
#endif
if (switch_channel_test_flag(channel, CF_RECOVERED)) {
const char *check = switch_channel_get_variable(channel, "last_transfered_conference");
if (!zstr(check)) {
conf_name = (char *) check;
}
}
switch_event_create(&params, SWITCH_EVENT_COMMAND);
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "conf_name", conf_name);