[asterisk-commits] oej: branch oej/pinetree-1.4 r379425 - in /team/oej/pinetree-1.4: ./ apps/ bu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 18 02:11:24 CST 2013


Author: oej
Date: Fri Jan 18 02:10:58 2013
New Revision: 379425

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379425
Log:
Reset branch

Added:
    team/oej/pinetree-1.4/contrib/valgrind.supp
      - copied unchanged from r242969, branches/1.4/contrib/valgrind.supp
    team/oej/pinetree-1.4/doc/IAX2-security.pdf
      - copied unchanged from r242969, branches/1.4/doc/IAX2-security.pdf
    team/oej/pinetree-1.4/doc/IAX2-security.txt
      - copied unchanged from r242969, branches/1.4/doc/IAX2-security.txt
Removed:
    team/oej/pinetree-1.4/contrib/firmware/iax/iaxy.bin
Modified:
    team/oej/pinetree-1.4/   (props changed)
    team/oej/pinetree-1.4/Makefile
    team/oej/pinetree-1.4/Makefile.rules
    team/oej/pinetree-1.4/UPGRADE.txt
    team/oej/pinetree-1.4/apps/app_amd.c
    team/oej/pinetree-1.4/apps/app_chanisavail.c
    team/oej/pinetree-1.4/apps/app_chanspy.c
    team/oej/pinetree-1.4/apps/app_dial.c
    team/oej/pinetree-1.4/apps/app_directed_pickup.c
    team/oej/pinetree-1.4/apps/app_followme.c
    team/oej/pinetree-1.4/apps/app_meetme.c
    team/oej/pinetree-1.4/apps/app_mixmonitor.c
    team/oej/pinetree-1.4/apps/app_mp3.c
    team/oej/pinetree-1.4/apps/app_playback.c
    team/oej/pinetree-1.4/apps/app_queue.c
    team/oej/pinetree-1.4/apps/app_voicemail.c
    team/oej/pinetree-1.4/apps/app_waitforring.c
    team/oej/pinetree-1.4/apps/app_waitforsilence.c
    team/oej/pinetree-1.4/build_tools/cflags.xml
    team/oej/pinetree-1.4/build_tools/make_version_h
    team/oej/pinetree-1.4/build_tools/menuselect-deps.in
    team/oej/pinetree-1.4/build_tools/mkpkgconfig
    team/oej/pinetree-1.4/channels/busy_tone.h   (props changed)
    team/oej/pinetree-1.4/channels/chan_agent.c
    team/oej/pinetree-1.4/channels/chan_dahdi.c
    team/oej/pinetree-1.4/channels/chan_iax2.c
    team/oej/pinetree-1.4/channels/chan_local.c
    team/oej/pinetree-1.4/channels/chan_misdn.c
    team/oej/pinetree-1.4/channels/chan_sip.c
    team/oej/pinetree-1.4/channels/chan_vpb.cc
    team/oej/pinetree-1.4/channels/iax2-parser.c
    team/oej/pinetree-1.4/channels/iax2-parser.h
    team/oej/pinetree-1.4/channels/iax2.h
    team/oej/pinetree-1.4/channels/misdn/isdn_lib.c
    team/oej/pinetree-1.4/channels/misdn/isdn_lib_intern.h
    team/oej/pinetree-1.4/channels/misdn_config.c
    team/oej/pinetree-1.4/channels/ring_tone.h   (props changed)
    team/oej/pinetree-1.4/codecs/codec_dahdi.c
    team/oej/pinetree-1.4/codecs/codec_g726.c
    team/oej/pinetree-1.4/codecs/codec_ilbc.c
    team/oej/pinetree-1.4/configs/cdr_custom.conf.sample
    team/oej/pinetree-1.4/configs/extensions.conf.sample
    team/oej/pinetree-1.4/configs/iax.conf.sample
    team/oej/pinetree-1.4/configs/sip.conf.sample
    team/oej/pinetree-1.4/configure
    team/oej/pinetree-1.4/configure.ac
    team/oej/pinetree-1.4/contrib/init.d/rc.debian.asterisk
    team/oej/pinetree-1.4/contrib/init.d/rc.redhat.asterisk
    team/oej/pinetree-1.4/contrib/scripts/iax-friends.sql
    team/oej/pinetree-1.4/contrib/scripts/safe_asterisk
    team/oej/pinetree-1.4/doc/channelvariables.txt
    team/oej/pinetree-1.4/doc/externalivr.txt
    team/oej/pinetree-1.4/doc/imapstorage.txt
    team/oej/pinetree-1.4/doc/localchannel.txt
    team/oej/pinetree-1.4/doc/valgrind.txt
    team/oej/pinetree-1.4/formats/format_g723.c
    team/oej/pinetree-1.4/formats/format_g726.c
    team/oej/pinetree-1.4/formats/format_g729.c
    team/oej/pinetree-1.4/formats/format_gsm.c
    team/oej/pinetree-1.4/formats/format_h263.c
    team/oej/pinetree-1.4/formats/format_h264.c
    team/oej/pinetree-1.4/formats/format_ilbc.c
    team/oej/pinetree-1.4/formats/format_jpeg.c
    team/oej/pinetree-1.4/formats/format_ogg_vorbis.c
    team/oej/pinetree-1.4/formats/format_pcm.c
    team/oej/pinetree-1.4/formats/format_sln.c
    team/oej/pinetree-1.4/formats/format_vox.c
    team/oej/pinetree-1.4/formats/format_wav.c
    team/oej/pinetree-1.4/formats/format_wav_gsm.c
    team/oej/pinetree-1.4/funcs/func_audiohookinherit.c
    team/oej/pinetree-1.4/funcs/func_base64.c
    team/oej/pinetree-1.4/funcs/func_cdr.c
    team/oej/pinetree-1.4/funcs/func_groupcount.c
    team/oej/pinetree-1.4/funcs/func_math.c
    team/oej/pinetree-1.4/funcs/func_strings.c
    team/oej/pinetree-1.4/include/asterisk/acl.h
    team/oej/pinetree-1.4/include/asterisk/astobj2.h
    team/oej/pinetree-1.4/include/asterisk/autoconfig.h.in
    team/oej/pinetree-1.4/include/asterisk/cdr.h
    team/oej/pinetree-1.4/include/asterisk/channel.h
    team/oej/pinetree-1.4/include/asterisk/dsp.h
    team/oej/pinetree-1.4/include/asterisk/file.h
    team/oej/pinetree-1.4/include/asterisk/frame.h
    team/oej/pinetree-1.4/include/asterisk/linkedlists.h
    team/oej/pinetree-1.4/include/asterisk/lock.h
    team/oej/pinetree-1.4/include/asterisk/module.h
    team/oej/pinetree-1.4/include/asterisk/netsock.h
    team/oej/pinetree-1.4/include/asterisk/rtp.h
    team/oej/pinetree-1.4/include/asterisk/threadstorage.h
    team/oej/pinetree-1.4/include/asterisk/translate.h
    team/oej/pinetree-1.4/main/Makefile
    team/oej/pinetree-1.4/main/abstract_jb.c
    team/oej/pinetree-1.4/main/acl.c
    team/oej/pinetree-1.4/main/app.c
    team/oej/pinetree-1.4/main/asterisk.c
    team/oej/pinetree-1.4/main/astfd.c
    team/oej/pinetree-1.4/main/astobj2.c
    team/oej/pinetree-1.4/main/audiohook.c
    team/oej/pinetree-1.4/main/autoservice.c
    team/oej/pinetree-1.4/main/cdr.c
    team/oej/pinetree-1.4/main/channel.c
    team/oej/pinetree-1.4/main/config.c
    team/oej/pinetree-1.4/main/dsp.c
    team/oej/pinetree-1.4/main/editline/makelist.in   (props changed)
    team/oej/pinetree-1.4/main/file.c
    team/oej/pinetree-1.4/main/frame.c
    team/oej/pinetree-1.4/main/loader.c
    team/oej/pinetree-1.4/main/manager.c
    team/oej/pinetree-1.4/main/netsock.c
    team/oej/pinetree-1.4/main/pbx.c
    team/oej/pinetree-1.4/main/rtp.c
    team/oej/pinetree-1.4/main/say.c
    team/oej/pinetree-1.4/main/translate.c
    team/oej/pinetree-1.4/main/utils.c
    team/oej/pinetree-1.4/makeopts.in
    team/oej/pinetree-1.4/pbx/Makefile
    team/oej/pinetree-1.4/pbx/ael/ael_lex.c
    team/oej/pinetree-1.4/pbx/pbx_config.c
    team/oej/pinetree-1.4/pbx/pbx_spool.c
    team/oej/pinetree-1.4/res/res_agi.c
    team/oej/pinetree-1.4/res/res_features.c
    team/oej/pinetree-1.4/res/res_monitor.c
    team/oej/pinetree-1.4/res/res_musiconhold.c
    team/oej/pinetree-1.4/sounds/Makefile
    team/oej/pinetree-1.4/static-http/prototype.js
    team/oej/pinetree-1.4/utils/Makefile
    team/oej/pinetree-1.4/utils/astman.c

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

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

