[asterisk-commits] branch oej/jitterbuffer r9744 - in /team/oej/jitterbuffer: ./ agi/ apps/ buil...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 13 02:54:37 MST 2006


Author: oej
Date: Mon Feb 13 03:53:43 2006
New Revision: 9744

URL: http://svn.digium.com/view/asterisk?rev=9744&view=rev
Log:
Update to trunk

Added:
    team/oej/jitterbuffer/channels/misdn_config.c
      - copied unchanged from r9732, trunk/channels/misdn_config.c
    team/oej/jitterbuffer/funcs/func_channel.c
      - copied unchanged from r9732, trunk/funcs/func_channel.c
Removed:
    team/oej/jitterbuffer/channels/adtranvofr.h
    team/oej/jitterbuffer/channels/chan_misdn_config.c
    team/oej/jitterbuffer/channels/chan_oss_old.c
    team/oej/jitterbuffer/funcs/pbx_functions.c
Modified:
    team/oej/jitterbuffer/   (props changed)
    team/oej/jitterbuffer/Makefile
    team/oej/jitterbuffer/UPGRADE.txt
    team/oej/jitterbuffer/agi/Makefile
    team/oej/jitterbuffer/apps/Makefile
    team/oej/jitterbuffer/apps/app_curl.c
    team/oej/jitterbuffer/apps/app_hasnewvoicemail.c
    team/oej/jitterbuffer/apps/app_morsecode.c   (contents, props changed)
    team/oej/jitterbuffer/apps/app_osplookup.c
    team/oej/jitterbuffer/apps/app_page.c
    team/oej/jitterbuffer/apps/app_queue.c
    team/oej/jitterbuffer/apps/app_setcallerid.c   (contents, props changed)
    team/oej/jitterbuffer/build_tools/make_svn_branch_name   (props changed)
    team/oej/jitterbuffer/cdr.c
    team/oej/jitterbuffer/cdr/Makefile
    team/oej/jitterbuffer/channel.c
    team/oej/jitterbuffer/channels/Makefile
    team/oej/jitterbuffer/channels/chan_agent.c
    team/oej/jitterbuffer/channels/chan_iax2.c
    team/oej/jitterbuffer/channels/chan_mgcp.c
    team/oej/jitterbuffer/channels/chan_sip.c
    team/oej/jitterbuffer/channels/misdn/   (props changed)
    team/oej/jitterbuffer/channels/misdn/fac.c   (props changed)
    team/oej/jitterbuffer/channels/misdn/fac.h   (props changed)
    team/oej/jitterbuffer/codecs/Makefile
    team/oej/jitterbuffer/configs/func_odbc.conf.sample   (props changed)
    team/oej/jitterbuffer/configs/smdi.conf.sample   (props changed)
    team/oej/jitterbuffer/configs/udptl.conf.sample   (props changed)
    team/oej/jitterbuffer/contrib/scripts/safe_asterisk_restart   (props changed)
    team/oej/jitterbuffer/cygwin/Makefile
    team/oej/jitterbuffer/db1-ast/Makefile
    team/oej/jitterbuffer/dnsmgr.c
    team/oej/jitterbuffer/doc/00README.1st   (props changed)
    team/oej/jitterbuffer/doc/CODING-GUIDELINES
    team/oej/jitterbuffer/doc/callingpres.txt   (props changed)
    team/oej/jitterbuffer/doc/smdi.txt   (props changed)
    team/oej/jitterbuffer/formats/Makefile
    team/oej/jitterbuffer/formats/format_g723.c
    team/oej/jitterbuffer/formats/format_h264.c   (contents, props changed)
    team/oej/jitterbuffer/formats/format_ogg_vorbis.c
    team/oej/jitterbuffer/funcs/Makefile
    team/oej/jitterbuffer/funcs/func_base64.c   (contents, props changed)
    team/oej/jitterbuffer/funcs/func_callerid.c
    team/oej/jitterbuffer/funcs/func_cdr.c
    team/oej/jitterbuffer/funcs/func_cut.c
    team/oej/jitterbuffer/funcs/func_db.c
    team/oej/jitterbuffer/funcs/func_enum.c
    team/oej/jitterbuffer/funcs/func_env.c
    team/oej/jitterbuffer/funcs/func_groupcount.c
    team/oej/jitterbuffer/funcs/func_language.c
    team/oej/jitterbuffer/funcs/func_logic.c
    team/oej/jitterbuffer/funcs/func_math.c
    team/oej/jitterbuffer/funcs/func_md5.c
    team/oej/jitterbuffer/funcs/func_moh.c
    team/oej/jitterbuffer/funcs/func_odbc.c   (contents, props changed)
    team/oej/jitterbuffer/funcs/func_rand.c   (contents, props changed)
    team/oej/jitterbuffer/funcs/func_sha1.c   (contents, props changed)
    team/oej/jitterbuffer/funcs/func_strings.c
    team/oej/jitterbuffer/funcs/func_timeout.c
    team/oej/jitterbuffer/funcs/func_uri.c
    team/oej/jitterbuffer/include/asterisk/channel.h
    team/oej/jitterbuffer/include/asterisk/lock.h
    team/oej/jitterbuffer/include/asterisk/manager.h
    team/oej/jitterbuffer/include/asterisk/module.h
    team/oej/jitterbuffer/include/asterisk/pbx.h
    team/oej/jitterbuffer/include/asterisk/sha1.h   (props changed)
    team/oej/jitterbuffer/include/asterisk/smdi.h   (props changed)
    team/oej/jitterbuffer/include/asterisk/stringfields.h   (contents, props changed)
    team/oej/jitterbuffer/include/asterisk/udptl.h   (props changed)
    team/oej/jitterbuffer/manager.c
    team/oej/jitterbuffer/pbx.c
    team/oej/jitterbuffer/pbx/Makefile
    team/oej/jitterbuffer/pbx/pbx_dundi.c
    team/oej/jitterbuffer/pbx/pbx_spool.c
    team/oej/jitterbuffer/res/Makefile
    team/oej/jitterbuffer/res/res_agi.c
    team/oej/jitterbuffer/res/res_clioriginate.c   (contents, props changed)
    team/oej/jitterbuffer/res/res_smdi.c   (contents, props changed)
    team/oej/jitterbuffer/sha1.c   (props changed)
    team/oej/jitterbuffer/stdtime/Makefile
    team/oej/jitterbuffer/udptl.c   (contents, props changed)
    team/oej/jitterbuffer/utils.c
    team/oej/jitterbuffer/utils/Makefile

