diff --git a/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c b/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c index d9000a6bbb..ae9398418a 100644 --- a/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c +++ b/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c @@ -974,7 +974,7 @@ FIO_SPAN_POLL_EVENT_FUNCTION(zt_poll_event) */ FIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event) { - uint32_t i, event_id = 0; + uint32_t i, event_id = FTDM_OOB_INVALID; zt_event_t zt_event_id = 0; for(i = 1; i <= span->chan_count; i++) { @@ -1022,6 +1022,8 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event) event_id = FTDM_OOB_OFFHOOK; } else if (span->channels[i]->type == FTDM_CHAN_TYPE_FXO) { event_id = FTDM_OOB_RING_START; + } else { + event_id = FTDM_OOB_NOOP; } } break; diff --git a/libs/openzap/src/ozmod/ozmod_zt/ozmod_zt.c b/libs/openzap/src/ozmod/ozmod_zt/ozmod_zt.c index 0eaf955196..ca42c2c578 100644 --- a/libs/openzap/src/ozmod/ozmod_zt/ozmod_zt.c +++ b/libs/openzap/src/ozmod/ozmod_zt/ozmod_zt.c @@ -977,7 +977,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(zt_poll_event) */ ZIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event) { - uint32_t i, event_id = 0; + uint32_t i, event_id = ZAP_OOB_INVALID; zt_event_t zt_event_id = 0; for(i = 1; i <= span->chan_count; i++) { @@ -1025,6 +1025,8 @@ ZIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event) event_id = ZAP_OOB_OFFHOOK; } else if (span->channels[i]->type == ZAP_CHAN_TYPE_FXO) { event_id = ZAP_OOB_RING_START; + } else { + event_id = ZAP_OOB_NOOP; } } break;