[asterisk-commits] branch bweschke/findme_followme r9641 - in /team/bweschke/findme_followme: ./...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Feb 11 14:38:01 MST 2006


Author: bweschke
Date: Sat Feb 11 15:37:54 2006
New Revision: 9641

URL: http://svn.digium.com/view/asterisk?rev=9641&view=rev
Log:
 Fixed svnmerge conflicts.


Removed:
    team/bweschke/findme_followme/channels/adtranvofr.h
    team/bweschke/findme_followme/channels/chan_oss_old.c
Modified:
    team/bweschke/findme_followme/   (props changed)
    team/bweschke/findme_followme/apps/Makefile
    team/bweschke/findme_followme/apps/app_page.c
    team/bweschke/findme_followme/cdr/Makefile
    team/bweschke/findme_followme/channel.c
    team/bweschke/findme_followme/channels/Makefile
    team/bweschke/findme_followme/channels/chan_iax2.c
    team/bweschke/findme_followme/channels/chan_mgcp.c
    team/bweschke/findme_followme/channels/chan_sip.c
    team/bweschke/findme_followme/codecs/Makefile
    team/bweschke/findme_followme/formats/Makefile
    team/bweschke/findme_followme/formats/format_g723.c
    team/bweschke/findme_followme/funcs/Makefile
    team/bweschke/findme_followme/include/asterisk/channel.h
    team/bweschke/findme_followme/include/asterisk/manager.h
    team/bweschke/findme_followme/include/asterisk/pbx.h
    team/bweschke/findme_followme/include/asterisk/stringfields.h
    team/bweschke/findme_followme/manager.c
    team/bweschke/findme_followme/pbx.c
    team/bweschke/findme_followme/pbx/Makefile
    team/bweschke/findme_followme/pbx/pbx_dundi.c
    team/bweschke/findme_followme/pbx/pbx_spool.c
    team/bweschke/findme_followme/res/Makefile
    team/bweschke/findme_followme/res/res_clioriginate.c
    team/bweschke/findme_followme/utils.c

Propchange: team/bweschke/findme_followme/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/bweschke/findme_followme/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/bweschke/findme_followme/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Feb 11 15:37:54 2006
@@ -1,1 +1,1 @@
-/trunk:1-9553
+/trunk:1-9640

Modified: team/bweschke/findme_followme/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/apps/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/apps/Makefile (original)
+++ team/bweschke/findme_followme/apps/Makefile Sat Feb 11 15:37:54 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 app_followme.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,7 +61,7 @@
 #CFLAGS+=-DEXTENDED_ODBC_STORAGE
 # See doc/README.odbcstorage for more information
 
-all: $(APPS)
+all: $(MODS)
 
 clean:
 	rm -f *.so *.o look .depend
@@ -86,7 +73,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/bweschke/findme_followme/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/apps/app_page.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/apps/app_page.c (original)
+++ team/bweschke/findme_followme/apps/app_page.c Sat Feb 11 15:37:54 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/bweschke/findme_followme/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/cdr/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/cdr/Makefile (original)
+++ team/bweschke/findme_followme/cdr/Makefile Sat Feb 11 15:37:54 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

Modified: team/bweschke/findme_followme/channel.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/channel.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/channel.c (original)
+++ team/bweschke/findme_followme/channel.c Sat Feb 11 15:37:54 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/bweschke/findme_followme/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/channels/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/channels/Makefile (original)
+++ team/bweschke/findme_followme/channels/Makefile Sat Feb 11 15:37:54 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,10 @@
 # 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))
+
+# This should be renamed :)
+MODS:=$(filter-out chan_misdn_config.so,$(MODS))
 
 ifeq (${OSARCH},OpenBSD)
   PTLIB=-lpt_OpenBSD_x86_r
@@ -28,9 +31,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 +52,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 +109,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 +122,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,9 +152,7 @@
   PWLIBDIR=$(HOME)/pwlib
 endif
 
-#CFLAGS+=$(shell [ -f $(ZAPDIR)/libzap.a ] && echo "-I$(ZAPDIR)")
-
-all: depend $(CHANNEL_LIBS) 
+all: depend $(MODS) 
 
 clean:
 	rm -f *.so *.o .depend