Propchange: team/oej/jitterbuffer/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/jitterbuffer/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/jitterbuffer/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb 13 03:53:43 2006
@@ -1,1 +1,1 @@
-/trunk:1-9458
+/trunk:1-9743

Modified: team/oej/jitterbuffer/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/Makefile?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/Makefile (original)
+++ team/oej/jitterbuffer/Makefile Mon Feb 13 03:53:43 2006
@@ -458,12 +458,7 @@
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a: FORCE
-	@if [ -d db1-ast ]; then \
-		$(MAKE) -C db1-ast libdb1.a ; \
-	else \
-		echo "You need to do a cvs update -d not just cvs update"; \
-		exit 1; \
-	fi
+	$(MAKE) -C db1-ast libdb1.a
 
 ifneq ($(wildcard .depend),)
   include .depend
@@ -520,12 +515,7 @@
 	rm -f $@.tmp
 
 stdtime/libtime.a: FORCE
-	@if [ -d stdtime ]; then \
-		$(MAKE) -C stdtime libtime.a ; \
-	else \
-		echo "You need to do a cvs update -d not just cvs update"; \
-		exit 1; \
-	fi
+	$(MAKE) -C stdtime libtime.a
 
 cygwin_a:
 	$(MAKE) -C cygwin all
@@ -545,13 +535,17 @@
 subdirs: 
 	for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
 
-clean:
+clean-depend:
+	for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
+	rm -f .depend .tags-depend
+
+clean: clean-depend
 	for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
-	rm -f *.o *.so asterisk .depend
+	rm -f *.o *.so asterisk
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
 	rm -f include/asterisk/version.h
-	rm -f .tags-depend .tags-sources tags TAGS
+	rm -f .tags-sources tags TAGS
 	@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
 	@if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
 	$(MAKE) -C db1-ast clean
@@ -621,6 +615,7 @@
 			grep ^C update.out | cut -b4- ; \
 		fi ; \
 		rm -f update.out; \
+		$(MAKE) clean-depend; \
 	elif [ -d CVS ]; then \
 		echo "Updating from CVS..." ; \
 		cvs -q -z3 update -Pd | tee update.out; \
@@ -630,6 +625,7 @@
 			grep ^C update.out | cut -d' ' -f2- ; \
 		fi ; \
 		rm -f update.out; \
+		$(MAKE) clean-depend; \
 	else \
 		echo "Not under version control";  \
 	fi

Modified: team/oej/jitterbuffer/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/UPGRADE.txt?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/UPGRADE.txt (original)
+++ team/oej/jitterbuffer/UPGRADE.txt Mon Feb 13 03:53:43 2006
@@ -35,6 +35,11 @@
 * The function ${CHECK_MD5()} has been deprecated in favor of using an
   expression: $[${MD5(<string>)} = ${saved_md5}].
 
+* The 'builtin' functions that used to be combined in pbx_functions.so are
+  now built as separate modules. If you are not using 'autoload=yes' in your
+  modules.conf file then you will need to explicitly load the modules that
+  contain the functions you want to use.
+
 The SIP channel:
 
 * The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.

Modified: team/oej/jitterbuffer/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/agi/Makefile?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/agi/Makefile (original)
+++ team/oej/jitterbuffer/agi/Makefile Mon Feb 13 03:53:43 2006
@@ -39,8 +39,11 @@
 eagi-sphinx-test: eagi-sphinx-test.o
 	$(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS) 
 