Propchange: team/oej/pinetree-1.4/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 18 02:10:58 2013
@@ -1,1 +1,1 @@
-/branches/1.4:1-215879
+/branches/1.4:1-243117

Modified: team/oej/pinetree-1.4/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/Makefile?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/Makefile (original)
+++ team/oej/pinetree-1.4/Makefile Fri Jan 18 02:10:58 2013
@@ -322,8 +322,9 @@
 	@echo "****"
 	@exit 1
 
-menuselect.makeopts: menuselect/menuselect menuselect-tree
-	menuselect/menuselect --check-deps menuselect.makeopts $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
+menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
+	menuselect/menuselect --check-deps $@
+	menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
 
 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
 	+ at echo "EMBED_LDSCRIPTS+="`$(SUBMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
@@ -335,8 +336,8 @@
 	+ at echo "EMBED_LIBS+="`$(SUBMAKE) -C $(@:-embed-libs=) SUBDIR=$(@:-embed-libs=) __embed_libs` >> makeopts.embed_rules
 
 $(MOD_SUBDIRS_MENUSELECT_TREE):
-	@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo
-	@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts
+	+@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo
+	+@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts
 
 makeopts.embed_rules: menuselect.makeopts
 	@echo "Generating embedded module rules ..."
@@ -354,10 +355,10 @@
 main: $(filter-out main,$(MOD_SUBDIRS))
 
 $(MOD_SUBDIRS):
-	@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+	+ at _ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
 $(OTHER_SUBDIRS):
-	@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+	+ at _ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
 defaults.h: makeopts
 	@build_tools/make_defaults_h > $@.tmp
@@ -410,7 +411,9 @@
 	rm -f build_tools/menuselect-deps
 
 datafiles: _all
-	if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ `$(ID) -u` = 0 ]; then \
+		CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \
+	fi
 # Should static HTTP be installed during make samples or even with its own target ala
 # webvoicemail?  There are portions here that *could* be customized but might also be
 # improved a lot.  I'll put it here for now.
@@ -613,9 +616,13 @@
 		echo ";maxcalls = 10 ; Maximum amount of calls allowed" ; \
 		echo ";maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit" ; \
 		echo ";cache_record_files = yes ; Cache recorded sound files to another directory during recording" ; \
-		echo ";record_cache_dir = /tmp ; Specify cache directory (used in cnjunction with cache_record_files)" ; \
+		echo ";record_cache_dir = /tmp ; Specify cache directory (used in conjunction with cache_record_files)" ; \
 		echo ";transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded" ; \
-		echo ";transmit_silence = yes ; Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated" ; \
+		echo ";transmit_silence = yes ; Transmit silence while a channel is in a waiting state, a recording only state, or when DTMF is" ; \
+		echo "                        ; being generated.  Note that the silence internally is generated in raw signed linear format." ; \
+		echo "                        ; This means that it must be transcoded into the native format of the channel before it can be sent" ; \
+		echo "                        ; to the device.  It is for this reason that this is optional, as it may result in requiring a" ; \
+		echo "                        ; temporary codec translation path for a channel that may not otherwise require one." ; \
 		echo ";transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly" ; \
 		echo ";runuser = asterisk ; The user to run as" ; \
 		echo ";rungroup = asterisk ; The group to run as" ; \
@@ -746,11 +753,11 @@
 
 gmenuconfig: gmenuselect
 
-menuselect: menuselect/menuselect menuselect-tree
-	- at menuselect/menuselect menuselect.makeopts $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
-
-gmenuselect: menuselect/gmenuselect menuselect-tree
-	- at menuselect/gmenuselect menuselect.makeopts $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
+menuselect: menuselect/menuselect menuselect-tree menuselect.makeopts
+	- at menuselect/menuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
+
+gmenuselect: menuselect/gmenuselect menuselect-tree menuselect.makeopts
+	- at menuselect/gmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
 	@CC="$(HOST_CC)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
@@ -773,6 +780,29 @@
 	@cat sounds/sounds.xml >> $@
 	@echo "</menu>" >> $@
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell menuselect.makeopts installdirs _clean
+.PHONY: menuselect
+.PHONY: main
+.PHONY: sounds
+.PHONY: clean
+.PHONY: dist-clean
+.PHONY: distclean
+.PHONY: all
+.PHONY: prereqs
+.PHONY: cleantest
+.PHONY: uninstall
+.PHONY: _uninstall
+.PHONY: uninstall-all
+.PHONY: dont-optimize
+.PHONY: badshell
+.PHONY: installdirs
+.PHONY: _clean
+.PHONY: $(SUBDIRS_INSTALL)
+.PHONY: $(SUBDIRS_DIST_CLEAN)
+.PHONY: $(SUBDIRS_CLEAN)
+.PHONY: $(SUBDIRS_UNINSTALL)
+.PHONY: $(SUBDIRS)
+.PHONY: $(MOD_SUBDIRS_EMBED_LDSCRIPT)
+.PHONY: $(MOD_SUBDIRS_EMBED_LDFLAGS)
+.PHONY: $(MOD_SUBDIRS_EMBED_LIBS)
 
 FORCE:

Modified: team/oej/pinetree-1.4/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/Makefile.rules?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/Makefile.rules (original)
+++ team/oej/pinetree-1.4/Makefile.rules Fri Jan 18 02:10:58 2013
@@ -39,6 +39,8 @@
 
 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
     _ASTCFLAGS+=$(OPTIMIZE)
+else
+    _ASTCFLAGS+=-O0
 endif
 
 # shortcuts for common combinations of flags; these must be recursively expanded so that

Modified: team/oej/pinetree-1.4/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/UPGRADE.txt?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/UPGRADE.txt (original)
+++ team/oej/pinetree-1.4/UPGRADE.txt Fri Jan 18 02:10:58 2013
@@ -5,6 +5,20 @@
 === UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
 === UPGRADE.txt     -- Upgrade info for 1.2 to 1.4
 =========================================================
+
+IAX2:
+
+* The firmware for the IAXy has been removed from Asterisk.  It can be
+  downloaded from http://downloads.digium.com/pub/iaxy/.  To have Asterisk
+  install the firmware into its proper location, place the firmware in the
+  contrib/firmware/iax/ directory in the Asterisk source tree before running
+  "make install".
+
+* There have been some changes to the IAX2 protocol to address the security
+  concerns documented in the security advisory AST-2009-006.  Please see the
+  IAX2 security document, doc/IAX2-security.pdf, for information regarding
+  backwards compatibility with versions of Asterisk that do not contain these
+  changes to IAX2.
 
 Build Process (configure script):
 

Modified: team/oej/pinetree-1.4/apps/app_amd.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_amd.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_amd.c (original)
+++ team/oej/pinetree-1.4/apps/app_amd.c Fri Jan 18 02:10:58 2013
@@ -209,6 +209,7 @@
 			if (option_debug)
 				ast_log(LOG_DEBUG, "Got hangup\n");
 			strcpy(amdStatus, "HANGUP");
+			res = 1;
 			break;
 		}
 

Modified: team/oej/pinetree-1.4/apps/app_chanisavail.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_chanisavail.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_chanisavail.c (original)
+++ team/oej/pinetree-1.4/apps/app_chanisavail.c Fri Jan 18 02:10:58 2013
@@ -55,7 +55,12 @@
 static char *descrip = 
 "  ChanIsAvail(Technology/resource[&Technology2/resource2...][|options]): \n"
 "This application will check to see if any of the specified channels are\n"
-"available. The following variables will be set by this application:\n"
+"available. Note that the AVAILSTATUS variable is used for both device state\n"
+"and cause code. It is therefore possible for it to give a value that may\n"
+"indicate a device is available when it is not. It is suggested that the\n"
+"AVAILORIGCHAN variable is used instead to see whether a device is available\n"
+"or not.\n"
+"The following variables will be set by this application:\n"
 "  ${AVAILCHAN}     - the name of the available channel, if one exists\n"
 "  ${AVAILORIGCHAN} - the canonical channel name that was used to create the channel\n"
 "  ${AVAILSTATUS}   - the status code for the available channel\n"

Modified: team/oej/pinetree-1.4/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_chanspy.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_chanspy.c (original)
+++ team/oej/pinetree-1.4/apps/app_chanspy.c Fri Jan 18 02:10:58 2013
@@ -77,7 +77,7 @@
 "  Options:\n"
 "    b             - Only spy on channels involved in a bridged call.\n"
 "    g(grp)        - Match only channels where their ${SPYGROUP} variable is set to\n"
-"                    contain 'grp' in an optional : delimited list.\n"
+"                    contain 'grp'.\n"
 "    q             - Don't play a beep when beginning to spy on a channel, or speak the\n"
 "                    selected channel name.\n"
 "    r[(basename)] - Record the session to the monitor spool directory. An\n"
@@ -105,7 +105,7 @@
 "  Options:\n"
 "    b             - Only spy on channels involved in a bridged call.\n"
 "    g(grp)        - Match only channels where their ${SPYGROUP} variable is set to\n"
-"                    contain 'grp' in an optional : delimited list.\n"
+"                    contain 'grp'.\n"
 "    q             - Don't play a beep when beginning to spy on a channel, or speak the\n"
 "                    selected channel name.\n"
 "    r[(basename)] - Record the session to the monitor spool directory. An\n"
@@ -250,9 +250,10 @@
 	ast_channel_unlock(chan);
 
 	ast_mutex_lock(&spyee_chanspy_ds->lock);
-	if (spyee_chanspy_ds->chan) {
-		spyee = spyee_chanspy_ds->chan;
-		ast_channel_lock(spyee);
+	while ((spyee = spyee_chanspy_ds->chan) && ast_channel_trylock(spyee)) {
+		/* avoid a deadlock here, just in case spyee is masqueraded and
+		 * chanspy_ds_chan_fixup() is called with the channel locked */
+		DEADLOCK_AVOIDANCE(&spyee_chanspy_ds->lock);
 	}
 	ast_mutex_unlock(&spyee_chanspy_ds->lock);
 

Modified: team/oej/pinetree-1.4/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_dial.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_dial.c (original)
+++ team/oej/pinetree-1.4/apps/app_dial.c Fri Jan 18 02:10:58 2013
@@ -171,9 +171,12 @@
 "           You cannot use any additional action post answer options in conjunction\n"
 "           with this option. Also, pbx services are not run on the peer (called) channel,\n"
 "           so you will not be able to set timeouts via the TIMEOUT() function in this macro.\n"
-"    n    - This option is a modifier for the screen/privacy mode. It specifies\n"
-"           that no introductions are to be saved in the priv-callerintros\n"
-"           directory.\n"
+"    n([x]) - This option is a modifier for the screen/privacy mode. It specifies\n"
+"             that no introductions are to be saved in the priv-callerintros\n"
+"             directory.\n"
+"             Specified without an arg, or with 0, the introduction is saved after\n"
+"             an unanswered call originating from the same CallerID. With\n"
+"             a 1 specified, the introduction is always deleted and rerequested.\n"
 "    N    - This option is a modifier for the screen/privacy mode. It specifies\n"
 "           that if callerID is present, do not screen the call.\n"
 "    o    - Specify that the CallerID that was present on the *calling* channel\n"
@@ -271,6 +274,7 @@
 	OPT_ARG_PRIVACY,
 	OPT_ARG_DURATION_STOP,
 	OPT_ARG_OPERMODE,
+	OPT_ARG_SCREEN_NOINTRO,
 	/* note: this entry _MUST_ be the last one in the enum */
 	OPT_ARG_ARRAY_SIZE,
 } dial_exec_option_args;
@@ -292,7 +296,7 @@
 	AST_APP_OPTION_ARG('L', OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
 	AST_APP_OPTION_ARG('m', OPT_MUSICBACK, OPT_ARG_MUSICBACK),
 	AST_APP_OPTION_ARG('M', OPT_CALLEE_MACRO, OPT_ARG_CALLEE_MACRO),
-	AST_APP_OPTION('n', OPT_SCREEN_NOINTRO),
+	AST_APP_OPTION_ARG('n', OPT_SCREEN_NOINTRO, OPT_ARG_SCREEN_NOINTRO),
 	AST_APP_OPTION('N', OPT_SCREEN_NOCLID),
 	AST_APP_OPTION('o', OPT_ORIGINAL_CLID),
 	AST_APP_OPTION_ARG('O', OPT_OPERMODE,OPT_ARG_OPERMODE),
@@ -308,7 +312,8 @@
 
 #define CAN_EARLY_BRIDGE(flags,chan,peer) (!ast_test_flag(flags, OPT_CALLEE_HANGUP | \
 	OPT_CALLER_HANGUP | OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER | \
-	OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK) && \
+	OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK |  \
+	OPT_CALLER_PARK | OPT_ANNOUNCE | OPT_CALLEE_MACRO) && \
 	!chan->audiohooks && !peer->audiohooks)
 
 /* We define a custom "local user" structure because we
@@ -533,7 +538,9 @@
 					ast_clear_flag(o, DIAL_STILLGOING);	
 					HANDLE_CAUSE(cause, in);
 				} else {
-					ast_rtp_make_compatible(c, in, single);
+					if (CAN_EARLY_BRIDGE(peerflags, c, in)) {
+						ast_rtp_make_compatible(c, in, single);
+					}
 					if (c->cid.cid_num)
 						free(c->cid.cid_num);
 					c->cid.cid_num = NULL;
@@ -654,8 +661,13 @@
 					/* Setup early media if appropriate */
 					if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
 						ast_rtp_early_bridge(in, c);
-					if (!ast_test_flag(outgoing, OPT_RINGBACK))
-						ast_indicate(in, AST_CONTROL_PROGRESS);
+					if (!ast_test_flag(outgoing, OPT_RINGBACK)) {
+							if (single || (!single && !(*sentringing))) {
+							/* want progress to go through if it's a single legged call or it's a
+							 * branched call and ringing has not been sent */
+								ast_indicate(in, AST_CONTROL_PROGRESS);
+							}
+					}
 					break;
 				case AST_CONTROL_VIDUPDATE:
 					if (option_verbose > 2)
@@ -906,6 +918,7 @@
 	char privcid[256];
 	char *parse;
 	int opermode = 0;
+	int delprivintro = 0;
 	AST_DECLARE_APP_ARGS(args,
 			     AST_APP_ARG(peers);
 			     AST_APP_ARG(timeout);
@@ -946,6 +959,17 @@
 		ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
 		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 		goto done;
+	}
+
+	if (ast_test_flag(&opts, OPT_SCREEN_NOINTRO)) {
+		if (!ast_strlen_zero(opt_args[OPT_ARG_SCREEN_NOINTRO])) {
+			int mode = atoi(opt_args[OPT_ARG_SCREEN_NOINTRO]);
+			if (mode < 0 || mode > 1) {
+				ast_log(LOG_WARNING, "Unknown argument %d specified to n option, ignoring\n", mode);
+			} else {
+				delprivintro = mode;
+			}
+		}
 	}
 
 	if (ast_test_flag(&opts, OPT_OPERMODE)) {
@@ -1020,10 +1044,10 @@
 		warning_sound = S_OR(var, "timeleft");
 		
 		var = pbx_builtin_getvar_helper(chan,"LIMIT_TIMEOUT_FILE");
-		end_sound = S_OR(var, NULL);	/* XXX not much of a point in doing this! */
+		end_sound = S_OR(var, "");
 		
 		var = pbx_builtin_getvar_helper(chan,"LIMIT_CONNECT_FILE");
-		start_sound = S_OR(var, NULL);	/* XXX not much of a point in doing this! */
+		start_sound = S_OR(var, "");
 
 		/* undo effect of S(x) in case they are both used */
 		calldurationlimit = -1;
@@ -1152,11 +1176,7 @@
 										   conflicts by naming the privintro file */
 				if (res == -1) {
 					/* Delete the file regardless since they hung up during recording */
-                                        ast_filedelete(privintro, NULL);
-                                        if( ast_fileexists(privintro,NULL,NULL ) > 0 )
-                                                ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
-                                        else if (option_verbose > 2)
-                                                ast_verbose( VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+					delprivintro = 1;
 					goto out;
 				}
                                 if( !ast_streamfile(chan, "vm-dialout", chan->language) )
@@ -1176,7 +1196,7 @@
 		outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
 	}
 	    
-	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING);
+	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING | OPT_ANNOUNCE | OPT_CALLEE_MACRO);
 
 	/* loop through the list of dial destinations */
 	rest = args.peers;
@@ -1224,6 +1244,7 @@
 			datastore->inheritance = DATASTORE_INHERIT_FOREVER;
 
 			if (!(dialed_interfaces = ast_calloc(1, sizeof(*dialed_interfaces)))) {
+				ast_channel_datastore_free(datastore);
 				free(tmp);
 				goto out;
 			}
@@ -1280,11 +1301,13 @@
 			continue;
 		}
 
-				pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
+		pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
 
 		/* Setup outgoing SDP to match incoming one */
-		ast_rtp_make_compatible(tmp->chan, chan, !outgoing && !rest);
-		
+		if (CAN_EARLY_BRIDGE(peerflags, chan, tmp->chan)) {
+			ast_rtp_make_compatible(tmp->chan, chan, !outgoing && !rest);
+		}
+
 		/* Inherit specially named variables from parent channel */
 		ast_channel_inherit_variables(chan, tmp->chan);
 		ast_channel_datastore_inherit(chan, tmp->chan);
@@ -1608,32 +1631,77 @@
 			/* if the intro is NOCALLERID, then there's no reason to leave it on disk, it'll 
 			   just clog things up, and it's not useful information, not being tied to a CID */
 			if( strncmp(privcid,"NOCALLERID",10) == 0 || ast_test_flag(&opts, OPT_SCREEN_NOINTRO) ) {
-				ast_filedelete(privintro, NULL);
-				if( ast_fileexists(privintro, NULL, NULL ) > 0 )
-					ast_log(LOG_NOTICE, "privacy: ast_filedelete didn't do its job on %s\n", privintro);
-				else if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+				delprivintro = 1;
 			}
 		}
 		if (!ast_test_flag(&opts, OPT_ANNOUNCE) || ast_strlen_zero(opt_args[OPT_ARG_ANNOUNCE])) {
 			res = 0;
 		} else {
 			int digit = 0;
-			/* Start autoservice on the other chan */
-			res = ast_autoservice_start(chan);
-			/* Now Stream the File */
-			if (!res)
-				res = ast_streamfile(peer, opt_args[OPT_ARG_ANNOUNCE], peer->language);
-			if (!res) {
-				digit = ast_waitstream(peer, AST_DIGIT_ANY); 
-			}
-			/* Ok, done. stop autoservice */
-			res = ast_autoservice_stop(chan);
-			if (digit > 0 && !res)
-				res = ast_senddigit(chan, digit); 
-			else
-				res = digit;
-
+			struct ast_channel *chans[2];
+			struct ast_channel *active_chan;
+
+			chans[0] = chan;
+			chans[1] = peer;
+
+			/* we need to stream the announcment while monitoring the caller for a hangup */
+
+			/* stream the file */
+			res = ast_streamfile(peer, opt_args[OPT_ARG_ANNOUNCE], peer->language);
+			if (res) {
+				res = 0;
+				ast_log(LOG_ERROR, "error streaming file '%s' to callee\n", opt_args[OPT_ARG_ANNOUNCE]);
+			}
+
+			ast_set_flag(peer, AST_FLAG_END_DTMF_ONLY);
+			while (peer->stream) {
+				int ms;
+
+				ms = ast_sched_wait(peer->sched);
+
+				if (ms < 0 && !peer->timingfunc) {
+					ast_stopstream(peer);
+					break;
+				}
+				if (ms < 0)
+					ms = 1000;
+
+				active_chan = ast_waitfor_n(chans, 2, &ms);
+				if (active_chan) {
+					struct ast_frame *fr = ast_read(active_chan);
+					if (!fr) {
+						ast_hangup(peer);
+						res = -1;
+						goto done;
+					}
+					switch(fr->frametype) {
+						case AST_FRAME_DTMF_END:
+							digit = fr->subclass;
+							if (active_chan == peer && strchr(AST_DIGIT_ANY, res)) {
+								ast_stopstream(peer);
+								res = ast_senddigit(chan, digit);
+							}
+							break;
+						case AST_FRAME_CONTROL:
+							switch (fr->subclass) {
+								case AST_CONTROL_HANGUP:
+									ast_frfree(fr);
+									ast_hangup(peer);
+									res = -1;
+									goto done;
+								default:
+									break;
+							}
+							break;
+						default:
+							/* Ignore all others */
+							break;
+					}
+					ast_frfree(fr);
+				}
+				ast_sched_runq(peer->sched);
+			}
+			ast_clear_flag(peer, AST_FLAG_END_DTMF_ONLY);
 		}
 
 		if (chan && peer && ast_test_flag(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) {
@@ -1817,6 +1885,15 @@
 		sentringing = 0;
 		ast_indicate(chan, -1);
 	}
+	if (delprivintro) {
+		ast_filedelete(privintro, NULL);
+		if(ast_fileexists(privintro, NULL, NULL) > 0) {
+			ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
+		} else if (option_verbose > 2) {
+			ast_verbose(VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+		}
+	}
+
 	ast_rtp_early_bridge(chan, NULL);
 	hanguptree(outgoing, NULL);
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);

Modified: team/oej/pinetree-1.4/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_directed_pickup.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_directed_pickup.c (original)
+++ team/oej/pinetree-1.4/apps/app_directed_pickup.c Fri Jan 18 02:10:58 2013
@@ -98,7 +98,7 @@
 	while ((target = ast_channel_walk_locked(target))) {
 		if ((!strcasecmp(target->macroexten, exten) || !strcasecmp(target->exten, exten)) &&
 		    !strcasecmp(target->dialcontext, context) &&
-		    can_pickup(target)) {
+		    (chan != target) && can_pickup(target)) {
 			res = pickup_do(chan, target);
 			ast_channel_unlock(target);
 			break;

Modified: team/oej/pinetree-1.4/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_followme.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_followme.c (original)
+++ team/oej/pinetree-1.4/apps/app_followme.c Fri Jan 18 02:10:58 2013
@@ -831,6 +831,10 @@
 			if (outbound) {
 				ast_set_callerid(outbound, caller->cid.cid_num, caller->cid.cid_name, caller->cid.cid_num);
 				ast_channel_inherit_variables(tpargs->chan, outbound);
+				ast_channel_datastore_inherit(tpargs->chan, outbound);
+				ast_string_field_set(outbound, language, tpargs->chan->language);
+				ast_string_field_set(outbound, accountcode, tpargs->chan->accountcode);
+				ast_string_field_set(outbound, musicclass, tpargs->chan->musicclass);
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "calling %s\n", dialarg);
 				if (!ast_call(outbound,dialarg,0)) {

Modified: team/oej/pinetree-1.4/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinetree-1.4/apps/app_meetme.c?view=diff&rev=379425&r1=379424&r2=379425
==============================================================================
--- team/oej/pinetree-1.4/apps/app_meetme.c (original)
+++ team/oej/pinetree-1.4/apps/app_meetme.c Fri Jan 18 02:10:58 2013
@@ -319,6 +319,9 @@
 #define MAX_CONFNUM 80
 #define MAX_PIN     80
 
+/* Enough space for "<conference #>,<pin>,<admin pin>" followed by a 0 byte. */
+#define MAX_SETTINGS (MAX_CONFNUM + MAX_PIN + MAX_PIN + 3)
+
 enum announcetypes {
 	CONF_HASJOIN,
 	CONF_HASLEFT
@@ -1489,6 +1492,35 @@
 	return (chan->_state == AST_STATE_UP);
 }
 
+static void send_talking_event(struct ast_channel *chan, struct ast_conference *conf, struct ast_conf_user *user, int talking)
+{
+	manager_event(EVENT_FLAG_CALL, "MeetmeTalking",
+	      "Channel: %s\r\n"
+	      "Uniqueid: %s\r\n"
+	      "Meetme: %s\r\n"
+	      "Usernum: %d\r\n"
+	      "Status: %s\r\n",
+	      chan->name, chan->uniqueid, conf->confno, user->user_no, talking ? "on" : "off");
+}
+
+static void set_user_talking(struct ast_channel *chan, struct ast_conference *conf, struct ast_conf_user *user, int talking, int monitor)
+{
+	int last_talking = user->talking;
+	if (last_talking == talking)
+		return;
+
+	user->talking = talking;
+
+	if (monitor) {
+		/* Check if talking state changed. Take care of -1 which means unmonitored */
+		int was_talking = (last_talking > 0);
+		int now_talking = (talking > 0);
+		if (was_talking != now_talking) {
+			send_talking_event(chan, conf, user, now_talking);
+		}
+	}
+}
+
 static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int confflags, char *optargs[])
 {
 	struct ast_conf_user *user = NULL;
@@ -1504,7 +1536,7 @@
 	int res;
 	int retryzap;
 	int origfd;
-	int musiconhold = 0;
+	int musiconhold = 0, mohtempstopped = 0;
 	int firstpass = 0;
 	int lastmarked = 0;
 	int currentmarked = 0;
@@ -1530,6 +1562,7 @@
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 	int setusercount = 0;
+	int confsilence = 0, totalsilence = 0;
 
 	if (!(user = ast_calloc(1, sizeof(*user))))
 		return ret;
@@ -1835,6 +1868,11 @@
 
 	conf_flush(fd, chan);
 
+	if (!(dsp = ast_dsp_new())) {
+		ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
+		res = -1;
+	}
+
 	if (confflags & CONFFLAG_AGI) {
 		/* Get name of AGI file to run from $(MEETME_AGI_BACKGROUND)
 		   or use default filename of conf-background.agi */
@@ -1868,10 +1906,6 @@
 			x = 1;
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}	
-		if (confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER) && !(dsp = ast_dsp_new())) {
-			ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
-			res = -1;
-		}
 		for(;;) {
 			int menu_was_active = 0;
 
@@ -1991,6 +2025,11 @@
 					break;
 				}
 
+				/* Indicate user is not talking anymore - change him to unmonitored state */
+				if ((confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER))) {
+					set_user_talking(chan, conf, user, -1, confflags & CONFFLAG_MONITORTALKER);
+				}
+
 				manager_event(EVENT_FLAG_CALL, "MeetmeMute", 
 						"Channel: %s\r\n"
 						"Uniqueid: %s\r\n"
@@ -2065,33 +2104,15 @@
 						ast_frame_adjust_volume(f, user->talk.actual);
 
 					if (confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER)) {
-						int totalsilence;
-
 						if (user->talking == -1)
 							user->talking = 0;
 
 						res = ast_dsp_silence(dsp, f, &totalsilence);
-						if (!user->talking && totalsilence < MEETME_DELAYDETECTTALK) {
-							user->talking = 1;
-							if (confflags & CONFFLAG_MONITORTALKER)
-								manager_event(EVENT_FLAG_CALL, "MeetmeTalking",
-								      "Channel: %s\r\n"
-								      "Uniqueid: %s\r\n"
-								      "Meetme: %s\r\n"
-								      "Usernum: %d\r\n"
-								      "Status: on\r\n",
-								      chan->name, chan->uniqueid, conf->confno, user->user_no);
+						if (totalsilence < MEETME_DELAYDETECTTALK) {
+							set_user_talking(chan, conf, user, 1, confflags & CONFFLAG_MONITORTALKER);
 						}
-						if (user->talking && totalsilence > MEETME_DELAYDETECTENDTALK) {
-							user->talking = 0;
-							if (confflags & CONFFLAG_MONITORTALKER)
-								manager_event(EVENT_FLAG_CALL, "MeetmeTalking",
-								      "Channel: %s\r\n"
-								      "Uniqueid: %s\r\n"
-								      "Meetme: %s\r\n"
-								      "Usernum: %d\r\n"
-								      "Status: off\r\n",
-								      chan->name, chan->uniqueid, conf->confno, user->user_no);
+						if (totalsilence > MEETME_DELAYDETECTENDTALK) {
+							set_user_talking(chan, conf, user, 0, confflags & CONFFLAG_MONITORTALKER);
 						}
 					}
 					if (using_pseudo) {
@@ -2262,8 +2283,9 @@
 							}
 						}
 					}
-					if (musiconhold)
+					if (musiconhold) {
 			   			ast_moh_start(chan, NULL, NULL);
+					}
 
 					if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
@@ -2338,10 +2360,14 @@
 							}
 						}
 						if (conf->transframe[index]) {
- 							if ((conf->transframe[index]->frametype != AST_FRAME_NULL) &&
+							if ((conf->transframe[index]->frametype != AST_FRAME_NULL) &&
 							    can_write(chan, confflags)) {
 								struct ast_frame *cur;
-								
+								if (musiconhold && !ast_dsp_silence(dsp, conf->transframe[index], &confsilence) && confsilence < MEETME_DELAYDETECTTALK) {
+									ast_moh_stop(chan);
+									mohtempstopped = 1;
+								}
+
 								/* the translator may have returned a list of frames, so
 								   write each one onto the channel
 								*/
@@ -2351,6 +2377,10 @@
 										break;
 									}
 								}
+								if (musiconhold && mohtempstopped && confsilence > MEETME_DELAYDETECTENDTALK) {
+									mohtempstopped = 0;
+									ast_moh_start(chan, NULL, NULL);
+								}
 							}
 						} else {
 							ast_mutex_unlock(&conf->listenlock);
@@ -2358,11 +2388,19 @@
 						}
 						ast_mutex_unlock(&conf->listenlock);
 					} else {
-bailoutandtrynormal:					
+bailoutandtrynormal:
+						if (musiconhold && !ast_dsp_silence(dsp, &fr, &confsilence) && confsilence < MEETME_DELAYDETECTTALK) {
+							ast_moh_stop(chan);
+							mohtempstopped = 1;
+						}
 						if (user->listen.actual)
 							ast_frame_adjust_volume(&fr, user->listen.actual);
 						if (can_write(chan, confflags) && ast_write(chan, &fr) < 0) {
 							ast_log(LOG_WARNING, "Unable to write frame to channel %s\n", chan->name);
+						}
+						if (musiconhold && mohtempstopped && confsilence > MEETME_DELAYDETECTENDTALK) {
+							mohtempstopped = 0;
+							ast_moh_start(chan, NULL, NULL);
 						}
 					}
 				} else 
@@ -2372,8 +2410,9 @@
 		}
 	}
 
-	if (musiconhold)
+	if (musiconhold) {
 		ast_moh_stop(chan);
+	}
 	
 	if (using_pseudo)
 		close(fd);
@@ -2527,7 +2566,6 @@
 	struct ast_config *cfg;
 	struct ast_variable *var;
 	struct ast_conference *cnf;
-	char *parse;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(confno);
 		AST_APP_ARG(pin);
@@ -2566,13 +2604,15 @@
 				ast_log(LOG_WARNING, "No %s file :(\n", CONFIG_FILE_NAME);
 				return NULL;
 			}
+
 			for (var = ast_variable_browse(cfg, "rooms"); var; var = var->next) {
+				char parse[MAX_SETTINGS];
+
 				if (strcasecmp(var->name, "conf"))
 					continue;
-				
-				if (!(parse = ast_strdupa(var->value)))
-					return NULL;
-				
+
+				ast_copy_string(parse, var->value, sizeof(parse));
+
 				AST_NONSTANDARD_APP_ARGS(args, parse, ',');
 				if (!strcasecmp(args.confno, confno)) {
 					/* Bingo it's a valid conference */
@@ -2738,33 +2778,32 @@
 				if (cfg) {
 					var = ast_variable_browse(cfg, "rooms");
 					while (var) {
+						char parse[MAX_SETTINGS], *stringp = parse, *confno_tmp;
 						if (!strcasecmp(var->name, "conf")) {
-							char *stringp = ast_strdupa(var->value);
-							if (stringp) {
-								char *confno_tmp = strsep(&stringp, "|,");
-								int found = 0;
-								if (!dynamic) {
-									/* For static:  run through the list and see if this conference is empty */
-									AST_LIST_LOCK(&confs);
-									AST_LIST_TRAVERSE(&confs, cnf, list) {
-										if (!strcmp(confno_tmp, cnf->confno)) {
-											/* The conference exists, therefore it's not empty */

[... 15145 lines stripped ...]



More information about the asterisk-commits mailing list