freetdm: only notify of released channels when is a voice channel
This commit is contained in:
parent
2f08cb6ad0
commit
c059649f8f
|
@ -2349,8 +2349,6 @@ static void close_dtmf_debug(ftdm_channel_t *ftdmchan)
|
|||
static ftdm_status_t ftdm_channel_clear_vars(ftdm_channel_t *ftdmchan);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_channel_done(ftdm_channel_t *ftdmchan)
|
||||
{
|
||||
ftdm_sigmsg_t sigmsg;
|
||||
|
||||
ftdm_assert_return(ftdmchan != NULL, FTDM_FAIL, "Null channel can't be done!\n");
|
||||
|
||||
ftdm_mutex_lock(ftdmchan->mutex);
|
||||
|
@ -2389,12 +2387,15 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_done(ftdm_channel_t *ftdmchan)
|
|||
|
||||
ftdm_log(FTDM_LOG_DEBUG, "channel done %u:%u\n", ftdmchan->span_id, ftdmchan->chan_id);
|
||||
|
||||
memset(&sigmsg, 0, sizeof(sigmsg));
|
||||
sigmsg.span_id = ftdmchan->span_id;
|
||||
sigmsg.chan_id = ftdmchan->chan_id;
|
||||
sigmsg.channel = ftdmchan;
|
||||
sigmsg.event_id = FTDM_SIGEVENT_RELEASED;
|
||||
ftdm_span_send_signal(ftdmchan->span, &sigmsg);
|
||||
if (FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
|
||||
ftdm_sigmsg_t sigmsg;
|
||||
memset(&sigmsg, 0, sizeof(sigmsg));
|
||||
sigmsg.span_id = ftdmchan->span_id;
|
||||
sigmsg.chan_id = ftdmchan->chan_id;
|
||||
sigmsg.channel = ftdmchan;
|
||||
sigmsg.event_id = FTDM_SIGEVENT_RELEASED;
|
||||
ftdm_span_send_signal(ftdmchan->span, &sigmsg);
|
||||
}
|
||||
|
||||
ftdm_mutex_unlock(ftdmchan->mutex);
|
||||
|
||||
|
|
Loading…
Reference in New Issue