-clean:
-	rm -f *.so *.o look .depend eagi-test eagi-sphinx-test
+clean-depend:
+	rm -f .depend
+
+clean: clean-depend
+	rm -f *.so *.o look eagi-test eagi-sphinx-test
 
 %.so : %.o
 	$(CC) -shared -Xlinker -x -o $@ $<

Modified: team/oej/jitterbuffer/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/Makefile?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/Makefile (original)
+++ team/oej/jitterbuffer/apps/Makefile Mon Feb 13 03:53:43 2006
@@ -3,7 +3,7 @@
 # 
 # Makefile for PBX applications
 #
-# Copyright (C) 1999-2005, Digium
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -11,58 +11,45 @@
 # the GNU General Public License
 #
 
-APPS=app_adsiprog.so app_alarmreceiver.so app_authenticate.so app_cdr.so       \
-     app_chanisavail.so app_chanspy.so app_controlplayback.so app_db.so        \
-     app_dial.so app_dictate.so app_directed_pickup.so app_directory.so        \
-     app_disa.so app_dumpchan.so app_echo.so app_exec.so app_externalivr.so    \
-     app_festival.so app_forkcdr.so app_getcpeid.so app_hasnewvoicemail.so     \
-     app_ices.so app_image.so app_lookupblacklist.so app_lookupcidname.so      \
-     app_macro.so app_milliwatt.so app_mixmonitor.so app_mp3.so app_nbscat.so  \
-     app_parkandannounce.so app_playback.so app_privacy.so app_queue.so        \
-     app_random.so app_read.so app_readfile.so app_realtime.so app_record.so   \
-     app_sayunixtime.so app_senddtmf.so app_sendtext.so app_setcallerid.so     \
-     app_setcdruserfield.so app_settransfercapability.so app_softhangup.so     \
-     app_stack.so app_system.so app_talkdetect.so app_test.so app_transfer.so  \
-     app_userevent.so app_url.so app_verbose.so app_voicemail.so               \
-     app_waitforring.so app_waitforsilence.so app_while.so app_zapateller.so   \
-     app_morsecode.so
+MODS:=$(patsubst %.c,%.so,$(wildcard app_*.c))
 
 #
 # Experimental things
 #
-#APPS+=app_ivrdemo.so
-#APPS+=app_skel.so
-#APPS+=app_rpt.so
+MODS:=$(filter-out app_ivrdemo.so,$(MODS))
+MODS:=$(filter-out app_skel.so,$(MODS))
+MODS:=$(filter-out app_rpt.so,$(MODS))
 
 ifndef WITHOUT_ZAPTEL
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
-  APPS+=app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so
-endif
-endif # WITHOUT_ZAPTEL
-
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
-APPS+=app_osplookup.so
+ZAPAVAIL:=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)
 endif
 
-CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
+ifeq (${ZAPAVAIL},)
+  MODS:=$(filter-out app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so,$(MODS))
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
+  MODS:=$(filter-out app_osplookup.so,$(MODS))
+endif
+
 ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
-  ifneq (${CURLLIBS},)
-    APPS+=app_curl.so
-  endif 
+  CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
+endif
+
+ifeq (${CURLLIBS},)
+  MODS:=$(filter-out app_curl.so,$(MODS))
+endif
+
+ifneq (${WITH_SMDI},)
+  CFLAGS+=-DWITH_SMDI
 endif
 
 ifeq (${OSARCH},CYGWIN)
-CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
-CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so -lres_adsi.so -lres_monitor.so
+  CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
+  CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so -lres_adsi.so -lres_monitor.so
+  MODS:=$(filter-out app_sms.so,$(MODS))
 else
-CFLAGS+=-fPIC
-APPS+=app_sms.so
-endif
-
-# Asterisk SMDI integration
-#
-ifeq (${WITH_SMDI},1)
-CFLAGS+=-DWITH_SMDI
+  CFLAGS+=-fPIC
 endif
 
 # If you have UnixODBC you can use ODBC voicemail
@@ -74,10 +61,13 @@
 #CFLAGS+=-DEXTENDED_ODBC_STORAGE
 # See doc/README.odbcstorage for more information
 
-all: $(APPS)
+all: $(MODS)
 
-clean:
-	rm -f *.so *.o look .depend
+clean-depend:
+	rm -f .depend
+
+clean: clean-depend
+	rm -f *.so *.o look
 
 %.so : %.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
@@ -86,7 +76,7 @@
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
 
 install: all
-	for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 	rm -f $(DESTDIR)$(MODULES_DIR)/app_cut.so
 	rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
 	rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so

Modified: team/oej/jitterbuffer/apps/app_curl.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_curl.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_curl.c (original)
+++ team/oej/jitterbuffer/apps/app_curl.c Mon Feb 13 03:53:43 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C)  2004 - 2005, Tilghman Lesher
+ * Copyright (C)  2004 - 2006, Tilghman Lesher
  *
  * Tilghman Lesher <curl-20050919 at the-tilghman.com>
  * and Brian Wilkins <bwilkins at cfl.rr.com> (Added POST option)
