From 178259508bf968bb391163a4ee6c8790e111f533 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Thu, 27 Aug 2009 16:34:36 +0000 Subject: [PATCH] dont use smg_prid_nfas if old libsangoma is used git-svn-id: http://svn.openzap.org/svn/openzap/trunk@814 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c b/libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c index 599d9e1e3a..cb9f28f971 100644 --- a/libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c +++ b/libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c @@ -160,10 +160,12 @@ static __inline__ sng_fd_t tdmv_api_open_span_chan(int span, int chan) return sangoma_open_tdmapi_span_chan(span, chan); } +#ifdef LIBSANGOMA_VERSION static __inline__ sng_fd_t __tdmv_api_open_span_chan(int span, int chan) { return __sangoma_open_tdmapi_span_chan(span, chan); } +#endif static zap_io_interface_t wanpipe_interface; @@ -213,9 +215,12 @@ static unsigned wp_open_range(zap_span_t *span, unsigned spanno, unsigned start, zap_channel_t *chan; zap_socket_t sockfd = WP_INVALID_SOCKET; const char *dtmf = "none"; - if (!strncasecmp(span->name, "smg_prid_nfas", 8) && span->trunk_type == ZAP_TRUNK_T1 && x == 24) { +#ifdef LIBSANGOMA_VERSION sockfd = __tdmv_api_open_span_chan(spanno, x); +#else + zap_log(ZAP_LOG_ERROR, "span %d channel %d cannot be configured as smg_prid_nfas, you need to compile openzap with newer libsangoma\n", spanno, x); +#endif } else { sockfd = tdmv_api_open_span_chan(spanno, x); }