copy channel data into RECV_INFO event

This commit is contained in:
Anthony Minessale 2012-08-23 13:07:08 -05:00
parent cfa02f0e32
commit 29a3d7ab02
1 changed files with 5 additions and 2 deletions

View File

@ -7676,9 +7676,11 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
switch_dtmf_t dtmf = { 0, switch_core_default_dtmf_duration(0), 0, SWITCH_DTMF_ENDPOINT }; switch_dtmf_t dtmf = { 0, switch_core_default_dtmf_duration(0), 0, SWITCH_DTMF_ENDPOINT };
switch_event_t *event; switch_event_t *event;
private_object_t *tech_pvt = NULL; private_object_t *tech_pvt = NULL;
switch_channel_t *channel = NULL;
if (session) { if (session) {
tech_pvt = (private_object_t *) switch_core_session_get_private(session); tech_pvt = (private_object_t *) switch_core_session_get_private(session);
channel = switch_core_session_get_channel(session);
} }
if (sofia_test_pflag(profile, PFLAG_EXTENDED_INFO_PARSING)) { if (sofia_test_pflag(profile, PFLAG_EXTENDED_INFO_PARSING)) {
@ -7743,8 +7745,6 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
} }
if (session) { if (session) {
/* Get the channel */
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *vval; const char *vval;
/* Barf if we didn't get our private */ /* Barf if we didn't get our private */
@ -7933,6 +7933,9 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
end: end:
if (create_info_event(sip, nh, &event) == SWITCH_STATUS_SUCCESS) { if (create_info_event(sip, nh, &event) == SWITCH_STATUS_SUCCESS) {
if (channel) {
switch_channel_event_set_data(channel, event);
}
switch_event_fire(&event); switch_event_fire(&event);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "dispatched freeswitch event for INFO\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "dispatched freeswitch event for INFO\n");
} }