@@ -245,8 +249,7 @@
 
 
 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/bweschke/findme_followme/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/channels/chan_iax2.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/channels/chan_iax2.c (original)
+++ team/bweschke/findme_followme/channels/chan_iax2.c Sat Feb 11 15:37:54 2006
@@ -9484,6 +9484,7 @@
 	ast_channel_unregister(&iax2_tech);
 	delete_users();
 	iax_provision_unload();
+	sched_context_destroy(sched);
 	return 0;
 }
 

Modified: team/bweschke/findme_followme/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/channels/chan_mgcp.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/channels/chan_mgcp.c (original)
+++ team/bweschke/findme_followme/channels/chan_mgcp.c Sat Feb 11 15:37:54 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/bweschke/findme_followme/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/channels/chan_sip.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/channels/chan_sip.c (original)
+++ team/bweschke/findme_followme/channels/chan_sip.c Sat Feb 11 15:37:54 2006
@@ -13289,6 +13289,7 @@
 	clear_realm_authentication(authl);
 	clear_sip_domains();
 	close(sipsock);
+	sched_context_destroy(sched);
 		
 	return 0;
 }

Modified: team/bweschke/findme_followme/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/codecs/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/codecs/Makefile (original)
+++ team/bweschke/findme_followme/codecs/Makefile Sat Feb 11 15:37:54 2006
@@ -3,7 +3,7 @@
 # 
 # Makefile for codec modules
 #
-# Copyright (C) 1999-2005, Digium
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -11,74 +11,57 @@
 # the GNU General Public License
 #
 
+MODS:=$(patsubst %.c,%.so,$(wildcard codec_*.c))
+
 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
 
-ifneq ($(wildcard g723.1/coder.c),)
-  MODG723=codec_g723_1.so
+ifeq ($(wildcard g723.1/coder.c),)
+  MODS:=$(filter-out codec_g723_1.so,$(MODS))
+else
   LIBG723=g723.1/libg723.a
 endif
 
-ifneq ($(wildcard g723.1b/coder2.c),)
-  MODG723+=codec_g723_1b.so
+ifeq ($(wildcard g723.1b/coder2.c),)
+  MODS:=$(filter-out codec_g723_1b.so,$(MODS))
+else
   LIBG723B=g723.1b/libg723b.a
 endif
 
-UI_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/speex.h)
-UIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/speex/speex.h)
-ULI_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/speex.h)
-ULIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/speex/speex.h)
-ifneq (${UI_SPEEX},)
-  MODSPEEX=codec_speex.so
-  LIBSPEEX+=-lspeex -lm
-endif
-ifneq (${UIS_SPEEX},)
-  MODSPEEX=codec_speex.so
-  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/include/speex
-  LIBSPEEX+=-lspeex -lm
-endif
-ifneq (${ULI_SPEEX},)
-  MODSPEEX=codec_speex.so
-  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include
-  LIBSPEEX=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
-  LIBSPEEX+=-lspeex -lm
-endif
-ifneq (${ULIS_SPEEX},)
-  MODSPEEX=codec_speex.so
-  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/speex
-  LIBSPEEX=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
-  LIBSPEEX+=-lspeex -lm
+SPEEX_PATH:=/usr/local/include /usr/include /usr/include/speex /usr/local/include/speex
+SPEEX_SYSTEM_HEADERS:=$(firstword $(wildcard $(SPEEX_PATH:%=$(CROSS_COMPILE_TARGET)%/speex.h)))
+ifeq (${SPEEX_SYSTEM_HEADERS},)
+  MODS:=$(filter-out codec_speex.so,$(MODS))
+else
+  CFLAGS+=-I$(subst /speex.h,,${SPEEX_SYSTEM_HEADERS})
+  LIBSPEEX=-lspeex -lm
 endif
 
-ifneq ($(wildcard ilbc/iLBC_decode.h),)
-  MODILBC=codec_ilbc.so
+ifeq ($(wildcard ilbc/iLBC_decode.h),)
+  MODS:=$(filter-out codec_ilbc.so,$(MODS))
+else
   LIBILBC=ilbc/libilbc.a
 endif
 
