}
}
- if (OUTBOUND_REQUESTS[r].status == BST_READY) {
+ if (OUTBOUND_REQUESTS[r].status == BST_READY && OUTBOUND_REQUESTS[r].zchan) {
*zchan = OUTBOUND_REQUESTS[r].zchan;
status = ZAP_SUCCESS;
+ } else {
+ status = ZAP_FAIL;
+ *zchan = NULL;
}
done:
zap_log(ZAP_LOG_ERROR, "OPEN ERROR [%s]\n", zchan->last_error);
} else {
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_PROGRESS_MEDIA);
+ zap_set_flag(zchan, ZAP_CHANNEL_OUTBOUND);
OUTBOUND_REQUESTS[event->call_setup_id].zchan = zchan;
return;
}
{
sig.event_id = ZAP_SIGEVENT_STOP;
status = ss7_boost_data->signal_cb(&sig);
+ zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
}
default:
break;