@@ -109,10 +109,9 @@
 	return 0;
 }
 
-static char *acf_curl_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int acf_curl_exec(struct ast_channel *chan, char *cmd, char *info, char *buf, size_t len)
 {
 	struct localuser *u;
-	char *info;
 	struct MemoryStruct chunk = { NULL, 0 };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(url);
@@ -121,21 +120,16 @@
 
 	*buf = '\0';
 	
-	if (ast_strlen_zero(data)) {
+	if (ast_strlen_zero(info)) {
 		ast_log(LOG_WARNING, "CURL requires an argument (URL)\n");
-		return buf;
+		return -1;
 	}
 
 	LOCAL_USER_ACF_ADD(u);
 
-	if (!(info = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return buf;
-	}
-
 	AST_STANDARD_APP_ARGS(args, info);	
 	
-	if (! curl_internal(&chunk, args.url, args.postdata)) {
+	if (!curl_internal(&chunk, args.url, args.postdata)) {
 		if (chunk.memory) {
 			chunk.memory[chunk.size] = '\0';
 			if (chunk.memory[chunk.size - 1] == 10)
@@ -149,7 +143,8 @@
 	}
 
 	LOCAL_USER_REMOVE(u);
-	return buf;
+
+	return 0;
 }
 
 struct ast_custom_function acf_curl = {

Modified: team/oej/jitterbuffer/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_hasnewvoicemail.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_hasnewvoicemail.c (original)
+++ team/oej/jitterbuffer/apps/app_hasnewvoicemail.c Mon Feb 13 03:53:43 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Changes Copyright (c) 2004 - 2005 Todd Freeman <freeman at andrews.edu>
+ * Changes Copyright (c) 2004 - 2006 Todd Freeman <freeman at andrews.edu>
  * 
  * 95% based on HasNewVoicemail by:
  * 
@@ -178,10 +178,10 @@
 	return 0;
 }
 
-static char *acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+int acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *argsstr, char *buf, size_t len)
 {
 	struct localuser *u;
-	char *argsstr, *context;
+	char *context;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(vmbox);
 		AST_APP_ARG(folder);
@@ -190,11 +190,6 @@
 	LOCAL_USER_ACF_ADD(u);
 
 	buf[0] = '\0';
-
-	if (!(argsstr = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return buf;
-	}
 
 	AST_STANDARD_APP_ARGS(args, argsstr);
 
@@ -213,7 +208,7 @@
 
 	LOCAL_USER_REMOVE(u);
 	
-	return buf;
+	return 0;
 }
 
 struct ast_custom_function acf_vmcount = {

Modified: team/oej/jitterbuffer/apps/app_morsecode.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_morsecode.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_morsecode.c (original)
+++ team/oej/jitterbuffer/apps/app_morsecode.c Mon Feb 13 03:53:43 2006
@@ -31,7 +31,7 @@
 
 #include "asterisk.h"
 
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7221 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include "asterisk/file.h"
 #include "asterisk/logger.h"
@@ -49,14 +49,14 @@
 
 static char *morsecode_descrip =
 "Usage: Morsecode(<string>)\n"
-"Plays the Morse code equivalent of the passed string\n";
+"Plays the Morse code equivalent of the passed string.  If the variable\n"
+"MORSEDITLEN is set, it will use that value for the length (in ms) of the dit\n"
+"(defaults to 80).  Additionally, if MORSETONE is set, it will use that tone\n"
+"(in Hz).  The tone default is 800.\n";
 
 STANDARD_LOCAL_USER;
 
 LOCAL_USER_DECL;
-
-#define	TONE	800
-#define	DITLEN	80
 
 static char *morsecode[] = {
 	"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", /*  0-15 */
@@ -105,16 +105,17 @@
 static void playtone(struct ast_channel *chan, int tone, int len)
 {
 	char dtmf[20];
-	snprintf(dtmf, sizeof(dtmf), "%d/%d", tone, DITLEN * len);
+	snprintf(dtmf, sizeof(dtmf), "%d/%d", tone, len);
 	ast_playtones_start(chan, 0, dtmf, 0);
-	ast_safe_sleep(chan, DITLEN * len);
+	ast_safe_sleep(chan, len);
 	ast_playtones_stop(chan);
 }
 
 static int morsecode_exec(struct ast_channel *chan, void *data)
 {
-	int res=0;
+	int res=0, ditlen, tone;
 	char *digit;
+	const char *ditlenc, *tonec;
 	struct localuser *u;
 
 	LOCAL_USER_ADD(u);
@@ -125,6 +126,18 @@
 		return 0;
 	}
 
+	/* Use variable MORESEDITLEN, if set (else 80) */
+	ditlenc = pbx_builtin_getvar_helper(chan, "MORSEDITLEN");
+	if (ast_strlen_zero(ditlenc) || (sscanf(ditlenc, "%d", &ditlen) != 1)) {
+		ditlen = 80;
+	}
+
+	/* Use variable MORSETONE, if set (else 800) */
+	tonec = pbx_builtin_getvar_helper(chan, "MORSETONE");
+	if (ast_strlen_zero(tonec) || (sscanf(tonec, "%d", &tone) != 1)) {
+		tone = 800;
+	}
+
 	for (digit = data; *digit; digit++) {
 		char *dahdit;
 		if (*digit < 0) {
@@ -132,19 +145,19 @@
 		}
 		for (dahdit = morsecode[(int)*digit]; *dahdit; dahdit++) {
 			if (*dahdit == '-') {
-				playtone(chan, TONE, 3);
+				playtone(chan, tone, 3 * ditlen);
 			} else if (*dahdit == '.') {
-				playtone(chan, TONE, 1);
+				playtone(chan, tone, 1 * ditlen);
 			} else {
 				/* Account for ditlen of silence immediately following */
-				playtone(chan, 0, 2);
+				playtone(chan, 0, 2 * ditlen);
 			}
 
 			/* Pause slightly between each dit and dah */
-			playtone(chan, 0, 1);
+			playtone(chan, 0, 1 * ditlen);
 		}
 		/* Pause between characters */
-		playtone(chan, 0, 2);
+		playtone(chan, 0, 2 * ditlen);
 	}
 
 	LOCAL_USER_REMOVE(u);

Propchange: team/oej/jitterbuffer/apps/app_morsecode.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/jitterbuffer/apps/app_morsecode.c
------------------------------------------------------------------------------
    svn:keywords = Author Revision Id Date

Modified: team/oej/jitterbuffer/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_osplookup.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_osplookup.c (original)
+++ team/oej/jitterbuffer/apps/app_osplookup.c Mon Feb 13 03:53:43 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -184,6 +184,7 @@
 	int res=0;
 	struct localuser *u;
 	char *temp;
+	const char *val;
 	int cause;
 	struct ast_osp_result result;
 	int priority_jump = 0;
@@ -212,11 +213,11 @@
 	}
 
 	cause = str2cause(args.cause);
-	temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
+	val = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
 	result.handle = -1;
-	if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
-		temp = pbx_builtin_getvar_helper(chan, "OSPRESULTS");
-		if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.numresults) != 1)) {
+	if (!ast_strlen_zero(val) && (sscanf(val, "%d", &result.handle) == 1) && (result.handle > -1)) {
+		val = pbx_builtin_getvar_helper(chan, "OSPRESULTS");
+		if (ast_strlen_zero(val) || (sscanf(val, "%d", &result.numresults) != 1)) {
 			result.numresults = 0;
 		}
 		if ((res = ast_osp_next(&result, cause)) > 0) {
@@ -255,6 +256,7 @@
 	int res=0;
 	struct localuser *u;
 	char *temp;
+	const char *val;
 	int cause;
 	time_t start=0, duration=0;
 	struct ast_osp_result result;
@@ -293,9 +295,9 @@
 		ast_log(LOG_WARNING, "OSPFinish called on channel '%s' with no CDR!\n", chan->name);
 	
 	cause = str2cause(args.status);
-	temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
+	val = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
 	result.handle = -1;
-	if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
+	if (!ast_strlen_zero(val) && (sscanf(val, "%d", &result.handle) == 1) && (result.handle > -1)) {
 		if (!ast_osp_terminate(result.handle, cause, start, duration)) {
 			pbx_builtin_setvar_helper(chan, "_OSPHANDLE", "");
 			pbx_builtin_setvar_helper(chan, "OSPFINISHSTATUS", "SUCCESS");

Modified: team/oej/jitterbuffer/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_page.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_page.c (original)
+++ team/oej/jitterbuffer/apps/app_page.c Mon Feb 13 03:53:43 2006
@@ -87,7 +87,7 @@
 {
 	struct calloutdata *cd = data;
 	ast_pbx_outgoing_app(cd->tech, AST_FORMAT_SLINEAR, cd->resource, 30000,
-		"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, cd->variables, NULL);
+		"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, cd->variables, NULL, NULL);
 	free(cd);
 	return NULL;
 }

Modified: team/oej/jitterbuffer/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_queue.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_queue.c (original)
+++ team/oej/jitterbuffer/apps/app_queue.c Mon Feb 13 03:53:43 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -3142,19 +3142,18 @@
 	return res;
 }
 
-static char *queue_function_qac(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int queue_function_qac(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
 	int count = 0;
 	struct ast_call_queue *q;
 	struct localuser *u;
 	struct member *m;
 
-
-	ast_copy_string(buf, "0", len);
+	buf[0] = '\0';
 	
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR, "%s requires an argument: queuename\n", cmd);
-		return buf;
+		return -1;
 	}
 
 	LOCAL_USER_ACF_ADD(u);
@@ -3183,10 +3182,10 @@
 
 	snprintf(buf, len, "%d", count);
 	LOCAL_USER_REMOVE(u);
-	return buf;
-}
-
-static char *queue_function_queuememberlist(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+	return 0;
+}
+
+static int queue_function_queuememberlist(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
 	struct localuser *u;
 	struct ast_call_queue *q;
@@ -3197,7 +3196,7 @@
 
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR, "QUEUE_MEMBER_LIST requires an argument: queuename\n");
-		return buf;
+		return -1;
 	}
 	
 	LOCAL_USER_ACF_ADD(u);
@@ -3236,7 +3235,7 @@
 	/* We should already be terminated, but let's make sure. */
 	buf[len - 1] = '\0';
 	LOCAL_USER_REMOVE(u);
-	return buf;
+	return 0;
 }
 
 static struct ast_custom_function queueagentcount_function = {

Modified: team/oej/jitterbuffer/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/apps/app_setcallerid.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/apps/app_setcallerid.c (original)
+++ team/oej/jitterbuffer/apps/app_setcallerid.c Mon Feb 13 03:53:43 2006
@@ -31,7 +31,7 @@
 
 #include "asterisk.h"
 
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7221 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Propchange: team/oej/jitterbuffer/apps/app_setcallerid.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/jitterbuffer/apps/app_setcallerid.c
------------------------------------------------------------------------------
    svn:keywords = Author Revision Id Date

Propchange: team/oej/jitterbuffer/build_tools/make_svn_branch_name
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/jitterbuffer/build_tools/make_svn_branch_name
------------------------------------------------------------------------------
    svn:keywords = Author Revision Id Date

Modified: team/oej/jitterbuffer/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/cdr.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/cdr.c (original)
+++ team/oej/jitterbuffer/cdr.c Mon Feb 13 03:53:43 2006
@@ -1120,7 +1120,6 @@
 	int was_enabled;
 	int was_batchmode;
 	int res=0;
-	pthread_attr_t attr;
 
 	ast_mutex_lock(&cdr_batch_lock);
 
@@ -1181,7 +1180,7 @@
 	   if it does not exist */
 	if (enabled && batchmode && (!was_enabled || !was_batchmode) && (cdr_thread == AST_PTHREADT_NULL)) {
 		ast_cond_init(&cdr_pending_cond, NULL);
-		if (ast_pthread_create(&cdr_thread, &attr, do_cdr, NULL) < 0) {
+		if (ast_pthread_create(&cdr_thread, NULL, do_cdr, NULL) < 0) {
 			ast_log(LOG_ERROR, "Unable to start CDR thread.\n");
 			ast_sched_del(sched, cdr_sched);
 		} else {

Modified: team/oej/jitterbuffer/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/cdr/Makefile?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/cdr/Makefile (original)
+++ team/oej/jitterbuffer/cdr/Makefile Mon Feb 13 03:53:43 2006
@@ -1,9 +1,9 @@
 #
 # Asterisk -- A telephony toolkit for Linux.
 # 
-# Makefile for CDR backends (dynamically loaded)
+# Makefile for CDR backends
 #
-# Copyright (C) 1999-2005, Digium
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -11,13 +11,30 @@
 # the GNU General Public License
 #
 
-MODS=cdr_csv.so cdr_manager.so cdr_custom.so
+MODS:=$(patsubst %.c,%.so,$(wildcard cdr_*.c))
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
+  MODS:=$(filter-out cdr_odbc.so,$(MODS))
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CROSS_COMPILE_TARGET)/usr/local/pgsql/include $(CROSS_COMPILE_TARGET)/usr/include/pgsql $(CROSS_COMPILE_TARGET)/usr/local/include/pgsql $(CROSS_COMPILE_TARGET)/opt/pgsql/include $(CROSS_COMPILE_TARGET)/usr/include/libpq-fe.h),)
+  MODS:=$(filter-out cdr_pgsql.so,$(MODS))
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sqlite.h),)
+  MODS:=$(filter-out cdr_sqlite.so,$(MODS))
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
+  MODS:=$(filter-out cdr_tds.so,$(MODS))
+  NOTDS=1
+endif
 
 ifeq (${OSARCH},CYGWIN)
-CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
-CYGSOLIB=-L.. -L. -lasterisk.dll
+  CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
+  CYGSOLIB=-L.. -L. -lasterisk.dll
 else
-CFLAGS+=-fPIC
+  CFLAGS+=-fPIC
 endif
 
 ifeq ($(findstring BSD,${OSARCH}),BSD)
@@ -31,21 +48,11 @@
 #So we go lowest common available by gcc and go a step down, still a step up from
 #the default as we now have a better instruction set to work with. - Belgarath
 ifeq ($(PROC),sparc64)
- PROC=ultrasparc
+  PROC=ultrasparc
   CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
-#
-# unixODBC stuff...
-#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
-  MODS+=cdr_odbc.so
-endif
-
-#
-# FreeTDS stuff...
-#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
+ifeq (${NOTDS},)
   ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
     CFLAGS += -DFREETDS_0_63
   else
@@ -55,14 +62,6 @@
       CFLAGS += -DFREETDS_PRE_0_62
     endif
   endif
-  MODS+=cdr_tds.so
-endif
-
-#
-# PGSQL stuff...  Autoconf anyone??
-#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/pgsql/include)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/pgsql)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/pgsql)$(wildcard $(CROSS_COMPILE_TARGET)/opt/pgsql/include)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/libpq-fe.h),)
-  MODS+=cdr_pgsql.so
 endif
 
 MLFLAGS=
@@ -100,13 +99,6 @@
   MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/lib
 endif
 
-#
-# SQLite stuff...
-#
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sqlite.h),)
-  MODS+=cdr_sqlite.so
-endif
-
 all: depend $(MODS)
 
 install: all
@@ -114,8 +106,11 @@
 
 uninstall:
 
-clean:
-	rm -f *.so *.o .depend
+clean-depend:
+	rm -f .depend
+
+clean: clean-depend
+	rm -f *.so *.o
 
 %.so : %.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}