-
 LIBGSM_PATH:=/usr/local/include /usr/include
-LIBGSM_SYSTEM_HEADERS:=$(wildcard $(LIBGSM_PATH:%=$(CROSS_COMPILE_TARGET)%/gsm/gsm.h))
-ifneq (,$(LIBGSM_SYSTEM_HEADERS))
-LIBGSM=-lgsm
-LIBGSMT=
-CFLAGS+=-DUSE_EXTERNAL_GSM_LIB
+LIBGSM_SYSTEM_HEADERS:=$(firstword $(wildcard $(LIBGSM_PATH:%=$(CROSS_COMPILE_TARGET)%/gsm/gsm.h)))
+ifneq ($(LIBGSM_SYSTEM_HEADERS),)
+  LIBGSM=-lgsm
+  LIBGSMT=
+  CFLAGS+=-DUSE_EXTERNAL_GSM_LIB
 else
-LIBGSM=gsm/lib/libgsm.a
-LIBGSMT=$(LIBGSM)
-CFLAGS+=-I.
+  LIBGSM=gsm/lib/libgsm.a
+  LIBGSMT=$(LIBGSM)
+  CFLAGS+=-I.
 endif
 
 LIBLPC10=lpc10/liblpc10.a
 
-CODECS+=$(MODG723) $(MODSPEEX) $(MODILBC) codec_gsm.so codec_lpc10.so  \
-        codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
-	codec_g726.so
-
-all: depend $(CODECS)
+all: depend $(MODS)
 
 clean:
 	rm -f *.so *.o .depend
@@ -118,7 +101,7 @@
 codec_gsm.so: codec_gsm.o $(LIBGSMT) 
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBGSM)
 
-$(MODSPEEX): codec_speex.o
+codec_speex.so: codec_speex.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBSPEEX)
 
 codec_lpc10.so: codec_lpc10.o $(LIBLPC10)
@@ -132,7 +115,7 @@
 endif
 
 install: all
-	for x in $(CODECS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 uninstall:
 

Modified: team/bweschke/findme_followme/formats/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/formats/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/formats/Makefile (original)
+++ team/bweschke/findme_followme/formats/Makefile Sat Feb 11 15:37:54 2006
@@ -3,7 +3,7 @@
 # 
 # Makefile for file format modules
 #
-# Copyright (C) 1999-2005, Digium
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -11,33 +11,25 @@
 # the GNU General Public License
 #
 
-FORMAT_LIBS=format_gsm.so format_wav.so \
-	format_wav_gsm.so format_vox.so format_pcm.so format_g729.so \
-	format_pcm_alaw.so format_h263.so format_g726.so format_ilbc.so \
-	format_sln.so format_au.so format_h264.so
-FORMAT_LIBS+=format_jpeg.so
-
-#
-# G723 simple frame is deprecated
-#
-FORMAT_LIBS+=format_g723.so
+MODS:=$(patsubst %.c,%.so,$(wildcard format_*.c))
 
 #
 # OGG/Vorbis format
 #
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),)
-  FORMAT_LIBS+=format_ogg_vorbis.so
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),)
+  MODS:=$(filter-out format_ogg_vorbis.so,$(MODS))
 endif
 
 GSMLIB=../codecs/gsm/lib/libgsm.a
 
 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
-all: depend $(FORMAT_LIBS)
+
+all: depend $(MODS)
 
 clean:
 	rm -f *.so *.o .depend
@@ -56,7 +48,7 @@
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm
 
 install: all
-	for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 uninstall:
 

Modified: team/bweschke/findme_followme/formats/format_g723.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/formats/format_g723.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/formats/format_g723.c (original)
+++ team/bweschke/findme_followme/formats/format_g723.c Sat Feb 11 15:37:54 2006
@@ -44,9 +44,6 @@
 #include "asterisk/logger.h"
 #include "asterisk/sched.h"
 #include "asterisk/module.h"
-
-#include "../channels/adtranvofr.h"
-
 
 #define G723_MAX_SIZE 1024
 

