[asterisk-commits] branch oej/astum r9749 - in /team/oej/astum: ./ agi/ apps/ build_tools/ cdr/ ...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 13 03:06:34 MST 2006


Author: oej
Date: Mon Feb 13 04:05:57 2006
New Revision: 9749

URL: http://svn.digium.com/view/asterisk?rev=9749&view=rev
Log:
Update to trunk, automerge on

Added:
    team/oej/astum/channels/misdn_config.c
      - copied unchanged from r9732, trunk/channels/misdn_config.c
Removed:
    team/oej/astum/channels/adtranvofr.h
    team/oej/astum/channels/chan_misdn_config.c
    team/oej/astum/channels/chan_oss_old.c
Modified:
    team/oej/astum/   (props changed)
    team/oej/astum/Makefile
    team/oej/astum/agi/Makefile
    team/oej/astum/apps/Makefile
    team/oej/astum/apps/app_curl.c
    team/oej/astum/apps/app_hasnewvoicemail.c
    team/oej/astum/apps/app_morsecode.c   (contents, props changed)
    team/oej/astum/apps/app_page.c
    team/oej/astum/apps/app_queue.c
    team/oej/astum/apps/app_setcallerid.c   (contents, props changed)
    team/oej/astum/build_tools/make_svn_branch_name   (props changed)
    team/oej/astum/cdr.c
    team/oej/astum/cdr/Makefile
    team/oej/astum/channel.c
    team/oej/astum/channels/Makefile
    team/oej/astum/channels/chan_agent.c
    team/oej/astum/channels/chan_iax2.c
    team/oej/astum/channels/chan_mgcp.c
    team/oej/astum/channels/chan_sip.c
    team/oej/astum/channels/misdn/fac.c   (props changed)
    team/oej/astum/channels/misdn/fac.h   (props changed)
    team/oej/astum/codecs/Makefile
    team/oej/astum/configs/func_odbc.conf.sample   (props changed)
    team/oej/astum/configs/smdi.conf.sample   (props changed)
    team/oej/astum/configs/udptl.conf.sample   (props changed)
    team/oej/astum/contrib/scripts/safe_asterisk_restart   (props changed)
    team/oej/astum/cygwin/Makefile
    team/oej/astum/db1-ast/Makefile
    team/oej/astum/doc/00README.1st   (props changed)
    team/oej/astum/doc/CODING-GUIDELINES
    team/oej/astum/doc/callingpres.txt   (props changed)
    team/oej/astum/doc/smdi.txt   (props changed)
    team/oej/astum/formats/Makefile
    team/oej/astum/formats/format_g723.c
    team/oej/astum/formats/format_h264.c   (contents, props changed)
    team/oej/astum/formats/format_ogg_vorbis.c
    team/oej/astum/funcs/Makefile
    team/oej/astum/funcs/func_odbc.c   (contents, props changed)
    team/oej/astum/funcs/func_rand.c   (contents, props changed)
    team/oej/astum/include/asterisk/channel.h
    team/oej/astum/include/asterisk/lock.h
    team/oej/astum/include/asterisk/manager.h
    team/oej/astum/include/asterisk/module.h
    team/oej/astum/include/asterisk/pbx.h
    team/oej/astum/include/asterisk/sha1.h   (props changed)
    team/oej/astum/include/asterisk/smdi.h   (props changed)
    team/oej/astum/include/asterisk/stringfields.h   (contents, props changed)
    team/oej/astum/include/asterisk/udptl.h   (props changed)
    team/oej/astum/manager.c
    team/oej/astum/pbx.c
    team/oej/astum/pbx/Makefile
    team/oej/astum/pbx/pbx_dundi.c
    team/oej/astum/pbx/pbx_spool.c
    team/oej/astum/res/Makefile
    team/oej/astum/res/res_agi.c
    team/oej/astum/res/res_clioriginate.c   (contents, props changed)
    team/oej/astum/res/res_smdi.c   (contents, props changed)
    team/oej/astum/sha1.c   (props changed)
    team/oej/astum/stdtime/Makefile
    team/oej/astum/udptl.c   (contents, props changed)
    team/oej/astum/utils.c
    team/oej/astum/utils/Makefile

Propchange: team/oej/astum/
------------------------------------------------------------------------------
    automerge = OnceAgainTurnedOnWillItWorkForMoreThanOneNightNow?

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

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

