]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
dont use smg_prid_nfas if old libsangoma is used
authorMoises Silva <moy@sangoma.com>
Thu, 27 Aug 2009 16:34:36 +0000 (16:34 +0000)
committerMoises Silva <moy@sangoma.com>
Thu, 27 Aug 2009 16:34:36 +0000 (16:34 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@814 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c

index 599d9e1e3a64eab3eecf9b94cd6b61154cde4fe8..cb9f28f971349068a5ee468bc1fe1054a380b1cb 100644 (file)
@@ -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);
                }