freetdm:Fix ftdm_sigmsg_get_raw_data_detached

ISDN: Fix for Facility IE in Facility message not passed to user in raw mode
This commit is contained in:
David Yat Sin 2011-03-09 16:55:33 -05:00
parent ea498e472a
commit dbfa7fa817
2 changed files with 6 additions and 10 deletions

View File

@ -6053,9 +6053,12 @@ FT_DECLARE(ftdm_status_t) ftdm_sigmsg_get_raw_data_detached(ftdm_sigmsg_t *sigms
if (!sigmsg || !sigmsg->raw.len) {
return FTDM_FAIL;
}
*data = sigmsg->raw.data;
*datalen = sigmsg->raw.len;
*datalen = sigmsg->raw.len;
sigmsg->raw.data = NULL;
sigmsg->raw.len = 0;
return FTDM_SUCCESS;
}

View File

@ -808,17 +808,10 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event)
if (signal_data->facility_ie_decode == SNGISDN_OPT_FALSE) {
/* If Facility decoding is disabled, we do not care about current call state, just pass event up to user */
ftdm_sigmsg_t sigev;
if (facEvnt->facElmt.facStr.pres) {
get_facility_ie_str(ftdmchan, &facEvnt->facElmt.facStr.val[2], facEvnt->facElmt.facStr.len-2);
sngisdn_send_signal(sngisdn_info, FTDM_SIGEVENT_FACILITY);
}
memset(&sigev, 0, sizeof(sigev));
sigev.chan_id = ftdmchan->chan_id;
sigev.span_id = ftdmchan->span_id;
sigev.channel = ftdmchan;
sigev.event_id = FTDM_SIGEVENT_FACILITY;
ftdm_span_send_signal(ftdmchan->span, &sigev);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
return;
}