diff --git a/libs/freetdm/src/openzap.c b/libs/freetdm/src/openzap.c index 1a8509080a..58f881f356 100644 --- a/libs/freetdm/src/openzap.c +++ b/libs/freetdm/src/openzap.c @@ -206,7 +206,7 @@ zap_status_t zap_channel_open_any(const char *name, unsigned span_id, zap_direct span_max = zint->span_index; } - if (direction == ZAP_BOTTOM_UP) { + if (direction == TOP_DOWN) { j = 1; } else { j = span_max;