[Asterisk-cvs] asterisk/channels chan_misdn.c, NONE, 1.1 chan_misdn_config.c, NONE, 1.1 Makefile, 1.74, 1.75

kpfleming kpfleming
Mon Oct 31 17:59:08 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv6036/channels

Modified Files:
	Makefile 
Added Files:
	chan_misdn.c chan_misdn_config.c 
Log Message:
add experimental mISDN channel driver (issue #4077)


--- NEW FILE: chan_misdn.c ---
/*
 * Chan_Misdn -- Channel Driver for Asterisk
 *
 * Interface to Asterisk
 *
 * Copyright (C) 2004, Christian Richter
 *
 * Christian Richter <crich at beronet.com>
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License
 */

#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <errno.h>
[...3661 lines suppressed...]
		}
	}
	
	if (ch->faxdetect || ch->ast_dsp) {
		
		if (!ch->dsp) ch->dsp = ast_dsp_new();
		if (ch->dsp) ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_DETECT);
		if (!ch->trans) ch->trans=ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
	}

	if (ch->ast_dsp) {
		chan_misdn_log(1,ch->bc->stack->port,"SETOPT: with AST_DSP we deactivate mISDN_dsp\n");
		ch->bc->nodsp=1;
		ch->bc->nojitter=1;
	}
	
	return 0;
}



--- NEW FILE: chan_misdn_config.c ---
/*
 * Chan_Misdn -- Channel Driver for Asterisk
 *
 * Interface to Asterisk
 *
 * Copyright (C) 2005, Christian Richter
 *
 * Christian Richter <crich at beronet.com>
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License
 */


#include "chan_misdn_config.h"

#include <asterisk/config.h>
#include <asterisk/channel.h>
#include <asterisk/logger.h>
[...1018 lines suppressed...]
	
	char *cat;
	cat = ast_category_browse(cfg, NULL);

	while(cat) {
		struct ast_variable *v=ast_variable_browse(cfg,cat);
		if (!strcasecmp(cat,"general")) {
			build_general_config (v);
		} else {
			build_port_config (v, cat);
		}
		cat=ast_category_browse(cfg,cat);
	}

	fill_defaults();
	
	misdn_cfg_unlock();
	
	AST_DESTROY_CFG(cfg);
}

Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/Makefile,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- Makefile	5 Oct 2005 00:17:57 -0000	1.74
+++ Makefile	31 Oct 2005 22:51:12 -0000	1.75
@@ -69,6 +69,10 @@
   CHANNEL_LIBS+=chan_h323.so
 endif
 
+ifneq ($(wildcard misdn/chan_misdn_lib.a),)
+  CHANNEL_LIBS+=chan_misdn.so
+endif
+
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
 
 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
@@ -146,6 +150,10 @@
   include h323/Makefile.ast
 endif
 
+ifneq ($(wildcard misdn/Makefile.ast),)
+  include misdn/Makefile.ast
+endif
+
 gentone: gentone.c
 	$(HOST_CC) -o gentone gentone.c -lm
 
@@ -205,6 +213,12 @@
 	$(CC) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
 endif
 
+chan_misdn.so: chan_misdn.o chan_misdn_config.o misdn/chan_misdn_lib.a
+	$(CC) -shared -Xlinker -x -o $@ $^ $(MISDNUSER)/i4lnet/libisdnnet.a $(MISDNUSER)/lib/libmISDN.a 
+
+chan_misdn_config.o: chan_misdn_config.c
+	$(CC) $(CFLAGS) -c chan_misdn_config.c
+
 
 #chan_modem.so : chan_modem.o
 #	$(CC) -rdynamic -shared -Xlinker -x -o $@ $<




More information about the svn-commits mailing list