Modified: team/oej/jitterbuffer/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/channel.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/channel.c (original)
+++ team/oej/jitterbuffer/channel.c Mon Feb 13 03:53:43 2006
@@ -164,6 +164,22 @@
 	{ AST_CAUSE_INTERWORKING, "Interworking, unspecified" },
 };
 
+
+struct ast_variable *ast_channeltype_list(void)
+{
+	struct chanlist *cl;
+	struct ast_variable *var=NULL, *prev = NULL;
+	AST_LIST_TRAVERSE(&backends, cl, list) {
+		if (prev)  {
+			if ((prev->next = ast_variable_new(cl->tech->type, cl->tech->description)))
+				prev = prev->next;
+		} else {
+			var = ast_variable_new(cl->tech->type, cl->tech->description);
+			prev = var;
+		}
+	}
+	return var;
+}
 
 static int show_channeltypes(int fd, int argc, char *argv[])
 {
@@ -2423,6 +2439,8 @@
 				ast_set_callerid(chan, oh->cid_num, oh->cid_name, oh->cid_num);
 			if (oh->parent_channel)
 				ast_channel_inherit_variables(oh->parent_channel, chan);
+			if (oh->account)
+				ast_cdr_setaccount(chan, oh->account);	
 		}
 		ast_set_callerid(chan, cid_num, cid_name, cid_num);
 

