chan_lcr: fixed compile problems with newer versions of asterisk
authorAndreas Eversberg <andreas@eversberg.eu>
Sun, 29 Mar 2009 11:09:59 +0000 (13:09 +0200)
committerAndreas Eversberg <andreas@eversberg.eu>
Sun, 29 Mar 2009 11:09:59 +0000 (13:09 +0200)
README
chan_lcr.c

diff --git a/README b/README
index b0772c4..5da7a61 100644 (file)
--- a/README
+++ b/README
@@ -479,4 +479,4 @@ Changes after Version 1.4 release
 - Fixed Notification messages in NT-mode
   -> Notifications like diversions are now sent to terminal.
 - Added l1hold feature (requires new mISDN and mISDNuser).
 - Fixed Notification messages in NT-mode
   -> Notifications like diversions are now sent to terminal.
 - Added l1hold feature (requires new mISDN and mISDNuser).
-
+- chan_lcr: Fixed compile problem with newer versions.
index b3c42cc..5c23337 100644 (file)
@@ -129,6 +129,8 @@ it is called from ast_channel process which has already locked ast_channel.
 #define HAVE_ATTRIBUTE_always_inline 1
 #define HAVE_ARPA_INET_H 1
 #define HAVE_TIMERSUB 1
 #define HAVE_ATTRIBUTE_always_inline 1
 #define HAVE_ARPA_INET_H 1
 #define HAVE_TIMERSUB 1
+#define HAVE_STRTOQ 1
+#define HAVE_INET_ATON 1
 
 #include <asterisk/compiler.h>
 #ifdef LCR_FOR_ASTERISK
 
 #include <asterisk/compiler.h>
 #ifdef LCR_FOR_ASTERISK
@@ -503,7 +505,12 @@ void apply_opt(struct chan_call *call, char *data)
                                ast_dsp_set_features(call->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_CNG_DETECT);
                                #endif
                                #ifdef LCR_FOR_ASTERISK
                                ast_dsp_set_features(call->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_CNG_DETECT);
                                #endif
                                #ifdef LCR_FOR_ASTERISK
+                               #ifdef DSP_FEATURE_DTMF_DETECT
                                ast_dsp_set_features(call->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_DETECT);
                                ast_dsp_set_features(call->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_DETECT);
+                               #else
+                               ast_dsp_set_features(call->dsp, DSP_FEATURE_DIGIT_DETECT| DSP_FEATURE_FAX_DETECT);
+                               #endif
+
                                #endif
                                if (!call->trans)
                                        #ifdef LCR_FOR_CALLWEAVER
                                #endif
                                if (!call->trans)
                                        #ifdef LCR_FOR_CALLWEAVER
@@ -2107,7 +2114,7 @@ static int lcr_write(struct ast_channel *ast, struct ast_frame *f)
                return -1;
        }
        if (call->bchannel && f->samples)
                return -1;
        }
        if (call->bchannel && f->samples)
-               bchannel_transmit(call->bchannel, (unsigned char *)f->data, f->samples);
+               bchannel_transmit(call->bchannel, *((unsigned char **)&(f->data)), f->samples);
        ast_mutex_unlock(&chan_lock);
        return 0;
 }
        ast_mutex_unlock(&chan_lock);
        return 0;
 }