Modified: team/bweschke/findme_followme/funcs/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/funcs/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/funcs/Makefile (original)
+++ team/bweschke/findme_followme/funcs/Makefile Sat Feb 11 15:37:54 2006
@@ -3,7 +3,7 @@
 # 
 # Makefile for dialplan functions
 #
-# Copyright (C) 2005 - 2006, Digium
+# Copyright (C) 2005-2006, Digium, Inc.
 #
 # Kevin P. Fleming <kpfleming at digium.com>
 #
@@ -13,15 +13,15 @@
 
 MODS:=$(patsubst %.c,%.so,$(wildcard func_*.c))
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
   MODS:=$(filter-out func_odbc.so,$(MODS))
 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
 
 all: $(MODS)

Modified: team/bweschke/findme_followme/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/include/asterisk/channel.h?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/include/asterisk/channel.h (original)
+++ team/bweschke/findme_followme/include/asterisk/channel.h Sat Feb 11 15:37:54 2006
@@ -481,6 +481,7 @@
 	oh.priority = priority; \
 	oh.cid_num = cid_num; \
 	oh.cid_name = cid_name; \
+	oh.account = account; \
 	oh.vars = vars; \
 	oh.parent_channel = NULL; \
 } 
@@ -491,6 +492,7 @@
 	int priority;
 	const char *cid_num;
 	const char *cid_name;
+	const char *account;
 	struct ast_variable *vars;
 	struct ast_channel *parent_channel;
 };

Modified: team/bweschke/findme_followme/include/asterisk/manager.h
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/include/asterisk/manager.h?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/include/asterisk/manager.h (original)
+++ team/bweschke/findme_followme/include/asterisk/manager.h Sat Feb 11 15:37:54 2006
@@ -56,8 +56,8 @@
 #define EVENT_FLAG_USER                 (1 << 6) /* Ability to read/set user info */
 
 /* Export manager structures */
-#define MAX_HEADERS 80
-#define MAX_LEN 256
+#define AST_MAX_MANHEADERS 80
+#define AST_MAX_MANHEADER_LEN 256
 
 struct eventqent {
 	struct eventqent *next;
@@ -88,7 +88,7 @@
 	/*! Authorization for writing */
 	int writeperm;
 	/*! Buffer */
-	char inbuf[MAX_LEN];
+	char inbuf[AST_MAX_MANHEADER_LEN];
 	int inlen;
 	int send_events;
 	/* Queued events that we've not had the ability to send yet */
@@ -101,7 +101,7 @@
 
 struct message {
 	int hdrcount;
-	char headers[MAX_HEADERS][MAX_LEN];
+	char headers[AST_MAX_MANHEADERS][AST_MAX_MANHEADER_LEN];
 };
 
 struct manager_action {

Modified: team/bweschke/findme_followme/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/include/asterisk/pbx.h?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/include/asterisk/pbx.h (original)
+++ team/bweschke/findme_followme/include/asterisk/pbx.h Sat Feb 11 15:37:54 2006
@@ -563,11 +563,11 @@
 
 /* Synchronously or asynchronously make an outbound call and send it to a
    particular extension */
-int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, struct ast_channel **locked_channel);
+int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel);
 
 /* Synchronously or asynchronously make an outbound call and send it to a
    particular application with given extension */
-int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, struct ast_channel **locked_channel);
+int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel);
 
 /* Functions for returning values from structures */
 const char *ast_get_context_name(struct ast_context *con);

Modified: team/bweschke/findme_followme/include/asterisk/stringfields.h
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/include/asterisk/stringfields.h?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/include/asterisk/stringfields.h (original)
+++ team/bweschke/findme_followme/include/asterisk/stringfields.h Sat Feb 11 15:37:54 2006
@@ -103,7 +103,7 @@
   \internal
   \brief A constant empty string used for fields that have no other value
 */