Modified: team/oej/jitterbuffer/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/channels/Makefile?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/channels/Makefile (original)
+++ team/oej/jitterbuffer/channels/Makefile Mon Feb 13 03:53:43 2006
@@ -3,7 +3,7 @@
 # 
 # Makefile for channel drivers
 #
-# Copyright (C) 1999-2005, Mark Spencer
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -14,7 +14,7 @@
 # the GNU General Public License
 #
 
-CHANNEL_LIBS=chan_sip.so chan_agent.so chan_mgcp.so chan_iax2.so chan_local.so chan_skinny.so chan_features.so
+MODS:=$(patsubst %.c,%.so,$(wildcard chan_*.c))
 
 ifeq (${OSARCH},OpenBSD)
   PTLIB=-lpt_OpenBSD_x86_r
@@ -28,9 +28,9 @@
 endif
 
 ifeq (${OSARCH},CYGWIN)
-CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
-CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so
-CYG_CHAN_AGENT=-lres_monitor.so
+  CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
+  CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so
+  CYG_CHAN_AGENT=-lres_monitor.so
 endif
 
 ifeq ($(PROC),sparc64)
@@ -49,52 +49,51 @@
   H323LIB=-lh323_NetBSD_x86_r
 endif
 
-ifneq (${OSARCH},Darwin)
-  ifneq (${OSARCH},SunOS)
-    ifneq (${OSARCH},CYGWIN)
-       CHANNEL_LIBS+=chan_oss.so
-    endif
-  endif
+ifeq (${OSARCH},Darwin)
+  MODS:=$(filter-out chan_oss.so,$(MODS))
 endif
 
 ifeq (${OSARCH},SunOS)