Propchange: team/oej/astum/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb 13 04:05:57 2006
@@ -1,1 +1,1 @@
-/trunk:1-9512
+/trunk:1-9748

Modified: team/oej/astum/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/Makefile?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/Makefile (original)
+++ team/oej/astum/Makefile Mon Feb 13 04:05:57 2006
@@ -454,12 +454,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
@@ -516,12 +511,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
@@ -541,13 +531,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
@@ -617,6 +611,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; \
@@ -626,6 +621,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/astum/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/agi/Makefile?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/agi/Makefile (original)
+++ team/oej/astum/agi/Makefile Mon Feb 13 04:05:57 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/astum/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/Makefile?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/Makefile (original)
+++ team/oej/astum/apps/Makefile Mon Feb 13 04:05:57 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/astum/apps/app_curl.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_curl.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/app_curl.c (original)
+++ team/oej/astum/apps/app_curl.c Mon Feb 13 04:05:57 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/astum/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_hasnewvoicemail.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/app_hasnewvoicemail.c (original)
+++ team/oej/astum/apps/app_hasnewvoicemail.c Mon Feb 13 04:05:57 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/astum/apps/app_morsecode.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_morsecode.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/app_morsecode.c (original)
+++ team/oej/astum/apps/app_morsecode.c Mon Feb 13 04:05:57 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/astum/apps/app_morsecode.c
------------------------------------------------------------------------------
    svn:eol-style = native

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

Modified: team/oej/astum/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_page.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/app_page.c (original)
+++ team/oej/astum/apps/app_page.c Mon Feb 13 04:05:57 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/astum/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_queue.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/app_queue.c (original)
+++ team/oej/astum/apps/app_queue.c Mon Feb 13 04:05:57 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/astum/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_setcallerid.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/apps/app_setcallerid.c (original)
+++ team/oej/astum/apps/app_setcallerid.c Mon Feb 13 04:05:57 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/astum/apps/app_setcallerid.c
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

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

Modified: team/oej/astum/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/cdr.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/cdr.c (original)
+++ team/oej/astum/cdr.c Mon Feb 13 04:05:57 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/astum/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/cdr/Makefile?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/cdr/Makefile (original)
+++ team/oej/astum/cdr/Makefile Mon Feb 13 04:05:57 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/astum/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channel.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/channel.c (original)
+++ team/oej/astum/channel.c Mon Feb 13 04:05:57 2006
@@ -2434,6 +2434,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/astum/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/Makefile?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/channels/Makefile (original)
+++ team/oej/astum/channels/Makefile Mon Feb 13 04:05:57 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/astum/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_agent.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/channels/chan_agent.c (original)
+++ team/oej/astum/channels/chan_agent.c Mon Feb 13 04:05:57 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/astum/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_iax2.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/channels/chan_iax2.c (original)
+++ team/oej/astum/channels/chan_iax2.c Mon Feb 13 04:05:57 2006
@@ -9170,31 +9170,29 @@
 	return -1;
 }
 
-static char *function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
-{
-	char *ret = NULL;
+static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+{
 	struct iax2_peer *peer;
 	char *peername, *colname;
 	char iabuf[INET_ADDRSTRLEN];
 
 	if (!(peername = ast_strdupa(data)))
-		return ret;
+		return -1;
 
 	/* if our channel, return the IP address of the endpoint of current channel */
 	if (!strcmp(peername,"CURRENTCHANNEL")) {
 	        unsigned short callno = PTR_TO_CALLNO(chan->tech_pvt);
 		ast_copy_string(buf, iaxs[callno]->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), iaxs[callno]->addr.sin_addr) : "", len);
-		return buf;
-	}
-
-	if ((colname = strchr(peername, ':'))) {
-		*colname = '\0';
-		colname++;
-	} else {
+		return 0;
+	}
+
+	if ((colname = strchr(peername, ':')))
+		*colname++ = '\0';
+	else
 		colname = "ip";
-	}
+
 	if (!(peer = find_peer(peername, 1)))
-		return ret;
+		return -1;
 
 	if (!strcasecmp(colname, "ip")) {
 		ast_copy_string(buf, peer->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), peer->addr.sin_addr) : "", len);
@@ -9229,16 +9227,15 @@
 			ast_copy_string(buf, ast_getformatname(codec), len);
 		}
 	}
