Origin: https://issues.asterisk.org/view.php?id=15251
Author: biohumanoid

diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild
index 1c2d1e3..60b997d 100644
--- a/drivers/dahdi/Kbuild
+++ b/drivers/dahdi/Kbuild
@@ -37,7 +37,11 @@ obj-m += $(DAHDI_MODULES_EXTRA)
 # A quick and dirty way to build OSLEC, if you happened to place it
 # yourself in the dahdi source tree. This is experimental. See README
 # regarding OSLEC.
-#obj-m += ../staging/echo/
+
+ifneq (,$(wildcard $(src)/../staging/echo/echo.c))
+obj-m += dahdi_echocan_oslec.o
+obj-m += ../staging/echo/
+endif
 
 CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src)
 
