fix MODENDP-82
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@408 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
684c9ec054
commit
ec0b259ecf
|
@ -752,21 +752,21 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
|
|||
tech_pvt = (private_t *) switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||
|
||||
switch (tech_pvt->zchan->type) {
|
||||
case ZAP_CHAN_TYPE_FXS:
|
||||
status = channel_receive_message_fxs(session, msg);
|
||||
break;
|
||||
case ZAP_CHAN_TYPE_FXO:
|
||||
status = channel_receive_message_fxo(session, msg);
|
||||
break;
|
||||
case ZAP_CHAN_TYPE_B:
|
||||
status = channel_receive_message_b(session, msg);
|
||||
break;
|
||||
default:
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
|
|
@ -284,7 +284,8 @@ static void *zap_analog_channel_run(zap_thread_t *me, void *obj)
|
|||
zap_channel_command(zchan, ZAP_COMMAND_GENERATE_RING_OFF, NULL);
|
||||
}
|
||||
|
||||
if (zap_test_flag(zchan, ZAP_CHANNEL_OFFHOOK) && zchan->last_state >= ZAP_CHANNEL_STATE_IDLE) {
|
||||
if (zap_test_flag(zchan, ZAP_CHANNEL_OFFHOOK) &&
|
||||
(zchan->last_state == ZAP_CHANNEL_STATE_RING || zchan->last_state >= ZAP_CHANNEL_STATE_IDLE)) {
|
||||
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_BUSY);
|
||||
} else {
|
||||
zchan->caller_data.hangup_cause = ZAP_CAUSE_NORMAL_CLEARING;
|
||||
|
|
Loading…
Reference in New Issue