-	ret = buf;
-
-	return ret;
+
+	return 0;
 }
 
 struct ast_custom_function iaxpeer_function = {
-    .name = "IAXPEER",
-    .synopsis = "Gets IAX peer information",
-    .syntax = "IAXPEER(<peername|CURRENTCHANNEL>[:item])",
-    .read = function_iaxpeer,
+	.name = "IAXPEER",
+	.synopsis = "Gets IAX peer information",
+	.syntax = "IAXPEER(<peername|CURRENTCHANNEL>[:item])",
+	.read = function_iaxpeer,
 	.desc = "If peername specified, valid items are:\n"
 	"- ip (default)          The IP address.\n"
 	"- status                The peer's status (if qualify=yes)\n"
@@ -9484,6 +9481,7 @@
 	ast_channel_unregister(&iax2_tech);
 	delete_users();
 	iax_provision_unload();
+	sched_context_destroy(sched);
 	return 0;
 }
 

Modified: team/oej/astum/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_mgcp.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/channels/chan_mgcp.c (original)
+++ team/oej/astum/channels/chan_mgcp.c Mon Feb 13 04:05:57 2006
@@ -4450,6 +4450,7 @@
 	ast_cli_unregister(&cli_debug);
 	ast_cli_unregister(&cli_no_debug);
 	ast_cli_unregister(&cli_mgcp_reload);
+	sched_context_destroy(sched);
 
 	return 0;
 }

Modified: team/oej/astum/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_sip.c?rev=9749&r1=9748&r2=9749&view=diff
==============================================================================
--- team/oej/astum/channels/chan_sip.c (original)
+++ team/oej/astum/channels/chan_sip.c Mon Feb 13 04:05:57 2006
@@ -9269,21 +9269,21 @@
 
 
 /*! \brief  func_header_read: Read SIP header (dialplan function) */
-static char *func_header_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) 
+int func_header_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len) 
 {
 	struct sip_pvt *p;
 	char *content;
 	
  	if (!data) {
 		ast_log(LOG_WARNING, "This function requires a header name.\n");
-		return NULL;
+		return -1;
 	}
 
 	ast_mutex_lock(&chan->lock);
 	if (chan->tech != &sip_tech) {
 		ast_log(LOG_WARNING, "This function can only be used on SIP channels.\n");
 		ast_mutex_unlock(&chan->lock);
-		return NULL;
+		return -1;
 	}
 
 	p = chan->tech_pvt;
@@ -9291,22 +9291,21 @@
 	/* If there is no private structure, this channel is no longer alive */
 	if (!p) {
 		ast_mutex_unlock(&chan->lock);
-		return NULL;
+		return -1;
 	}
 
 	content = get_header(&p->initreq, data);
 
 	if (ast_strlen_zero(content)) {
 		ast_mutex_unlock(&chan->lock);
-		return NULL;
+		return -1;
 	}
 
 	ast_copy_string(buf, content, len);
 	ast_mutex_unlock(&chan->lock);
 
-	return buf;
-}
-
+	return 0;
+}
 
 static struct ast_custom_function sip_header_function = {
 	.name = "SIP_HEADER",
@@ -9316,17 +9315,17 @@
 };
 
 /*! \brief  function_check_sipdomain: Dial plan function to check if domain is local */
-static char *func_check_sipdomain(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+int func_check_sipdomain(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "CHECKSIPDOMAIN requires an argument - A domain name\n");
-		return buf;
+		return -1;
 	}
 	if (check_sip_domain(data, NULL, 0))
 		ast_copy_string(buf, data, len);
 	else
 		buf[0] = '\0';
-	return buf;
+	return 0;
 }
 
 static struct ast_custom_function checksipdomain_function = {
@@ -9340,26 +9339,20 @@
 		"Check the domain= configuration in sip.conf\n",
 };
 
-
 /*! \brief  function_sippeer: ${SIPPEER()} Dialplan function - reads peer data */
-static char *function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
-{
-	char *ret = NULL;
+int function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+{
 	struct sip_peer *peer;
-	char *peername, *colname;
+	char *peername = data, *colname;
 	char iabuf[INET_ADDRSTRLEN];
 
-	if (!(peername = ast_strdupa(data)))
-		return ret;
-

[... 2220 lines stripped ...]


More information about the asterisk-commits mailing list