FS-4867 --resolve
This commit is contained in:
parent
0b148a85b9
commit
c7c528cd7c
|
@ -541,6 +541,10 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
|
|||
\return number of digits in the queue
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(_In_ switch_channel_t *channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_dtmf_lock(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_try_dtmf_lock(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_dtmf_unlock(switch_channel_t *channel);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Queue DTMF on a given channel
|
||||
|
|
|
@ -363,6 +363,21 @@ SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel,
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_dtmf_lock(switch_channel_t *channel)
|
||||
{
|
||||
return switch_mutex_lock(channel->dtmf_mutex);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_try_dtmf_lock(switch_channel_t *channel)
|
||||
{
|
||||
return switch_mutex_trylock(channel->dtmf_mutex);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_dtmf_unlock(switch_channel_t *channel)
|
||||
{
|
||||
return switch_mutex_unlock(channel->dtmf_mutex);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel_t *channel)
|
||||
{
|
||||
switch_size_t has;
|
||||
|
|
|
@ -151,7 +151,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||
|
||||
for(i = 0; i < 2; i++) {
|
||||
if (session->dmachine[i] && !switch_channel_test_flag(session->channel, CF_BROADCAST)) {
|
||||
switch_ivr_dmachine_ping(session->dmachine[i], NULL);
|
||||
if (switch_channel_try_dtmf_lock(session->channel) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_ivr_dmachine_ping(session->dmachine[i], NULL);
|
||||
switch_channel_dtmf_unlock(session->channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue