[asterisk-commits] branch oej/securertp-trunk r36016 - in
/team/oej/securertp-trunk: ./ apps/ bu...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jun 26 03:23:18 MST 2006
Author: oej
Date: Mon Jun 26 05:23:17 2006
New Revision: 36016
URL: http://svn.digium.com/view/asterisk?rev=36016&view=rev
Log:
Reset automerge, resolve conflicts in build system
Added:
team/oej/securertp-trunk/Makefile.rules
- copied unchanged from r35989, trunk/Makefile.rules
team/oej/securertp-trunk/codecs/codec_zap.c
- copied unchanged from r35989, trunk/codecs/codec_zap.c
Removed:
team/oej/securertp-trunk/build_tools/Makefile
team/oej/securertp-trunk/build_tools/menuselect.c
team/oej/securertp-trunk/build_tools/menuselect.h
team/oej/securertp-trunk/build_tools/menuselect_curses.c
Modified:
team/oej/securertp-trunk/ (props changed)
team/oej/securertp-trunk/Makefile
team/oej/securertp-trunk/abstract_jb.c
team/oej/securertp-trunk/apps/Makefile
team/oej/securertp-trunk/apps/app_dumpchan.c
team/oej/securertp-trunk/apps/app_flash.c
team/oej/securertp-trunk/apps/app_meetme.c
team/oej/securertp-trunk/apps/app_queue.c
team/oej/securertp-trunk/apps/app_rpt.c
team/oej/securertp-trunk/apps/app_zapbarge.c
team/oej/securertp-trunk/apps/app_zapras.c
team/oej/securertp-trunk/apps/app_zapscan.c
team/oej/securertp-trunk/build_tools/menuselect-deps.in
team/oej/securertp-trunk/build_tools/prep_moduledeps
team/oej/securertp-trunk/cdr/Makefile
team/oej/securertp-trunk/channel.c
team/oej/securertp-trunk/channels/Makefile
team/oej/securertp-trunk/channels/chan_alsa.c
team/oej/securertp-trunk/channels/chan_h323.c
team/oej/securertp-trunk/channels/chan_iax2.c
team/oej/securertp-trunk/channels/chan_jingle.c
team/oej/securertp-trunk/channels/chan_mgcp.c
team/oej/securertp-trunk/channels/chan_oss.c
team/oej/securertp-trunk/channels/chan_sip.c
team/oej/securertp-trunk/channels/chan_skinny.c
team/oej/securertp-trunk/channels/chan_zap.c
team/oej/securertp-trunk/codecs/Makefile
team/oej/securertp-trunk/codecs/codec_g726.c
team/oej/securertp-trunk/codecs/codec_gsm.c
team/oej/securertp-trunk/codecs/codec_ilbc.c
team/oej/securertp-trunk/codecs/codec_lpc10.c
team/oej/securertp-trunk/codecs/codec_speex.c
team/oej/securertp-trunk/configure
team/oej/securertp-trunk/configure.ac
team/oej/securertp-trunk/doc/ (props changed)
team/oej/securertp-trunk/formats/Makefile
team/oej/securertp-trunk/formats/format_ogg_vorbis.c
team/oej/securertp-trunk/funcs/Makefile
team/oej/securertp-trunk/include/asterisk/abstract_jb.h
team/oej/securertp-trunk/include/asterisk/autoconfig.h.in
team/oej/securertp-trunk/include/asterisk/channel.h
team/oej/securertp-trunk/include/asterisk/translate.h
team/oej/securertp-trunk/makeopts.in
team/oej/securertp-trunk/pbx/Makefile
team/oej/securertp-trunk/res/Makefile
team/oej/securertp-trunk/res/res_musiconhold.c
team/oej/securertp-trunk/res/res_snmp.c
team/oej/securertp-trunk/sounds/Makefile
team/oej/securertp-trunk/translate.c
team/oej/securertp-trunk/udptl.c
Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
--- svn:externals (original)
+++ svn:externals Mon Jun 26 05:23:17 2006
@@ -1,1 +1,2 @@
-mxml http://svn.digium.com/svn/mxml/trunk
+menuselect http://svn.digium.com/svn/menuselect/trunk
+mxml http://svn.digium.com/svn/mxml/trunk
Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun 26 05:23:17 2006
@@ -16,6 +16,7 @@
testexpr2
makeopts
menuselect.makeopts
+menuselect.makedeps
config.status
config.log
makeopts.xml
Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun 26 05:23:17 2006
@@ -1,1 +1,1 @@
-/trunk:1-35597
+/trunk:1-36014
Modified: team/oej/securertp-trunk/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/Makefile?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/Makefile (original)
+++ team/oej/securertp-trunk/Makefile Mon Jun 26 05:23:17 2006
@@ -121,6 +121,7 @@
ifneq ($(wildcard menuselect.makeopts),)
include menuselect.makeopts
+ include menuselect.makedeps
endif
ifneq ($(wildcard makeopts),)
@@ -228,9 +229,6 @@
BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
- ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),)
- ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
- endif
endif # FreeBSD
ifeq ($(OSARCH),NetBSD)
@@ -303,9 +301,9 @@
endif
ifeq ($(OSARCH),Linux)
- LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv #-lnjamd
+ LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
else
- LIBS+=$(EDITLINE_LIBS) -lm
+ LIBS+=$(EDITLINE_LIB) -lm
endif
ifeq ($(OSARCH),Darwin)
@@ -333,11 +331,11 @@
endif
ifeq ($(OSARCH),NetBSD)
- LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
+ LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
endif
ifeq ($(OSARCH),OpenBSD)
- LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
+ LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
endif
ifeq ($(OSARCH),SunOS)
@@ -392,8 +390,8 @@
@echo "****"
@exit 1
-menuselect.makeopts: build_tools/menuselect makeopts.xml
- @build_tools/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
+menuselect.makeopts: menuselect/menuselect makeopts.xml
+ @menuselect/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
#ifneq ($(wildcard tags),)
ctags: tags
@@ -473,6 +471,8 @@
mv $@.tmp $@ ; \
fi
@rm -f $@.tmp
+
+channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
build_tools/make_build_h > include/asterisk/build.h.tmp
@@ -504,17 +504,20 @@
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
@$(MAKE) -C db1-ast clean
@$(MAKE) -C stdtime clean
+ @$(MAKE) -C menuselect clean
distclean: dist-clean
dist-clean: clean
@$(MAKE) -C mxml clean
- @$(MAKE) -C build_tools dist-clean
+ @$(MAKE) -C menuselect dist-clean
@$(MAKE) -C sounds dist-clean
- rm -f menuselect.makeopts makeopts makeopts.xml
+ rm -f menuselect.makeopts makeopts makeopts.xml menuselect.makedeps
rm -f config.log config.status
+ rm -rf autom4te.cache
rm -f include/autoconfig.h
rm -f include/asterisk/buildopts.h
+ rm -rf doc/api
datafiles: all
if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
@@ -869,11 +872,11 @@
rm -rf $(DESTDIR)$(ASTETCDIR)
rm -rf $(DESTDIR)$(ASTLOGDIR)
-menuselect: build_tools/menuselect makeopts.xml
- - at build_tools/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
-
-build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
- $(MAKE) -C build_tools menuselect
+menuselect: menuselect/menuselect makeopts.xml
+ - at menuselect/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
+
+menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
+ @CFLAGS="-include ../include/asterisk/autoconfig.h" $(MAKE) -C menuselect menuselect
mxml/libmxml.a:
@cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
@@ -883,4 +886,4 @@
@echo "Generating list of available modules ..."
@build_tools/prep_moduledeps > $@
-.PHONY: sounds clean clean-depend dist-clean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL) $(SUBDIRS)
+.PHONY: menuselect sounds clean clean-depend dist-clean distclean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL) $(SUBDIRS)
Modified: team/oej/securertp-trunk/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/abstract_jb.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/abstract_jb.c (original)
+++ team/oej/securertp-trunk/abstract_jb.c Mon Jun 26 05:23:17 2006
@@ -176,7 +176,7 @@
static void jb_choose_impl(struct ast_channel *chan)
{
- struct ast_jb *jb = chan->jb;
+ struct ast_jb *jb = &chan->jb;
struct ast_jb_conf *jbconf = &jb->conf;
struct ast_jb_impl *test_impl;
int i, avail_impl_count = sizeof(avail_impl) / sizeof(avail_impl[0]);
@@ -197,8 +197,8 @@
int ast_jb_do_usecheck(struct ast_channel *c0, struct ast_channel *c1)
{
- struct ast_jb *jb0 = c0->jb;
- struct ast_jb *jb1 = c1->jb;
+ struct ast_jb *jb0 = &c0->jb;
+ struct ast_jb *jb1 = &c1->jb;
struct ast_jb_conf *conf0 = &jb0->conf;
struct ast_jb_conf *conf1 = &jb1->conf;
int c0_wants_jitter = c0->tech->properties & AST_CHAN_TP_WANTSJITTER;
@@ -258,8 +258,8 @@
int ast_jb_get_when_to_wakeup(struct ast_channel *c0, struct ast_channel *c1, int time_left)
{
- struct ast_jb *jb0 = c0->jb;
- struct ast_jb *jb1 = c1->jb;
+ struct ast_jb *jb0 = &c0->jb;
+ struct ast_jb *jb1 = &c1->jb;
int c0_use_jb = ast_test_flag(jb0, JB_USE);
int c0_jb_is_created = ast_test_flag(jb0, JB_CREATED);
int c1_use_jb = ast_test_flag(jb1, JB_USE);
@@ -298,7 +298,7 @@
int ast_jb_put(struct ast_channel *chan, struct ast_frame *f)
{
- struct ast_jb *jb = chan->jb;
+ struct ast_jb *jb = &chan->jb;
struct ast_jb_impl *jbimpl = jb->impl;
void *jbobj = jb->jbobj;
struct ast_frame *frr;
@@ -366,8 +366,8 @@
void ast_jb_get_and_deliver(struct ast_channel *c0, struct ast_channel *c1)
{
- struct ast_jb *jb0 = c0->jb;
- struct ast_jb *jb1 = c1->jb;
+ struct ast_jb *jb0 = &c0->jb;
+ struct ast_jb *jb1 = &c1->jb;
int c0_use_jb = ast_test_flag(jb0, JB_USE);
int c0_jb_is_created = ast_test_flag(jb0, JB_CREATED);
int c1_use_jb = ast_test_flag(jb1, JB_USE);
@@ -383,7 +383,7 @@
static void jb_get_and_deliver(struct ast_channel *chan)
{
- struct ast_jb *jb = chan->jb;
+ struct ast_jb *jb = &chan->jb;
struct ast_jb_impl *jbimpl = jb->impl;
void *jbobj = jb->jbobj;
struct ast_frame *f, finterp;
@@ -447,7 +447,7 @@
static int create_jb(struct ast_channel *chan, struct ast_frame *frr)
{
- struct ast_jb *jb = chan->jb;
+ struct ast_jb *jb = &chan->jb;
struct ast_jb_conf *jbconf = &jb->conf;
struct ast_jb_impl *jbimpl = jb->impl;
void *jbobj;
@@ -527,7 +527,7 @@
void ast_jb_destroy(struct ast_channel *chan)
{
- struct ast_jb *jb = chan->jb;
+ struct ast_jb *jb = &chan->jb;
struct ast_jb_impl *jbimpl = jb->impl;
void *jbobj = jb->jbobj;
struct ast_frame *f;
@@ -551,8 +551,6 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "%s jitterbuffer destroyed on channel %s\n", jbimpl->name, chan->name);
}
-
- free(jb);
}
@@ -603,25 +601,15 @@
}
-int ast_jb_configure(struct ast_channel *chan, const struct ast_jb_conf *conf)
-{
- if (!(chan->jb = ast_calloc(1, sizeof(*chan->jb))))
- return -1;
-
- memcpy(&chan->jb->conf, conf, sizeof(*conf));
-
- return 0;
-}
-
-
-int ast_jb_get_config(const struct ast_channel *chan, struct ast_jb_conf *conf)
-{
- if (!chan->jb)
- return -1;
-
- memcpy(conf, &chan->jb->conf, sizeof(*conf));
-
- return 0;
+void ast_jb_configure(struct ast_channel *chan, const struct ast_jb_conf *conf)
+{
+ memcpy(&chan->jb.conf, conf, sizeof(*conf));
+}
+
+
+void ast_jb_get_config(const struct ast_channel *chan, struct ast_jb_conf *conf)
+{
+ memcpy(conf, &chan->jb.conf, sizeof(*conf));
}
Modified: team/oej/securertp-trunk/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/Makefile?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/Makefile (original)
+++ team/oej/securertp-trunk/apps/Makefile Mon Jun 26 05:23:17 2006
@@ -5,62 +5,24 @@
#
# Copyright (C) 1999-2006, Digium, Inc.
#
-# Mark Spencer <markster at digium.com>
-#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend uninstall
-
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
+ include ../menuselect.makedeps
endif
SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) $(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
-app_voicemail.o: CFLAGS+=$(patsubst %,-D%,$(MENUSELECT_app_voicemail))
+all: _all
-all: $(MODS)
-
-clean-depend:
- rm -f .depend
-
-clean: clean-depend
- rm -f *.so *.o
-
-%.so: %.o
- $(CC) $(SOLINK) -o $@ $<
-
-app_rpt.so: app_rpt.o
- $(CC) $(SOLINK) -o $@ $< $(ZAPTEL_LIB)
-
-app_rpt.o: app_rpt.c
- $(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
-
-install: all
- 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
-
-uninstall:
+include ../Makefile.rules
ifeq (SunOS,$(shell uname))
app_chanspy.so: app_chanspy.o
$(CC) $(SOLINK) -o $@ $< -lrt
endif
-
-ifneq ($(wildcard .depend),)
- include .depend
-endif
-
-depend: .depend
-
-.depend:
- ../build_tools/mkdep $(CFLAGS) `ls *.c`
-
-env:
- env
Modified: team/oej/securertp-trunk/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_dumpchan.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_dumpchan.c (original)
+++ team/oej/securertp-trunk/apps/app_dumpchan.c Mon Jun 26 05:23:17 2006
@@ -50,25 +50,25 @@
static char *app = "DumpChan";
static char *synopsis = "Dump Info About The Calling Channel";
static char *desc =
-" DumpChan([<min_verbose_level>])\n"
-"Displays information on channel and listing of all channel\n"
-"variables. If min_verbose_level is specified, output is only\n"
-"displayed when the verbose level is currently set to that number\n"
-"or greater. \n";
+ " DumpChan([<min_verbose_level>])\n"
+ "Displays information on channel and listing of all channel\n"
+ "variables. If min_verbose_level is specified, output is only\n"
+ "displayed when the verbose level is currently set to that number\n"
+ "or greater. \n";
LOCAL_USER_DECL;
-static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
+static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
{
struct timeval now;
- long elapsed_seconds=0;
- int hour=0, min=0, sec=0;
+ long elapsed_seconds = 0;
+ int hour = 0, min = 0, sec = 0;
char cgrp[BUFSIZ/2];
char pgrp[BUFSIZ/2];
char formatbuf[BUFSIZ/2];
now = ast_tvnow();
- memset(buf,0,size);
+ memset(buf, 0, size);
if (!c)
return 0;
@@ -135,27 +135,25 @@
static int dumpchan_exec(struct ast_channel *chan, void *data)
{
- int res=0;
struct localuser *u;
- char vars[1024];
+ char vars[BUFSIZ * 4];
char info[1024];
int level = 0;
static char *line = "================================================================================";
LOCAL_USER_ADD(u);
- if (!ast_strlen_zero(data)) {
+ if (!ast_strlen_zero(data))
level = atoi(data);
- }
pbx_builtin_serialize_variables(chan, vars, sizeof(vars));
- ast_serialize_showchan(chan, info, sizeof(info));
+ serialize_showchan(chan, info, sizeof(info));
if (option_verbose >= level)
- ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n",chan->name, line, info, vars, line);
+ ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars, line);
LOCAL_USER_REMOVE(u);
- return res;
+ return 0;
}
static int unload_module(void *mod)
Modified: team/oej/securertp-trunk/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_flash.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_flash.c (original)
+++ team/oej/securertp-trunk/apps/app_flash.c Mon Jun 26 05:23:17 2006
@@ -38,11 +38,7 @@
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
#include "asterisk/lock.h"
#include "asterisk/file.h"
Modified: team/oej/securertp-trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_meetme.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_meetme.c (original)
+++ team/oej/securertp-trunk/apps/app_meetme.c Mon Jun 26 05:23:17 2006
@@ -39,11 +39,7 @@
#include <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
#include "asterisk/lock.h"
#include "asterisk/file.h"
Modified: team/oej/securertp-trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_queue.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_queue.c (original)
+++ team/oej/securertp-trunk/apps/app_queue.c Mon Jun 26 05:23:17 2006
@@ -3746,8 +3746,10 @@
else
ast_log(LOG_DEBUG, "XXX Leaking a little memory :( XXX\n");
} else {
+ ast_mutex_lock(&q->lock);
for (cur = q->members; cur; cur = cur->next)
cur->status = ast_device_state(cur->interface);
+ ast_mutex_unlock(&q->lock);
}
}
AST_LIST_TRAVERSE_SAFE_END;
Modified: team/oej/securertp-trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_rpt.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_rpt.c (original)
+++ team/oej/securertp-trunk/apps/app_rpt.c Mon Jun 26 05:23:17 2006
@@ -118,6 +118,7 @@
/*** MODULEINFO
<depend>zaptel</depend>
+ <depend>tonezone</depend>
<defaultenabled>no</defaultenabled>
***/
@@ -221,8 +222,8 @@
#include <sys/ioctl.h>
#include <sys/io.h>
#include <math.h>
+#include <zaptel.h>
#include <tonezone.h>
-#include <linux/zaptel.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Modified: team/oej/securertp-trunk/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_zapbarge.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_zapbarge.c (original)
+++ team/oej/securertp-trunk/apps/app_zapbarge.c Mon Jun 26 05:23:17 2006
@@ -45,12 +45,7 @@
#include <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
-
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
#include "asterisk/lock.h"
#include "asterisk/file.h"
Modified: team/oej/securertp-trunk/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_zapras.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_zapras.c (original)
+++ team/oej/securertp-trunk/apps/app_zapras.c Mon Jun 26 05:23:17 2006
@@ -48,13 +48,7 @@
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
-
-/* Need some zaptel help here */
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
#include "asterisk/lock.h"
#include "asterisk/file.h"
Modified: team/oej/securertp-trunk/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_zapscan.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_zapscan.c (original)
+++ team/oej/securertp-trunk/apps/app_zapscan.c Mon Jun 26 05:23:17 2006
@@ -44,12 +44,7 @@
#include <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
-
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
#include "asterisk/lock.h"
#include "asterisk/file.h"
Modified: team/oej/securertp-trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/build_tools/menuselect-deps.in?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/build_tools/menuselect-deps.in (original)
+++ team/oej/securertp-trunk/build_tools/menuselect-deps.in Mon Jun 26 05:23:17 2006
@@ -11,7 +11,7 @@
LIBSPEEX=@PBX_LIBSPEEX@
LIBVORBIS=@PBX_LIBVORBIS@
NBS=@PBX_LIBNBS@
-OGG=@PBX_LIBOGG@
+LIBOGG=@PBX_LIBOGG@
OSSAUDIO=@PBX_LIBOSS@
PGSQL=@PBX_LIBpq@
QT=@PBX_QT@
@@ -22,8 +22,10 @@
VPBAPI=@PBX_LIBvpb@
WIN32=@OSISWIN32@
ZLIB=@PBX_LIBZLIB@
-ZAPTEL=@PBX_LIBZAPTEL@
+TONEZONE=@PBX_LIBTONEZONE@
+ZAPTEL=@PBX_ZAPTEL@
LIBGSM=@PBX_LIBgsm@
IKSEMEL=@PBX_LIBIKSEMEL@
IXJUSER=@PBX_IXJUSER@
+NETSNMP=@PBX_NETSNMP@
LIBSRTP=@PBX_LIBSRTP@
Modified: team/oej/securertp-trunk/build_tools/prep_moduledeps
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/build_tools/prep_moduledeps?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/build_tools/prep_moduledeps (original)
+++ team/oej/securertp-trunk/build_tools/prep_moduledeps Mon Jun 26 05:23:17 2006
@@ -52,7 +52,7 @@
echo "<?xml version="1.0"?>"
echo
-echo "<menu>"
+echo "<menu name=\"Asterisk Module Selection\">"
rm -f .makeoptstmp
process_dir apps app APPS Applications
process_dir cdr cdr CDR "Call Detail Recording"
Modified: team/oej/securertp-trunk/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/cdr/Makefile?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/cdr/Makefile (original)
+++ team/oej/securertp-trunk/cdr/Makefile Mon Jun 26 05:23:17 2006
@@ -5,31 +5,18 @@
#
# Copyright (C) 1999-2006, Digium, Inc.
#
-# Mark Spencer <markster at digium.com>
-#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend uninstall
-
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
+ include ../menuselect.makedeps
endif
SELECTED_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
-#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
-#This works for even old (2.96) versions of gcc and provides a small boost either way.
-#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
-#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
- CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
-endif
-
-ifneq ($(TDS_LIB),)
+ifneq ($(FREETDS_LIB),)
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
@@ -41,60 +28,6 @@
endif
endif
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+all: _all
-all: $(MODS)
-
-install: all
- for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-
-uninstall:
-
-clean-depend:
- rm -f .depend
-
-clean: clean-depend
- rm -f *.so *.o
-
-%.so : %.o
- $(CC) $(SOLINK) -o $@ $<
-
-cdr_odbc.so: cdr_odbc.o
- $(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
-
-cdr_odbc.o: cdr_odbc.c
- $(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
-
-cdr_tds.so: cdr_tds.o
- $(CC) $(SOLINK) -o $@ $< $(TDS_LIB)
-
-cdr_tds.o: cdr_tds.c
- $(CC) -c -o $@ $(CFLAGS) $(TDS_INCLUDE) $<
-
-cdr_pgsql.so: cdr_pgsql.o
- $(CC) $(SOLINK) -o $@ $< $(PGSQL_LIB)
-
-cdr_pgsql.o: cdr_pgsql.c
- $(CC) -c -o $@ $(CFLAGS) $(PGSQL_INCLUDE) $<
-
-cdr_sqlite.so: cdr_sqlite.o
- $(CC) $(SOLINK) -o $@ $< $(SQLITE_LIB)
-
-cdr_sqlite.o: cdr_sqlite.c
- $(CC) -c -o $@ $(CFLAGS) $(SQLITE_INCLUDE) $<
-
-cdr_radius.so: cdr_radius.o
- $(CC) $(SOLINK) -o $@ $< $(RADIUSCLIENT_LIB)
-
-cdr_radius.o: cdr_radius.c
- $(CC) -c -o $@ $(CFLAGS) $(RADIUSCLIENT_INCLUDE) $<
-
-
-ifneq ($(wildcard .depend),)
- include .depend
-endif
-
-depend: .depend
-
-.depend:
- ../build_tools/mkdep $(CFLAGS) `ls *.c`
+include ../Makefile.rules
Modified: team/oej/securertp-trunk/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/channel.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/channel.c (original)
+++ team/oej/securertp-trunk/channel.c Mon Jun 26 05:23:17 2006
@@ -38,14 +38,7 @@
#ifdef HAVE_ZAPTEL
#include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
-#ifndef ZT_TIMERPING
-#error "You need newer zaptel! Please cvs update zaptel"
-#endif
#endif
#include "asterisk/pbx.h"
@@ -1015,8 +1008,7 @@
ast_var_delete(vardata);
/* Destroy the jitterbuffer */
- if (chan->jb)
- ast_jb_destroy(chan);
+ ast_jb_destroy(chan);
ast_string_field_free_all(chan);
free(chan);
Modified: team/oej/securertp-trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/channels/Makefile?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/channels/Makefile (original)
+++ team/oej/securertp-trunk/channels/Makefile Mon Jun 26 05:23:17 2006
@@ -5,16 +5,13 @@
#
# Copyright (C) 1999-2006, Digium, Inc.
#
-# Mark Spencer <markster at digium.com>
-#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend uninstall
-
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
+ include ../menuselect.makedeps
endif
SELECTED_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)))
@@ -30,11 +27,6 @@
CHANH323LIB=-ldl
endif
-ifeq ($(PROC),sparc64)
- PROC=ultrasparc
- CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
-endif
-
ifeq ($(OSARCH),FreeBSD)
PTLIB=-lpt_FreeBSD_x86_r
H323LIB=-lh323_FreeBSD_x86_r
@@ -44,10 +36,6 @@
ifeq ($(OSARCH),NetBSD)
PTLIB=-lpt_NetBSD_x86_r
H323LIB=-lh323_NetBSD_x86_r
-endif
-
-ifeq ($(OSARCH),SunOS)
- SOLINK+=-lrt
endif
ifeq ($(wildcard h323/libchanh323.a),)
@@ -68,23 +56,14 @@
PWLIBDIR=$(HOME)/pwlib
endif
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
-all: $(MODS)
+all: _all
-clean-depend:
- rm -f .depend
+include ../Makefile.rules
-clean: clean-depend
- rm -f *.so *.o
+clean::
rm -f busy.h ringtone.h gentone gentone-ulaw
-
-%.so : %.o
- $(CC) $(SOLINK) -o $@ $<
-
-ifneq ($(wildcard .depend),)
- include .depend
-endif
ifneq ($(wildcard h323/Makefile.ast),)
include h323/Makefile.ast
@@ -94,11 +73,8 @@
include misdn/Makefile.ast
endif
-gentone: gentone.c
- $(HOST_CC) -o gentone gentone.c -lm
-
-gentone-ulaw: gentone-ulaw.c
- $(HOST_CC) -o gentone-ulaw gentone-ulaw.c -lm
+gentone gentone-ulaw: %: %.c
+ $(HOST_CC) -o $@ $< -lm
busy.h: gentone
./gentone busy 480 620
@@ -107,43 +83,16 @@
./gentone ringtone 440 480
chan_oss.o: chan_oss.c busy.h ringtone.h
- $(CC) -c -o $@ $(CFLAGS) $(OSSAUDIO_INCLUDE) $<
-chan_oss.so: chan_oss.o
- $(CC) $(SOLINK) -o $@ chan_oss.o $(OSSAUDIO_LIB)
+chan_iax2.so: iax2-parser.o iax2-provision.o
-chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
- $(CC) $(SOLINK) -o $@ $< iax2-parser.o iax2-provision.o
-
-chan_zap.so: chan_zap.o
- $(CC) $(SOLINK) -o $@ $< $(PRI_LIB) $(ZAPTEL_LIB)
-
-chan_zap.o: chan_zap.c
- $(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
-
-chan_alsa.so: chan_alsa.o
- $(CC) $(SOLINK) -o $@ $< $(ASOUND_LIB)
-
-chan_alsa.o: chan_alsa.c busy.h ringtone.h
- $(CC) -c -o $@ $(CFLAGS) $(ASOUND_INCLUDE) $<
-
-chan_nbs.so: chan_nbs.o
- $(CC) $(SOLINK) -o $@ $< $(NBS_LIB)
-
-chan_nbs.o: chan_nbs.c
- $(CC) -c -o $@ $(CFLAGS) $(NBS_INCLUDE) $<
+chan_alsa.o: busy.h ringtone.h
chan_vpb.o: chan_vpb.c
$(CXX) -c $(CFLAGS:-Werror=) -o $@ chan_vpb.c
chan_vpb.so: chan_vpb.o
$(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
-
-chan_jingle.o: chan_jingle.c
- $(CC) -c -o $@ $(CFLAGS) $(IKSEMEL_INCLUDE) $<
-
-chan_jingle.so: chan_jingle.o
- $(CC) $(SOLINK) -o $@ $< $(IKSEMEL_LIB)
ifeq ($(OSARCH),Linux)
chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
@@ -156,24 +105,5 @@
misdn/chan_misdn_lib.a:
make -C misdn
-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 $@
-
-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 $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-
-uninstall:
-
-depend: .depend
-
-.depend:
- ../build_tools/mkdep $(CFLAGS) `ls *.c`
-
-env:
- env
+chan_misdn.so: misdn_config.o misdn/chan_misdn_lib.a
+ $(CC) $(SOLINK) -o $@ $^ -lisdnnet -lmISDN
Modified: team/oej/securertp-trunk/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/channels/chan_alsa.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/channels/chan_alsa.c (original)
+++ team/oej/securertp-trunk/channels/chan_alsa.c Mon Jun 26 05:23:17 2006
@@ -812,23 +812,19 @@
ast_string_field_set(tmp, language, language);
p->owner = tmp;
ast_setstate(tmp, state);
- if (ast_jb_configure(tmp, &global_jbconf)) {
- ast_hangup(tmp);
- p->owner = NULL;
- return NULL;
- }
+ ast_mutex_lock(&usecnt_lock);
+ usecnt++;
+ ast_mutex_unlock(&usecnt_lock);
+ ast_update_use_count();
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_hangup(tmp);
- p->owner = NULL;
- return NULL;
+ tmp = NULL;
}
}
- ast_mutex_lock(&usecnt_lock);
- usecnt++;
- ast_mutex_unlock(&usecnt_lock);
- ast_update_use_count();
+ if (tmp)
+ ast_jb_configure(tmp, &global_jbconf);
}
return tmp;
}
Modified: team/oej/securertp-trunk/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/channels/chan_h323.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/channels/chan_h323.c (original)
+++ team/oej/securertp-trunk/channels/chan_h323.c Mon Jun 26 05:23:17 2006
@@ -746,6 +746,9 @@
/* Don't hold a oh323_pvt lock while we allocate a chanel */
ast_mutex_unlock(&pvt->lock);
ch = ast_channel_alloc(1);
+ /* Update usage counter */
+ ast_atomic_fetchadd_int(&__mod_desc->usecnt, +1);
+ ast_update_use_count();
ast_mutex_lock(&pvt->lock);
if (ch) {
ch->tech = &oh323_tech;
@@ -800,25 +803,17 @@
ch->cid.cid_dnid = strdup(pvt->exten);
}
ast_setstate(ch, state);
- /* Configure the new channel jb */
- if (pvt->rtp) {
- if (ast_jb_configure(ch, &global_jbconf)) {
- ast_hangup(ch);
- pvt->owner = NULL;
- return NULL;
- }
- }
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(ch)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ch->name);
ast_hangup(ch);
- pvt->owner = NULL;
- return NULL;
- }
- }
- /* Update usage counter */
- ast_atomic_fetchadd_int(&__mod_desc->usecnt, +1);
- ast_update_use_count();
+ ch = NULL;
+ }
+ }
+
+ /* Configure the new channel jb */
+ if (ch && pvt && pvt->rtp)
+ ast_jb_configure(ch, &global_jbconf);
} else {
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
}
Modified: team/oej/securertp-trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/channels/chan_iax2.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/channels/chan_iax2.c (original)
+++ team/oej/securertp-trunk/channels/chan_iax2.c Mon Jun 26 05:23:17 2006
@@ -27,6 +27,10 @@
*
* \ingroup channel_drivers
*/
+
+/*** MODULEINFO
+ <use>zaptel</use>
+ ***/
#include "asterisk.h"
@@ -56,11 +60,7 @@
#ifdef HAVE_ZAPTEL
#include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
#include <zaptel.h>
-#endif /* __linux__ */
#endif
#include "asterisk/lock.h"
@@ -3268,60 +3268,67 @@
struct chan_iax2_pvt *i;
struct ast_variable *v = NULL;
+ if (!(i = iaxs[callno])) {
+ ast_log(LOG_WARNING, "No IAX2 pvt found for callno '%d' !\n", callno);
+ return NULL;
+ }
+
/* Don't hold call lock */
ast_mutex_unlock(&iaxsl[callno]);
tmp = ast_channel_alloc(1);
ast_mutex_lock(&iaxsl[callno]);
- i = iaxs[callno];
- if (i && tmp) {
- tmp->tech = &iax2_tech;
- ast_string_field_build(tmp, name, "IAX2/%s-%d", i->host, i->callno);
- /* We can support any format by default, until we get restricted */
- tmp->nativeformats = capability;
- tmp->readformat = ast_best_codec(capability);
- tmp->writeformat = ast_best_codec(capability);
- tmp->tech_pvt = CALLNO_TO_PTR(i->callno);
-
- if (!ast_strlen_zero(i->cid_num))
- tmp->cid.cid_num = ast_strdup(i->cid_num);
- if (!ast_strlen_zero(i->cid_name))
- tmp->cid.cid_name = ast_strdup(i->cid_name);
- if (!ast_strlen_zero(i->ani))
- tmp->cid.cid_ani = ast_strdup(i->ani);
- if (!ast_strlen_zero(i->language))
- ast_string_field_set(tmp, language, i->language);
- if (!ast_strlen_zero(i->dnid))
- tmp->cid.cid_dnid = ast_strdup(i->dnid);
- if (!ast_strlen_zero(i->rdnis))
- tmp->cid.cid_rdnis = ast_strdup(i->rdnis);
- tmp->cid.cid_pres = i->calling_pres;
- tmp->cid.cid_ton = i->calling_ton;
- tmp->cid.cid_tns = i->calling_tns;
- if (!ast_strlen_zero(i->accountcode))
- ast_string_field_set(tmp, accountcode, i->accountcode);
- if (i->amaflags)
- tmp->amaflags = i->amaflags;
- ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
- ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten));
- tmp->adsicpe = i->peeradsicpe;
- i->owner = tmp;
- i->capability = capability;
- ast_setstate(tmp, state);
- if (state != AST_STATE_DOWN) {
- if (ast_pbx_start(tmp)) {
- ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
- ast_hangup(tmp);
- i->owner = NULL;
- return NULL;
- }
- }
- for (v = i->vars ; v ; v = v->next)
- pbx_builtin_setvar_helper(tmp,v->name,v->value);
- ast_mutex_lock(&usecnt_lock);
- usecnt++;
- ast_mutex_unlock(&usecnt_lock);
- ast_update_use_count();
- }
+ if (!tmp)
+ return NULL;
+ tmp->tech = &iax2_tech;
+ ast_string_field_build(tmp, name, "IAX2/%s-%d", i->host, i->callno);
+ /* We can support any format by default, until we get restricted */
+ tmp->nativeformats = capability;
+ tmp->readformat = ast_best_codec(capability);
+ tmp->writeformat = ast_best_codec(capability);
+ tmp->tech_pvt = CALLNO_TO_PTR(i->callno);
+
+ if (!ast_strlen_zero(i->cid_num))
+ tmp->cid.cid_num = ast_strdup(i->cid_num);
+ if (!ast_strlen_zero(i->cid_name))
+ tmp->cid.cid_name = ast_strdup(i->cid_name);
+ if (!ast_strlen_zero(i->ani))
+ tmp->cid.cid_ani = ast_strdup(i->ani);
+ if (!ast_strlen_zero(i->language))
+ ast_string_field_set(tmp, language, i->language);
+ if (!ast_strlen_zero(i->dnid))
+ tmp->cid.cid_dnid = ast_strdup(i->dnid);
+ if (!ast_strlen_zero(i->rdnis))
+ tmp->cid.cid_rdnis = ast_strdup(i->rdnis);
+ tmp->cid.cid_pres = i->calling_pres;
+ tmp->cid.cid_ton = i->calling_ton;
+ tmp->cid.cid_tns = i->calling_tns;
+ if (!ast_strlen_zero(i->accountcode))
+ ast_string_field_set(tmp, accountcode, i->accountcode);
+ if (i->amaflags)
+ tmp->amaflags = i->amaflags;
+ ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
+ ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten));
+ tmp->adsicpe = i->peeradsicpe;
+ i->owner = tmp;
+ i->capability = capability;
+ ast_setstate(tmp, state);
+ if (state != AST_STATE_DOWN) {
+ if (ast_pbx_start(tmp)) {
+ ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
+ ast_hangup(tmp);
+ i->owner = NULL;
+ return NULL;
+ }
+ }
+
+ for (v = i->vars ; v ; v = v->next)
+ pbx_builtin_setvar_helper(tmp, v->name, v->value);
+
+ ast_mutex_lock(&usecnt_lock);
+ usecnt++;
+ ast_mutex_unlock(&usecnt_lock);
+ ast_update_use_count();
+
return tmp;
}
Modified: team/oej/securertp-trunk/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/channels/chan_jingle.c?rev=36016&r1=36015&r2=36016&view=diff
==============================================================================
--- team/oej/securertp-trunk/channels/chan_jingle.c (original)
+++ team/oej/securertp-trunk/channels/chan_jingle.c Mon Jun 26 05:23:17 2006
@@ -756,6 +756,9 @@
if (!ast_strlen_zero(client->musicclass))
ast_string_field_set(tmp, musicclass, client->musicclass);
i->owner = tmp;
+ ast_mutex_lock(&usecnt_lock);
+ usecnt++;
+ ast_mutex_unlock(&usecnt_lock);
ast_copy_string(tmp->context, client->context, sizeof(tmp->context));
ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten));
if (!ast_strlen_zero(i->cid_num))
@@ -766,26 +769,16 @@
tmp->cid.cid_dnid = ast_strdup(i->exten);
tmp->priority = 1;
ast_setstate(tmp, state);
- /* Configure the new channel jb */
- if (i->rtp) {
- if (ast_jb_configure(tmp, &global_jbconf)) {
- ast_hangup(tmp);
- i->owner = NULL;
- return NULL;
- }
- }
if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
ast_hangup(tmp);
- i->owner = NULL;
- return NULL;
- }
-
- ast_mutex_lock(&usecnt_lock);
- usecnt++;
- ast_mutex_unlock(&usecnt_lock);
- ast_update_use_count();
+ tmp = NULL;
+ }
+
+ /* Configure the new channel jb */
+ if (tmp && i && i->rtp)
+ ast_jb_configure(tmp, &global_jbconf);
return tmp;
}
Modified: team/oej/securertp-trunk/channels/chan_mgcp.c
[... 10383 lines stripped ...]
More information about the asterisk-commits
mailing list