+  MODS:=$(filter-out chan_oss.so,$(MODS))
   SOLINK+=-lrt
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),)
-  CHANNEL_LIBS+=chan_phone.so
-endif
-
-#
-# Asterisk SMDI integration
-#
+ifeq (${OSARCH},CYGWIN)
+  MODS:=$(filter-out chan_oss.so,$(MODS))
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),)
+  MODS:=$(filter-out chan_phone.so,$(MODS))
+endif
+
 ifeq (${WITH_SMDI},1)
 CFLAGS+=-DWITH_SMDI
 endif
 
-ifneq ($(wildcard h323/libchanh323.a),)
-  CHANNEL_LIBS+=chan_h323.so
-endif
-
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),)
-  CHANNEL_LIBS+=chan_misdn.so
+ifeq ($(wildcard h323/libchanh323.a),)
+  MODS:=$(filter-out chan_h323.so,$(MODS))
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),)
+  MODS:=$(filter-out chan_misdn.so,$(MODS))
+else
   CFLAGS+=-Imisdn 
 endif
 
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
-  CHANNEL_LIBS+=chan_alsa.so
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
+  MODS:=$(filter-out chan_alsa.so,$(MODS))
 endif
 
 ifndef WITHOUT_PRI
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1 $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
   CFLAGS+=-DZAPATA_PRI
   ZAPPRI=-lpri
 endif
 endif # WITHOUT_PRI
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1 $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
   CFLAGS+=-DZAPATA_R2
   ZAPR2=-lmfcr2
 endif
