diff --git a/src/mod/applications/mod_spandsp/mod_spandsp.c b/src/mod/applications/mod_spandsp/mod_spandsp.c index 4ba4cc4500..41d7212601 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp.c @@ -801,8 +801,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_spandsp_init) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n"); } - +#if defined(MODEM_SUPPORT) modem_global_init(module_interface, pool); +#endif switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "mod_spandsp loaded, using spandsp library version [%s]\n", SPANDSP_RELEASE_DATETIME_STRING); @@ -817,7 +818,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_spandsp_shutdown) mod_spandsp_fax_shutdown(); mod_spandsp_dsp_shutdown(); +#if defined(MODEM_SUPPORT) modem_global_shutdown(); +#endif if (spandsp_globals.tones) { switch_core_hash_destroy(&spandsp_globals.tones); diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_modem.h b/src/mod/applications/mod_spandsp/mod_spandsp_modem.h index 6e76a76132..6347d5cb90 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_modem.h +++ b/src/mod/applications/mod_spandsp/mod_spandsp_modem.h @@ -35,7 +35,7 @@ #undef HAVE_STDLIB_H #include "switch_private.h" #endif -#if defined(HAVE_OPENPTY) || defined(HAVE_DEV_PTMX) || defined(HAVE_POSIX_OPENPT) || WIN32 +#if !defined(__OpenBSD__) && (defined(HAVE_OPENPTY) || defined(HAVE_DEV_PTMX) || defined(HAVE_POSIX_OPENPT) || WIN32) #define MODEM_SUPPORT 1 #if !defined(HAVE_POSIX_OPENPT) && !defined(HAVE_DEV_PTMX) && !defined(WIN32) #define USE_OPENPTY 1 @@ -55,6 +55,7 @@ #include #elif defined(__SunOS) #include +#elif defined(__OpenBSD__) #else #include #endif