提交 bbae1afb authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Ken Rice

copy channel data into RECV_INFO event

上级 55f1c9b7
...@@ -7676,9 +7676,11 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t ...@@ -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 ...@@ -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 ...@@ -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");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论