-extern const char *__ast_string_field_empty;
+extern const char __ast_string_field_empty[];
 
 /*!
   \internal

Modified: team/bweschke/findme_followme/manager.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/manager.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/manager.c (original)
+++ team/bweschke/findme_followme/manager.c Sat Feb 11 15:37:54 2006
@@ -66,16 +66,17 @@
 #include "asterisk/utils.h"
 
 struct fast_originate_helper {
-	char tech[256];
-	char data[256];
+	char tech[AST_MAX_MANHEADER_LEN];
+	char data[AST_MAX_MANHEADER_LEN];
 	int timeout;
-	char app[256];
-	char appdata[256];
-	char cid_name[256];
-	char cid_num[256];
-	char context[256];
-	char exten[256];
-	char idtext[256];
+	char app[AST_MAX_APP];
+	char appdata[AST_MAX_MANHEADER_LEN];
+	char cid_name[AST_MAX_MANHEADER_LEN];
+	char cid_num[AST_MAX_MANHEADER_LEN];
+	char context[AST_MAX_CONTEXT];
+	char exten[AST_MAX_EXTENSION];
+	char idtext[AST_MAX_MANHEADER_LEN];
+	char account[AST_MAX_ACCOUNT_CODE];
 	int priority;
 	struct ast_variable *vars;
 };
@@ -949,12 +950,12 @@
 		res = ast_pbx_outgoing_app(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->app, in->appdata, &reason, 1, 
 			!ast_strlen_zero(in->cid_num) ? in->cid_num : NULL, 
 			!ast_strlen_zero(in->cid_name) ? in->cid_name : NULL,
-			in->vars, &chan);
+			in->vars, in->account, &chan);
 	} else {
 		res = ast_pbx_outgoing_exten(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->context, in->exten, in->priority, &reason, 1, 
 			!ast_strlen_zero(in->cid_num) ? in->cid_num : NULL, 
 			!ast_strlen_zero(in->cid_name) ? in->cid_name : NULL,
-			in->vars, &chan);
+			in->vars, in->account, &chan);
 	}   
 	
 	/* Tell the manager what happened with the channel */
@@ -1056,12 +1057,6 @@
 		if (ast_strlen_zero(l))
 			l = NULL;
 	}
-	if (account) {
-		struct ast_variable *newvar;
-		newvar = ast_variable_new("CDR(accountcode|r)", account);
-		newvar->next = vars;
-		vars = newvar;
-	}
 	if (ast_true(async)) {
 		struct fast_originate_helper *fast = malloc(sizeof(struct fast_originate_helper));
 		if (!fast) {
@@ -1081,6 +1076,7 @@
 			fast->vars = vars;	
 			ast_copy_string(fast->context, context, sizeof(fast->context));
 			ast_copy_string(fast->exten, exten, sizeof(fast->exten));
+			ast_copy_string(fast->account, account, sizeof(fast->account));
 			fast->timeout = to;
 			fast->priority = pi;
 			pthread_attr_init(&attr);
@@ -1092,10 +1088,10 @@
 			}
 		}
 	} else if (!ast_strlen_zero(app)) {
-        	res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, NULL);
+        	res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL);
     	} else {
 		if (exten && context && pi)
-	        	res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, l, n, vars, NULL);
+	        	res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, l, n, vars, account, NULL);
 		else {
 			astman_send_error(s, m, "Originate with 'Exten' requires 'Context' and 'Priority'");
 			return 0;
@@ -1414,7 +1410,7 @@
 				if (process_message(s, &m))
 					break;
 				memset(&m, 0, sizeof(m));
-			} else if (m.hdrcount < MAX_HEADERS - 1)
+			} else if (m.hdrcount < AST_MAX_MANHEADERS - 1)
 				m.hdrcount++;
 		} else if (res < 0)
 			break;

Modified: team/bweschke/findme_followme/pbx.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/pbx.c?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/pbx.c (original)
+++ team/bweschke/findme_followme/pbx.c Sat Feb 11 15:37:54 2006
@@ -4649,7 +4649,7 @@
 	return 0;  /* success */
 }
 
