mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
openzap: callwaiting disable
This commit is contained in:
@@ -1287,7 +1287,7 @@ OZ_DECLARE(zap_status_t) zap_channel_open(uint32_t span_id, uint32_t chan_id, za
|
||||
zap_status_t status = ZAP_FAIL;
|
||||
zap_span_t *span = NULL;
|
||||
|
||||
zap_mutex_unlock(globals.mutex);
|
||||
zap_mutex_lock(globals.mutex);
|
||||
zap_span_find(span_id, &span);
|
||||
|
||||
if (!span || !zap_test_flag(span, ZAP_SPAN_CONFIGURED) || chan_id >= ZAP_MAX_CHANNELS_SPAN) {
|
||||
@@ -1313,11 +1313,12 @@ OZ_DECLARE(zap_status_t) zap_channel_open(uint32_t span_id, uint32_t chan_id, za
|
||||
*zchan = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = ZAP_FAIL;
|
||||
|
||||
if (zap_test_flag(check, ZAP_CHANNEL_READY) && (!zap_test_flag(check, ZAP_CHANNEL_INUSE) ||
|
||||
(check->type == ZAP_CHAN_TYPE_FXS && check->token_count == 1))) {
|
||||
status = ZAP_FAIL;
|
||||
if ((!zap_test_flag(check, ZAP_CHANNEL_INUSE)) ||
|
||||
(check->type == ZAP_CHAN_TYPE_FXS &&
|
||||
check->token_count == 1 &&
|
||||
zap_channel_test_feature(check, ZAP_CHANNEL_FEATURE_CALLWAITING))) {
|
||||
if (!zap_test_flag(check, ZAP_CHANNEL_OPEN)) {
|
||||
status = check->zio->open(check);
|
||||
if (status == ZAP_SUCCESS) {
|
||||
|
Reference in New Issue
Block a user