[asterisk-commits] branch oej/videosupport r9753 - in /team/oej/videosupport: ./ agi/ apps/ buil...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 13 03:48:07 MST 2006


Author: oej
Date: Mon Feb 13 04:47:20 2006
New Revision: 9753

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

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

Propchange: team/oej/videosupport/
------------------------------------------------------------------------------
    automerge = BerlinGermany

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

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

Propchange: team/oej/videosupport/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb 13 04:47:20 2006
@@ -1,1 +1,1 @@
-/trunk:1-9512
+/trunk:1-9752

Modified: team/oej/videosupport/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/Makefile?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/Makefile (original)
+++ team/oej/videosupport/Makefile Mon Feb 13 04:47:20 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/videosupport/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/agi/Makefile?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/agi/Makefile (original)
+++ team/oej/videosupport/agi/Makefile Mon Feb 13 04:47:20 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/videosupport/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/apps/Makefile?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/apps/Makefile (original)
+++ team/oej/videosupport/apps/Makefile Mon Feb 13 04:47:20 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/videosupport/apps/app_curl.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/apps/app_curl.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/apps/app_curl.c (original)
+++ team/oej/videosupport/apps/app_curl.c Mon Feb 13 04:47:20 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/videosupport/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/apps/app_hasnewvoicemail.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/apps/app_hasnewvoicemail.c (original)
+++ team/oej/videosupport/apps/app_hasnewvoicemail.c Mon Feb 13 04:47:20 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/videosupport/apps/app_morsecode.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/apps/app_morsecode.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/apps/app_morsecode.c (original)
+++ team/oej/videosupport/apps/app_morsecode.c Mon Feb 13 04:47:20 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/videosupport/apps/app_morsecode.c
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

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

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

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

Modified: team/oej/videosupport/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/cdr.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/cdr.c (original)
+++ team/oej/videosupport/cdr.c Mon Feb 13 04:47:20 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/videosupport/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/cdr/Makefile?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/cdr/Makefile (original)
+++ team/oej/videosupport/cdr/Makefile Mon Feb 13 04:47:20 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/videosupport/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/channel.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/channel.c (original)
+++ team/oej/videosupport/channel.c Mon Feb 13 04:47:20 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/videosupport/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/channels/Makefile?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/channels/Makefile (original)
+++ team/oej/videosupport/channels/Makefile Mon Feb 13 04:47:20 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/videosupport/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/channels/chan_agent.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/channels/chan_agent.c (original)
+++ team/oej/videosupport/channels/chan_agent.c Mon Feb 13 04:47:20 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/videosupport/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/channels/chan_iax2.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/channels/chan_iax2.c (original)
+++ team/oej/videosupport/channels/chan_iax2.c Mon Feb 13 04:47:20 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/videosupport/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/channels/chan_mgcp.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/channels/chan_mgcp.c (original)
+++ team/oej/videosupport/channels/chan_mgcp.c Mon Feb 13 04:47:20 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/videosupport/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/videosupport/channels/chan_sip.c?rev=9753&r1=9752&r2=9753&view=diff
==============================================================================
--- team/oej/videosupport/channels/chan_sip.c (original)
+++ team/oej/videosupport/channels/chan_sip.c Mon Feb 13 04:47:20 2006
@@ -9311,21 +9311,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");

[... 5574 lines stripped ...]


More information about the asterisk-commits mailing list