-int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, struct ast_channel **channel)
+int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **channel)
 {
 	struct ast_channel *chan;
 	struct async_stat *as;
@@ -4666,7 +4666,7 @@
 				ast_mutex_lock(&chan->lock);
 		}
 		if (chan) {
-			if(chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
+			if (chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
 				ast_log(LOG_WARNING, "%s already has a call record??\n", chan->name);
 			} else {
 				chan->cdr = ast_cdr_alloc();   /* allocate a cdr for the channel */
@@ -4743,6 +4743,8 @@
 					ast_copy_string(chan->exten, "failed", sizeof(chan->exten));
 					chan->priority = 1;
 					ast_set_variables(chan, vars);
+					if (account)
+						ast_cdr_setaccount(chan, account);
 					ast_pbx_run(chan);	
 				} else 
 					ast_log(LOG_WARNING, "Can't allocate the channel structure, skipping execution of extension 'failed'\n");
@@ -4772,6 +4774,8 @@
 		as->priority = priority;
 		as->timeout = timeout;
 		ast_set_variables(chan, vars);
+		if (account)
+			ast_cdr_setaccount(chan, account);
 		pthread_attr_init(&attr);
 		pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 		if (ast_pthread_create(&as->p, &attr, async_wait, as)) {
@@ -4813,7 +4817,7 @@
 	return NULL;
 }
 
-int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, struct ast_channel **locked_channel)
+int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel)
 {
 	struct ast_channel *chan;
 	struct async_stat *as;
@@ -4821,9 +4825,10 @@
 	int res = -1, cdr_res = -1;
 	struct outgoing_helper oh;
 	pthread_attr_t attr;
-	
+
 	memset(&oh, 0, sizeof(oh));
-	oh.vars = vars;	
+	oh.vars = vars;
+	oh.account = account;	
 
 	if (locked_channel) 
 		*locked_channel = NULL;
@@ -4850,6 +4855,8 @@
 				ast_cdr_start(chan->cdr);
 			}
 			ast_set_variables(chan, vars);
+			if (account)
+				ast_cdr_setaccount(chan, account);
 			if (chan->_state == AST_STATE_UP) {
 				res = 0;
 				if (option_verbose > 3)
@@ -4929,6 +4936,8 @@
 			ast_copy_string(as->appdata,  appdata, sizeof(as->appdata));
 		as->timeout = timeout;
 		ast_set_variables(chan, vars);
+		if (account)
+			ast_cdr_setaccount(chan, account);
 		/* Start a new thread, and get something handling this channel. */
 		pthread_attr_init(&attr);
 		pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);

Modified: team/bweschke/findme_followme/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/pbx/Makefile?rev=9641&r1=9640&r2=9641&view=diff
==============================================================================
--- team/bweschke/findme_followme/pbx/Makefile (original)
+++ team/bweschke/findme_followme/pbx/Makefile Sat Feb 11 15:37:54 2006
@@ -3,7 +3,7 @@
 # 
 # Makefile for PBX modules
 #
-# Copyright (C) 1999-2005, Mark Spencer
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -11,13 +11,17 @@
 # the GNU General Public License
 #
 
-PBX_LIBS=pbx_config.so pbx_spool.so pbx_dundi.so pbx_loopback.so pbx_realtime.so \
-         pbx_ael.so
+MODS:=$(patsubst %.c,%.so,$(wildcard pbx_*.c))
 
-# Add GTK console if appropriate
-#PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so")
-# Add KDE Console if appropriate
-#PBX_LIBS+=$(shell [ "$$QTDIR" != "" ] && echo "pbx_kdeconsole.so")
+#GTK=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 2>/dev/null && echo "OK")
+ifeq (${GTK},)
+  MODS:=$(filter-out pbx_gtkconsole.so,$(MODS))
+endif
+
+#KDE=$(shell [ "$$QTDIR" != "" ] && echo "OK")
+ifeq (${GTK},)
+  MODS:=$(filter-out pbx_kdeconsole.so,$(MODS))
+endif
 
 GTK_FLAGS=`${CROSS_COMPILE_BIN}gtk-config --cflags gthread`
 GTK_LIBS=`${CROSS_COMPILE_BIN}gtk-config --libs gthread`
@@ -26,15 +30,15 @@
 KDE_LIBS=-L$(KDEDIR)/lib -L$(QTDIR)/lib -lqt -lkdecore -lkdeui
 
 ifeq (${OSARCH},CYGWIN)

[... 155 lines stripped ...]


More information about the asterisk-commits mailing list