Merge pull request #324 in FS/freeswitch from ~LAZEDO/freeswitch:feature/fs-7758 to master

* commit 'e336ca8c37806f105b3cc266d44eb1ae03d57052':
  FS-7758 #resolve
This commit is contained in:
Mike Jerris 2015-07-02 12:00:43 -05:00
commit ff9877586b
1 changed files with 8 additions and 0 deletions

View File

@ -458,6 +458,8 @@ static switch_status_t channel_on_execute(switch_core_session_t *session)
switch_core_session_t *other_session = NULL;
switch_caller_profile_t *cp, *clone;
const char *other_uuid = NULL;
switch_event_t *event = NULL;
switch_set_flag(tech_pvt, TFLAG_BOWOUT);
if ((find_non_loopback_bridge(tech_pvt->other_session, &other_session, &other_uuid) == SWITCH_STATUS_SUCCESS)) {
@ -468,6 +470,12 @@ static switch_status_t channel_on_execute(switch_core_session_t *session)
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_INFO, "BOWOUT Replacing loopback channel with real channel: %s\n",
switch_channel_get_name(other_channel));
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, "loopback::bowout") == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Resigning-UUID", switch_channel_get_uuid(channel));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Acquired-UUID", switch_channel_get_uuid(other_channel));
switch_event_fire(&event);
}
if ((cp = switch_channel_get_caller_profile(channel))) {
clone = switch_caller_profile_clone(other_session, cp);
clone->originator_caller_profile = NULL;