@@ -107,7 +106,12 @@
 endif
 
 ifndef WITHOUT_ZAPTEL
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
+ZAPAVAIL:=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)
+endif
+
+ifeq (${ZAPAVAIL},)
+  MODS:=$(filter-out chan_zap.so,$(MODS))
+else
   ifeq (${OSARCH},NetBSD)
     SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib
   endif
@@ -115,27 +119,26 @@
     SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
   endif
   CFLAGS+=-DIAX_TRUNKING
-  CHANNEL_LIBS+=chan_zap.so
-endif
-endif # WITHOUT_ZAPTEL
-
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
-  CHANNEL_LIBS+=chan_vpb.so
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
+  MODS:=$(filter-out chan_vpb.so,$(MODS))
+else
   CFLAGS+=-DLINUX
 endif
 
 CFLAGS+=-DCRYPTO
 
 ifneq ($(OSARCH),CYGWIN)
-CFLAGS+=-fPIC
+  CFLAGS+=-fPIC
 endif
 
 CFLAGS+=#-DVOFRDUMPER
 
 ZAPDIR=/usr/lib
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),)
-  CHANNEL_LIBS+=chan_nbs.so
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),)
+  MODS:=$(filter-out chan_nbs.so,$(MODS))
 endif
 
 ifndef OPENH323DIR
@@ -146,12 +149,13 @@
   PWLIBDIR=$(HOME)/pwlib
 endif
 
-#CFLAGS+=$(shell [ -f $(ZAPDIR)/libzap.a ] && echo "-I$(ZAPDIR)")
-
-all: depend $(CHANNEL_LIBS) 
-
-clean:
-	rm -f *.so *.o .depend
+all: depend $(MODS) 
+
+clean-depend:
+	rm -f .depend
+
+clean: clean-depend
+	rm -f *.so *.o
 	rm -f busy.h ringtone.h gentone gentone-ulaw
 
 %.so : %.o
@@ -234,19 +238,17 @@
 misdn/chan_misdn_lib.a:
 	make -C misdn
 
-chan_misdn.so: chan_misdn.o chan_misdn_config.o misdn/chan_misdn_lib.a
+chan_misdn.so: chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a
 	$(CC) -shared -Xlinker -x -L/usr/lib -o $@ $^ -lisdnnet -lmISDN
 
 chan_misdn.o: chan_misdn.c
 	$(CC) $(CFLAGS) -DCHAN_MISDN_VERSION=\"0.3.0\" -c $< -o $@
 
-chan_misdn_config.o: chan_misdn_config.c misdn/chan_misdn_config.h
+misdn_config.o: misdn_config.c misdn/chan_misdn_config.h
 	$(CC) $(CFLAGS) -DCHAN_MISDN_VERSION=\"0.3.0\" -c $< -o $@
 
-
 install: all
-	for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-	if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi
+	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 uninstall:
 

Modified: team/oej/jitterbuffer/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/oej/jitterbuffer/channels/chan_agent.c?rev=9744&r1=9743&r2=9744&view=diff
==============================================================================
--- team/oej/jitterbuffer/channels/chan_agent.c (original)
+++ team/oej/jitterbuffer/channels/chan_agent.c Mon Feb 13 03:53:43 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -2409,7 +2409,7 @@
 	return cur;	
 }
 
-static char *function_agent(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int function_agent(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
 	char *parse;    
 	AST_DECLARE_APP_ARGS(args,
@@ -2423,11 +2423,11 @@
 
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "The AGENT function requires an argument - agentid!\n");
-		return buf;	
+		return -1;
 	}
 
 	if (!(parse = ast_strdupa(data)))
-		return buf;
+		return -1;
 
 	AST_NONSTANDARD_APP_ARGS(args, parse, ':');
 	if (!args.item)
@@ -2435,7 +2435,7 @@
 
 	if (!(agent = find_agent(args.agentid))) {
 		ast_log(LOG_WARNING, "Agent '%s' not found!\n", args.agentid);
-		return buf;
+		return -1;
 	}
 
 	if (!strcasecmp(args.item, "status")) {
@@ -2461,7 +2461,7 @@
 		ast_copy_string(buf, agent->loginchan, len);	
 	}
 
-	return buf;
+	return 0;
 }
 
 struct ast_custom_function agent_function = {

Modified: team/oej/jitterbuffer/channels/chan_iax2.c

[... 6864 lines stripped ...]


More information about the asterisk-commits mailing list