[svn-commits] oej: branch oej/adb-appleraision-1.8-mark-2 r369423 - in /team/oej/adb-appler...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 27 03:09:23 CDT 2012


Author: oej
Date: Wed Jun 27 03:09:18 2012
New Revision: 369423

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369423
Log:
Cleaning up

Added:
    team/oej/adb-appleraision-1.8-mark-2/build_tools/find_missing_support_level
      - copied unchanged from r369390, branches/1.8/build_tools/find_missing_support_level
    team/oej/adb-appleraision-1.8-mark-2/main/adsi.c
      - copied unchanged from r369390, branches/1.8/main/adsi.c
Removed:
    team/oej/adb-appleraision-1.8-mark-2/res/res_adsi.exports.in
Modified:
    team/oej/adb-appleraision-1.8-mark-2/   (props changed)
    team/oej/adb-appleraision-1.8-mark-2/Makefile
    team/oej/adb-appleraision-1.8-mark-2/UPGRADE.txt
    team/oej/adb-appleraision-1.8-mark-2/addons/chan_ooh323.c
    team/oej/adb-appleraision-1.8-mark-2/addons/format_mp3.c
    team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooCalls.c
    team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooq931.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_dial.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_directory.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_meetme.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_minivm.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_page.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_queue.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_record.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_stack.c
    team/oej/adb-appleraision-1.8-mark-2/apps/app_voicemail.c
    team/oej/adb-appleraision-1.8-mark-2/build_tools/make_version
    team/oej/adb-appleraision-1.8-mark-2/channels/chan_agent.c
    team/oej/adb-appleraision-1.8-mark-2/channels/chan_dahdi.c
    team/oej/adb-appleraision-1.8-mark-2/channels/chan_iax2.c
    team/oej/adb-appleraision-1.8-mark-2/channels/chan_misdn.c
    team/oej/adb-appleraision-1.8-mark-2/channels/chan_sip.c
    team/oej/adb-appleraision-1.8-mark-2/channels/chan_skinny.c
    team/oej/adb-appleraision-1.8-mark-2/channels/console_board.c
    team/oej/adb-appleraision-1.8-mark-2/channels/console_gui.c
    team/oej/adb-appleraision-1.8-mark-2/channels/console_video.c
    team/oej/adb-appleraision-1.8-mark-2/channels/iax2-parser.c
    team/oej/adb-appleraision-1.8-mark-2/channels/iax2-provision.c
    team/oej/adb-appleraision-1.8-mark-2/channels/misdn/ie.c
    team/oej/adb-appleraision-1.8-mark-2/channels/misdn/isdn_lib.c
    team/oej/adb-appleraision-1.8-mark-2/channels/misdn/isdn_msg_parser.c
    team/oej/adb-appleraision-1.8-mark-2/channels/misdn/portinfo.c
    team/oej/adb-appleraision-1.8-mark-2/channels/misdn_config.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sig_analog.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sig_pri.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sig_ss7.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sip/config_parser.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sip/dialplan_functions.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sip/include/sip.h
    team/oej/adb-appleraision-1.8-mark-2/channels/sip/reqresp_parser.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sip/sdp_crypto.c
    team/oej/adb-appleraision-1.8-mark-2/channels/sip/srtp.c
    team/oej/adb-appleraision-1.8-mark-2/channels/vcodecs.c
    team/oej/adb-appleraision-1.8-mark-2/channels/vgrabbers.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_channel.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_devstate.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_dialgroup.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_lock.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_math.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_odbc.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_speex.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_strings.c
    team/oej/adb-appleraision-1.8-mark-2/funcs/func_volume.c
    team/oej/adb-appleraision-1.8-mark-2/include/asterisk/adsi.h
    team/oej/adb-appleraision-1.8-mark-2/include/asterisk/cel.h
    team/oej/adb-appleraision-1.8-mark-2/include/asterisk/channel.h
    team/oej/adb-appleraision-1.8-mark-2/include/asterisk/netsock2.h
    team/oej/adb-appleraision-1.8-mark-2/include/asterisk/tcptls.h
    team/oej/adb-appleraision-1.8-mark-2/main/Makefile
    team/oej/adb-appleraision-1.8-mark-2/main/abstract_jb.c
    team/oej/adb-appleraision-1.8-mark-2/main/acl.c
    team/oej/adb-appleraision-1.8-mark-2/main/alaw.c
    team/oej/adb-appleraision-1.8-mark-2/main/aoc.c
    team/oej/adb-appleraision-1.8-mark-2/main/app.c
    team/oej/adb-appleraision-1.8-mark-2/main/asterisk.c
    team/oej/adb-appleraision-1.8-mark-2/main/astfd.c
    team/oej/adb-appleraision-1.8-mark-2/main/astmm.c
    team/oej/adb-appleraision-1.8-mark-2/main/astobj2.c
    team/oej/adb-appleraision-1.8-mark-2/main/audiohook.c
    team/oej/adb-appleraision-1.8-mark-2/main/autochan.c
    team/oej/adb-appleraision-1.8-mark-2/main/autoservice.c
    team/oej/adb-appleraision-1.8-mark-2/main/bridging.c
    team/oej/adb-appleraision-1.8-mark-2/main/callerid.c
    team/oej/adb-appleraision-1.8-mark-2/main/ccss.c
    team/oej/adb-appleraision-1.8-mark-2/main/cdr.c
    team/oej/adb-appleraision-1.8-mark-2/main/cel.c
    team/oej/adb-appleraision-1.8-mark-2/main/channel.c
    team/oej/adb-appleraision-1.8-mark-2/main/chanvars.c
    team/oej/adb-appleraision-1.8-mark-2/main/cli.c
    team/oej/adb-appleraision-1.8-mark-2/main/config.c
    team/oej/adb-appleraision-1.8-mark-2/main/data.c
    team/oej/adb-appleraision-1.8-mark-2/main/datastore.c
    team/oej/adb-appleraision-1.8-mark-2/main/db.c
    team/oej/adb-appleraision-1.8-mark-2/main/db1-ast/btree/bt_open.c
    team/oej/adb-appleraision-1.8-mark-2/main/devicestate.c
    team/oej/adb-appleraision-1.8-mark-2/main/dial.c
    team/oej/adb-appleraision-1.8-mark-2/main/dns.c
    team/oej/adb-appleraision-1.8-mark-2/main/dnsmgr.c
    team/oej/adb-appleraision-1.8-mark-2/main/dsp.c
    team/oej/adb-appleraision-1.8-mark-2/main/editline/readline.c
    team/oej/adb-appleraision-1.8-mark-2/main/editline/term.c
    team/oej/adb-appleraision-1.8-mark-2/main/editline/tokenizer.c
    team/oej/adb-appleraision-1.8-mark-2/main/enum.c
    team/oej/adb-appleraision-1.8-mark-2/main/event.c
    team/oej/adb-appleraision-1.8-mark-2/main/features.c
    team/oej/adb-appleraision-1.8-mark-2/main/file.c
    team/oej/adb-appleraision-1.8-mark-2/main/fixedjitterbuf.c
    team/oej/adb-appleraision-1.8-mark-2/main/frame.c
    team/oej/adb-appleraision-1.8-mark-2/main/framehook.c
    team/oej/adb-appleraision-1.8-mark-2/main/fskmodem.c
    team/oej/adb-appleraision-1.8-mark-2/main/fskmodem_float.c
    team/oej/adb-appleraision-1.8-mark-2/main/fskmodem_int.c
    team/oej/adb-appleraision-1.8-mark-2/main/global_datastores.c
    team/oej/adb-appleraision-1.8-mark-2/main/hashtab.c
    team/oej/adb-appleraision-1.8-mark-2/main/heap.c
    team/oej/adb-appleraision-1.8-mark-2/main/http.c
    team/oej/adb-appleraision-1.8-mark-2/main/image.c
    team/oej/adb-appleraision-1.8-mark-2/main/indications.c
    team/oej/adb-appleraision-1.8-mark-2/main/io.c
    team/oej/adb-appleraision-1.8-mark-2/main/jitterbuf.c
    team/oej/adb-appleraision-1.8-mark-2/main/loader.c
    team/oej/adb-appleraision-1.8-mark-2/main/lock.c
    team/oej/adb-appleraision-1.8-mark-2/main/logger.c
    team/oej/adb-appleraision-1.8-mark-2/main/manager.c
    team/oej/adb-appleraision-1.8-mark-2/main/md5.c
    team/oej/adb-appleraision-1.8-mark-2/main/netsock.c
    team/oej/adb-appleraision-1.8-mark-2/main/netsock2.c
    team/oej/adb-appleraision-1.8-mark-2/main/pbx.c
    team/oej/adb-appleraision-1.8-mark-2/main/plc.c
    team/oej/adb-appleraision-1.8-mark-2/main/privacy.c
    team/oej/adb-appleraision-1.8-mark-2/main/rtp_engine.c
    team/oej/adb-appleraision-1.8-mark-2/main/say.c
    team/oej/adb-appleraision-1.8-mark-2/main/sched.c
    team/oej/adb-appleraision-1.8-mark-2/main/security_events.c
    team/oej/adb-appleraision-1.8-mark-2/main/slinfactory.c
    team/oej/adb-appleraision-1.8-mark-2/main/srv.c
    team/oej/adb-appleraision-1.8-mark-2/main/ssl.c
    team/oej/adb-appleraision-1.8-mark-2/main/stdtime/localtime.c
    team/oej/adb-appleraision-1.8-mark-2/main/strcompat.c
    team/oej/adb-appleraision-1.8-mark-2/main/strings.c
    team/oej/adb-appleraision-1.8-mark-2/main/stun.c
    team/oej/adb-appleraision-1.8-mark-2/main/syslog.c
    team/oej/adb-appleraision-1.8-mark-2/main/taskprocessor.c
    team/oej/adb-appleraision-1.8-mark-2/main/tcptls.c
    team/oej/adb-appleraision-1.8-mark-2/main/tdd.c
    team/oej/adb-appleraision-1.8-mark-2/main/term.c
    team/oej/adb-appleraision-1.8-mark-2/main/test.c
    team/oej/adb-appleraision-1.8-mark-2/main/threadstorage.c
    team/oej/adb-appleraision-1.8-mark-2/main/timing.c
    team/oej/adb-appleraision-1.8-mark-2/main/translate.c
    team/oej/adb-appleraision-1.8-mark-2/main/udptl.c
    team/oej/adb-appleraision-1.8-mark-2/main/ulaw.c
    team/oej/adb-appleraision-1.8-mark-2/main/utils.c
    team/oej/adb-appleraision-1.8-mark-2/main/xml.c
    team/oej/adb-appleraision-1.8-mark-2/main/xmldoc.c
    team/oej/adb-appleraision-1.8-mark-2/pbx/dundi-parser.c
    team/oej/adb-appleraision-1.8-mark-2/pbx/pbx_config.c
    team/oej/adb-appleraision-1.8-mark-2/pbx/pbx_dundi.c
    team/oej/adb-appleraision-1.8-mark-2/res/ael/ael.flex
    team/oej/adb-appleraision-1.8-mark-2/res/ael/pval.c
    team/oej/adb-appleraision-1.8-mark-2/res/ais/clm.c
    team/oej/adb-appleraision-1.8-mark-2/res/ais/evt.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_adsi.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_calendar.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_calendar_caldav.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_calendar_ews.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_calendar_exchange.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_calendar_icalendar.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_config_odbc.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_fax.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_jabber.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_monitor.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_odbc.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_rtp_asterisk.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_smdi.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_speech.c
    team/oej/adb-appleraision-1.8-mark-2/res/res_srtp.c

Propchange: team/oej/adb-appleraision-1.8-mark-2/
            ('svnmerge-integrated' removed)

Modified: team/oej/adb-appleraision-1.8-mark-2/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/Makefile?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/Makefile (original)
+++ team/oej/adb-appleraision-1.8-mark-2/Makefile Wed Jun 27 03:09:18 2012
@@ -466,39 +466,23 @@
 
 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
 OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
+INSTALLDIRS="$(ASTLIBDIR)" "$(MODULES_DIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
+	"$(ASTSPOOLDIR)" "$(ASTSPOOLDIR)/dictate" "$(ASTSPOOLDIR)/meetme" \
+	"$(ASTSPOOLDIR)/monitor" "$(ASTSPOOLDIR)/system" "$(ASTSPOOLDIR)/tmp" \
+	"$(ASTSPOOLDIR)/voicemail" "$(ASTHEADERDIR)" "$(ASTHEADERDIR)/doxygen" \
+	"$(ASTLOGDIR)" "$(ASTLOGDIR)/cdr-csv" "$(ASTLOGDIR)/cdr-custom" \
+	"$(ASTLOGDIR)/cel-custom" "$(ASTDATADIR)" "$(ASTDATADIR)/documentation" \
+	"$(ASTDATADIR)/documentation/thirdparty" "$(ASTDATADIR)/firmware" \
+	"$(ASTDATADIR)/firmware/iax" "$(ASTDATADIR)/images" "$(ASTDATADIR)/keys" \
+	"$(ASTDATADIR)/phoneprov" "$(ASTDATADIR)/static-http" "$(ASTDATADIR)/sounds" \
+	"$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)"
 
 installdirs:
-	$(INSTALL) -d "$(DESTDIR)$(MODULES_DIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSBINDIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTVARRUNDIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/dictate"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/meetme"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/monitor"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/system"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/tmp"
-	$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail"
-	$(INSTALL) -d "$(DESTDIR)$(ASTHEADERDIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTHEADERDIR)/doxygen"
-	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cdr-csv"
-	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cdr-custom"
-	$(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cel-custom"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/documentation"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/documentation/thirdparty"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/firmware"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/firmware/iax"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/images"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/keys"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/phoneprov"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/sounds"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/moh"
-	$(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8"
-	$(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
-	$(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
+	@for i in $(INSTALLDIRS); do \
+		if [ ! -z "$${i}" -a ! -d "$(DESTDIR)$${i}" ]; then \
+			$(INSTALL) -d "$(DESTDIR)$${i}"; \
+		fi; \
+	done
 
 bininstall: _all installdirs $(SUBDIRS_INSTALL)
 	$(INSTALL) -m 755 main/asterisk "$(DESTDIR)$(ASTSBINDIR)/"

Modified: team/oej/adb-appleraision-1.8-mark-2/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/UPGRADE.txt?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/UPGRADE.txt (original)
+++ team/oej/adb-appleraision-1.8-mark-2/UPGRADE.txt Wed Jun 27 03:09:18 2012
@@ -29,6 +29,12 @@
 
 From 1.8.10 to 1.8.11:
 
+* The BLINDTRANSFER channel variable is deleted from a channel when it is
+  bridged to prevent subtle bugs in the parking feature.  The channel
+  variable is used by Asterisk internally for the Park application to work
+  properly.  If you were using it for your own purposes, copy it to your
+  own channel variable before the channel is bridged.
+
 * If no transport is specified in sip.conf, transport will default to UDP.
   Also, if multiple transport= lines are used, only the last will be used.
 

Modified: team/oej/adb-appleraision-1.8-mark-2/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/addons/chan_ooh323.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/addons/chan_ooh323.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/addons/chan_ooh323.c Wed Jun 27 03:09:18 2012
@@ -1154,6 +1154,8 @@
 
 	if (p) {
 		ast_mutex_lock(&p->lock);
+
+		p->lastrtptx = time(NULL);
 
 		if (f->frametype == AST_FRAME_MODEM) {
 			ast_debug(1, "Send UDPTL %d/%d len %d for %s\n",
@@ -3451,6 +3453,24 @@
 			h323_next = h323->next;
 
 			/* TODO: Need to add rtptimeout keepalive support */
+
+			if (h323->rtp && h323->rtptimeout && h323->lastrtptx &&
+				h323->lastrtptx + h323->rtptimeout < t) {
+				ast_rtp_instance_sendcng(h323->rtp, 0);
+				h323->lastrtptx = time(NULL);
+			}
+
+			if (h323->rtp && h323->owner && h323->rtptimeout &&
+				h323->lastrtprx &&
+				h323->lastrtprx + h323->rtptimeout < t) {
+				if (!ast_channel_trylock(h323->owner)) {
+					ast_softhangup_nolock(h323->owner, AST_SOFTHANGUP_DEV);
+					ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", h323->owner->name, (long) (t - h323->lastrtprx));
+					ast_channel_unlock(h323->owner);
+				}
+				
+			}
+
 			if (ast_test_flag(h323, H323_NEEDDESTROY)) {
 				ooh323_destroy (h323);
          } /* else if (ast_test_flag(h323, H323_NEEDSTART) && h323->owner) {
@@ -4277,12 +4297,14 @@
 	switch (ast->fdno) {
 	case 0:
 		f = ast_rtp_instance_read(p->rtp, 0);	/* RTP Audio */
+		p->lastrtprx = time(NULL);
 		break;
 	case 1:
 		f = ast_rtp_instance_read(p->rtp, 1);	/* RTCP Control Channel */
 		break;
 	case 2:
 		f = ast_rtp_instance_read(p->vrtp, 0);	/* RTP Video */
+		p->lastrtprx = time(NULL);
 		break;
 	case 3:
 		f = ast_rtp_instance_read(p->vrtp, 1);	/* RTCP Control Channel for video */
@@ -4291,6 +4313,7 @@
 		f = ast_udptl_read(p->udptl);		/* UDPTL t.38 data */
 		if (gH323Debug) ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
 				f->frametype, f->subclass.integer, f->datalen, ast->name);
+		p->lastrtprx = time(NULL);
 		break;
 
 	default:

Modified: team/oej/adb-appleraision-1.8-mark-2/addons/format_mp3.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/addons/format_mp3.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/addons/format_mp3.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/addons/format_mp3.c Wed Jun 27 03:09:18 2012
@@ -9,7 +9,7 @@
  * Thanks to mpglib from http://www.mpg123.org/
  * and Chris Stenton [jacs at gnome.co.uk]
  * for coding the ability to play stereo and non-8khz files
- 
+
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact
  * any of the maintainers of this project for assistance;
@@ -48,20 +48,20 @@
 #define MP3_DCACHE 8192
 
 struct mp3_private {
-	char waste[AST_FRIENDLY_OFFSET];	/* Buffer for sending frames, etc */
-	char empty;				/* Empty character */
-	int lasttimeout;
-	int maxlen;
-	struct timeval last;
+	/*! state for the mp3 decoder */
 	struct mpstr mp;
+	/*! buffer to hold mp3 data after read from disk */
 	char sbuf[MP3_SCACHE];
+	/*! buffer for slinear audio after being decoded out of sbuf */
 	char dbuf[MP3_DCACHE];
+	/*! how much data has been written to the output buffer in the ast_filestream */
 	int buflen;
+	/*! how much data has been written to sbuf */
 	int sbuflen;
+	/*! how much data is left to be read out of dbuf, starting at dbufoffset */
 	int dbuflen;
+	/*! current offset for reading data out of dbuf */
 	int dbufoffset;
-	int sbufoffset;
-	int lastseek;
 	int offset;
 	long seek;
 };
@@ -107,17 +107,17 @@
 static void mp3_close(struct ast_filestream *s)
 {
 	struct mp3_private *p = s->_private;
-	
+
 	ExitMP3(&p->mp);
 	return;
 }
 
-static int mp3_squeue(struct ast_filestream *s) 
+static int mp3_squeue(struct ast_filestream *s)
 {
 	struct mp3_private *p = s->_private;
 	int res=0;
-	
-	p->lastseek = ftell(s->f);
+
+	res = ftell(s->f);
 	p->sbuflen = fread(p->sbuf, 1, MP3_SCACHE, s->f);
 	if(p->sbuflen < 0) {
 		ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", p->sbuflen, strerror(errno));
@@ -131,11 +131,11 @@
 	return 0;
 }
 
-static int mp3_dqueue(struct ast_filestream *s) 
+static int mp3_dqueue(struct ast_filestream *s)
 {
 	struct mp3_private *p = s->_private;
 	int res=0;
-	
+
 	if((res = decodeMP3(&p->mp,NULL,0,p->dbuf,MP3_DCACHE,&p->dbuflen)) == MP3_OK) {
 		p->sbuflen -= p->dbuflen;
 		p->dbufoffset = 0;
@@ -147,7 +147,7 @@
 {
 	struct mp3_private *p = s->_private;
 	int res = 0, bytes = 0;
-	
+
 	if(p->seek) {
 		ExitMP3(&p->mp);
 		InitMP3(&p->mp, OUTSCALE);
@@ -167,7 +167,7 @@
 			if(res == MP3_ERR)
 				return -1;
 		}
-		
+
 		p->seek = 0;
 		return 0;
 	}
@@ -181,7 +181,7 @@
 			if(mp3_squeue(s))
 				return -1;
 		}
-		
+
 	}
 
 	return 0;
@@ -194,36 +194,41 @@
 	int delay =0;
 	int save=0;
 
-	/* Send a frame from the file to the appropriate channel */
-
-	if(mp3_queue(s))
+	/* Pre-populate the buffer that holds audio to be returned (dbuf) */
+	if (mp3_queue(s)) {
 		return NULL;
-
-	if(p->dbuflen) {
-		for(p->buflen=0; p->buflen < MP3_BUFLEN && p->buflen < p->dbuflen; p->buflen++) {
-			s->buf[p->buflen + AST_FRIENDLY_OFFSET] = p->dbuf[p->buflen+p->dbufoffset];
-			p->sbufoffset++;
+	}
+
+	if (p->dbuflen) {
+		/* Read out what's waiting in dbuf */
+		for (p->buflen = 0; p->buflen < MP3_BUFLEN && p->buflen < p->dbuflen; p->buflen++) {
+			s->buf[p->buflen + AST_FRIENDLY_OFFSET] = p->dbuf[p->buflen + p->dbufoffset];
 		}
 		p->dbufoffset += p->buflen;
 		p->dbuflen -= p->buflen;
-
-		if(p->buflen < MP3_BUFLEN) {
-			if(mp3_queue(s))
-				return NULL;
-
-			for(save = p->buflen; p->buflen < MP3_BUFLEN; p->buflen++) {
-				s->buf[p->buflen + AST_FRIENDLY_OFFSET] = p->dbuf[(p->buflen-save)+p->dbufoffset];
-				p->sbufoffset++;
+	}
+
+	if (p->buflen < MP3_BUFLEN) {
+		/* dbuf didn't have enough, so reset dbuf, fill it back up and continue */
+		p->dbuflen = p->dbufoffset = 0;
+
+		if (mp3_queue(s)) {
+			return NULL;
+		}
+
+		/* Make sure dbuf has enough to complete this read attempt */
+		if (p->dbuflen >= (MP3_BUFLEN - p->buflen)) {
+			for (save = p->buflen; p->buflen < MP3_BUFLEN; p->buflen++) {
+				s->buf[p->buflen + AST_FRIENDLY_OFFSET] = p->dbuf[(p->buflen - save) + p->dbufoffset];
 			}
 			p->dbufoffset += (MP3_BUFLEN - save);
 			p->dbuflen -= (MP3_BUFLEN - save);
-
-		} 
-
-	}
-	
+		}
+
+	}
+
 	p->offset += p->buflen;
-	delay = p->buflen/2;
+	delay = p->buflen / 2;
 	s->fr.frametype = AST_FRAME_VOICE;
 	s->fr.subclass.codec = AST_FORMAT_SLINEAR;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, p->buflen);
@@ -266,16 +271,16 @@
 
 	p->seek = offset;
 	return fseek(s->f, offset, SEEK_SET);
-	
-}
-
-static int mp3_rewrite(struct ast_filestream *s, const char *comment) 
+
+}
+
+static int mp3_rewrite(struct ast_filestream *s, const char *comment)
 {
 	ast_log(LOG_ERROR,"I Can't write MP3 only read them.\n");
 	return -1;
 }
 
-static int mp3_trunc(struct ast_filestream *s) 
+static int mp3_trunc(struct ast_filestream *s)
 {
 
 	ast_log(LOG_ERROR,"I Can't write MP3 only read them.\n");
@@ -285,7 +290,7 @@
 static off_t mp3_tell(struct ast_filestream *s)
 {
 	struct mp3_private *p = s->_private;
-	
+
 	return p->offset/2;
 }
 
@@ -321,6 +326,6 @@
 static int unload_module(void)
 {
 	return ast_format_unregister(name);
-}	
+}
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "MP3 format [Any rate but 8000hz mono is optimal]");

Modified: team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooCalls.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooCalls.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooCalls.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooCalls.c Wed Jun 27 03:09:18 2012
@@ -265,14 +265,13 @@
 
 int ooRemoveCallFromList (OOH323CallData *call)
 {
-   if(!call)
+   if(!call || !gH323ep.callList)
       return OO_OK;
 
    ast_mutex_lock(&callListLock);
 
    OOTRACEINFO3("Removing call %lx: %s\n", call, call->callToken);
 
-   if (!gH323ep.callList) return OO_OK;
    if(call == gH323ep.callList)
    {
       if(!call->next)

Modified: team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooq931.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooq931.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/addons/ooh323c/src/ooq931.c Wed Jun 27 03:09:18 2012
@@ -2316,7 +2316,7 @@
       else
          OO_CLRFLAG(call->flags, OO_M_TUNNELING);
 
-      if(opts->disableGk)
+      if(opts->disableGk || gH323ep.gkClient == NULL)
          OO_SETFLAG(call->flags, OO_M_DISABLEGK);
       else
          OO_CLRFLAG(call->flags, OO_M_DISABLEGK);

Modified: team/oej/adb-appleraision-1.8-mark-2/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/apps/app_dial.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/apps/app_dial.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/apps/app_dial.c Wed Jun 27 03:09:18 2012
@@ -823,7 +823,8 @@
  * \param o Outgoing call channel list.
  * \param num Incoming call channel cause accumulation
  * \param peerflags Dial option flags
- * \param single_caller_bored From wait_for_answer: single && !caller_entertained
+ * \param single TRUE if there is only one outgoing call.
+ * \param caller_entertained TRUE if the caller is being entertained by MOH or ringback.
  * \param to Remaining call timeout time.
  * \param forced_clid OPT_FORCECLID caller id to send
  * \param stored_clid Caller id representing the called party if needed
@@ -833,8 +834,8 @@
  *
  * \todo eventually this function should be intergrated into and replaced by ast_call_forward()
  */
-static void do_forward(struct chanlist *o,
-	struct cause_args *num, struct ast_flags64 *peerflags, int single_caller_bored, int *to,
+static void do_forward(struct chanlist *o, struct cause_args *num,
+	struct ast_flags64 *peerflags, int single, int caller_entertained, int *to,
 	struct ast_party_id *forced_clid, struct ast_party_id *stored_clid)
 {
 	char tmpchan[256];
@@ -861,6 +862,14 @@
 		ast_channel_unlock(c);
 		stuff = tmpchan;
 		tech = "Local";
+	}
+	if (!strcasecmp(tech, "Local")) {
+		/*
+		 * Drop the connected line update block for local channels since
+		 * this is going to run dialplan and the user can change his
+		 * mind about what connected line information he wants to send.
+		 */
+		ast_clear_flag64(o, OPT_IGNORE_CONNECTEDLINE);
 	}
 
 	ast_cel_report_event(in, AST_CEL_FORWARD, NULL, c->call_forward, NULL);
@@ -876,11 +885,14 @@
 		/* Setup parameters */
 		c = o->chan = ast_request(tech, in->nativeformats, in, stuff, &cause);
 		if (c) {
-			if (single_caller_bored) {
+			if (single && !caller_entertained) {
 				ast_channel_make_compatible(o->chan, in);
 			}
+			ast_channel_lock_both(in, o->chan);
 			ast_channel_inherit_variables(in, o->chan);
 			ast_channel_datastore_inherit(in, o->chan);
+			ast_channel_unlock(in);
+			ast_channel_unlock(o->chan);
 			/* When a call is forwarded, we don't want to track new interfaces
 			 * dialed for CC purposes. Setting the done flag will ensure that
 			 * any Dial operations that happen later won't record CC interfaces.
@@ -897,17 +909,17 @@
 		handle_cause(cause, num);
 		ast_hangup(original);
 	} else {
-		struct ast_party_redirecting redirecting;
-
-		if (single_caller_bored && CAN_EARLY_BRIDGE(peerflags, c, in)) {
+		ast_channel_lock_both(c, original);
+		ast_party_redirecting_copy(&c->redirecting, &original->redirecting);
+		ast_channel_unlock(c);
+		ast_channel_unlock(original);
+
+		ast_channel_lock_both(c, in);
+
+		if (single && !caller_entertained && CAN_EARLY_BRIDGE(peerflags, c, in)) {
 			ast_rtp_instance_early_bridge_make_compatible(c, in);
 		}
 
-		ast_channel_set_redirecting(c, &original->redirecting, NULL);
-		ast_channel_lock(c);
-		while (ast_channel_trylock(in)) {
-			CHANNEL_DEADLOCK_AVOIDANCE(c);
-		}
 		if (!c->redirecting.from.number.valid
 			|| ast_strlen_zero(c->redirecting.from.number.str)) {
 			/*
@@ -928,6 +940,7 @@
 		if (ast_test_flag64(peerflags, OPT_ORIGINAL_CLID)) {
 			caller.id = *stored_clid;
 			ast_channel_set_caller_event(c, &caller, NULL);
+			ast_set_flag64(o, DIAL_CALLERID_ABSENT);
 		} else if (ast_strlen_zero(S_COR(c->caller.id.number.valid,
 			c->caller.id.number.str, NULL))) {
 			/*
@@ -936,6 +949,9 @@
 			 */
 			caller.id = *stored_clid;
 			ast_channel_set_caller_event(c, &caller, NULL);
+			ast_set_flag64(o, DIAL_CALLERID_ABSENT);
+		} else {
+			ast_clear_flag64(o, DIAL_CALLERID_ABSENT);
 		}
 
 		/* Determine CallerID for outgoing channel to send. */
@@ -953,22 +969,32 @@
 
 		c->appl = "AppDial";
 		c->data = "(Outgoing Line)";
-		/*
-		 * We must unlock c before calling ast_channel_redirecting_macro, because
-		 * we put c into autoservice there. That is pretty much a guaranteed
-		 * deadlock. This is why the handling of c's lock may seem a bit unusual
-		 * here.
-		 */
-		ast_party_redirecting_init(&redirecting);
-		ast_party_redirecting_copy(&redirecting, &c->redirecting);
-		ast_channel_unlock(c);
-		if (ast_channel_redirecting_macro(c, in, &redirecting, 1, 0)) {
-			ast_channel_update_redirecting(in, &redirecting, NULL);
-		}
-		ast_party_redirecting_free(&redirecting);
+
 		ast_channel_unlock(in);
-
-		ast_clear_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE);
+		if (single && !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
+			struct ast_party_redirecting redirecting;
+
+			/*
+			 * Redirecting updates to the caller make sense only on single
+			 * calls.
+			 *
+			 * We must unlock c before calling
+			 * ast_channel_redirecting_macro, because we put c into
+			 * autoservice there.  That is pretty much a guaranteed
+			 * deadlock.  This is why the handling of c's lock may seem a
+			 * bit unusual here.
+			 */
+			ast_party_redirecting_init(&redirecting);
+			ast_party_redirecting_copy(&redirecting, &c->redirecting);
+			ast_channel_unlock(c);
+			if (ast_channel_redirecting_macro(c, in, &redirecting, 1, 0)) {
+				ast_channel_update_redirecting(in, &redirecting, NULL);
+			}
+			ast_party_redirecting_free(&redirecting);
+		} else {
+			ast_channel_unlock(c);
+		}
+
 		if (ast_test_flag64(peerflags, OPT_CANCEL_TIMEOUT)) {
 			*to = -1;
 		}
@@ -982,17 +1008,14 @@
 			c = o->chan = NULL;
 			num->nochan++;
 		} else {
-			ast_channel_lock(c);
-			while (ast_channel_trylock(in)) {
-				CHANNEL_DEADLOCK_AVOIDANCE(c);
-			}
+			ast_channel_lock_both(c, in);
 			senddialevent(in, c, stuff);
 			ast_channel_unlock(in);
 			ast_channel_unlock(c);
 			/* Hangup the original channel now, in case we needed it */
 			ast_hangup(original);
 		}
-		if (single_caller_bored) {
+		if (single && !caller_entertained) {
 			ast_indicate(in, -1);
 		}
 	}
@@ -1052,7 +1075,8 @@
 			}
 		}
 
-		if (!ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE) && !ast_test_flag64(outgoing, DIAL_CALLERID_ABSENT)) {
+		if (!ast_test_flag64(outgoing, OPT_IGNORE_CONNECTEDLINE)
+			&& !ast_test_flag64(outgoing, DIAL_CALLERID_ABSENT)) {
 			ast_channel_lock(outgoing->chan);
 			ast_connected_line_copy_from_caller(&connected_caller, &outgoing->chan->caller);
 			ast_channel_unlock(outgoing->chan);
@@ -1113,7 +1137,7 @@
 			if (ast_test_flag64(o, DIAL_STILLGOING) && c->_state == AST_STATE_UP) {
 				if (!peer) {
 					ast_verb(3, "%s answered %s\n", c->name, in->name);
-					if (!single && !ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
+					if (!single && !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
 						if (o->pending_connected_update) {
 							if (ast_channel_connected_line_macro(c, in, &o->connected, 1, 0)) {
 								ast_channel_update_connected_line(in, &o->connected, NULL);
@@ -1164,8 +1188,35 @@
 					}
 					ast_frfree(f);
 				}
-				do_forward(o, &num, peerflags, single && !caller_entertained, to,
+
+				if (o->pending_connected_update) {
+					/*
+					 * Re-seed the chanlist's connected line information with
+					 * previously acquired connected line info from the incoming
+					 * channel.  The previously acquired connected line info could
+					 * have been set through the CONNECTED_LINE dialplan function.
+					 */
+					o->pending_connected_update = 0;
+					ast_channel_lock(in);
+					ast_party_connected_line_copy(&o->connected, &in->connected);
+					ast_channel_unlock(in);
+				}
+
+				do_forward(o, &num, peerflags, single, caller_entertained, to,
 					forced_clid, stored_clid);
+
+				if (single && o->chan
+					&& !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)
+					&& !ast_test_flag64(o, DIAL_CALLERID_ABSENT)) {
+					ast_channel_lock(o->chan);
+					ast_connected_line_copy_from_caller(&connected_caller, &o->chan->caller);
+					ast_channel_unlock(o->chan);
+					connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
+					if (ast_channel_connected_line_macro(o->chan, in, &connected_caller, 1, 0)) {
+						ast_channel_update_connected_line(in, &connected_caller, NULL);
+					}
+					ast_party_connected_line_free(&connected_caller);
+				}
 				continue;
 			}
 			f = ast_read(winner);
@@ -1187,7 +1238,7 @@
 					/* This is our guy if someone answered. */
 					if (!peer) {
 						ast_verb(3, "%s answered %s\n", c->name, in->name);
-						if (!single && !ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
+						if (!single && !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
 							if (o->pending_connected_update) {
 								if (ast_channel_connected_line_macro(c, in, &o->connected, 1, 0)) {
 									ast_channel_update_connected_line(in, &o->connected, NULL);
@@ -1319,20 +1370,24 @@
 					ast_indicate(in, f->subclass.integer);
 					break;
 				case AST_CONTROL_CONNECTED_LINE:
-					if (ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
+					if (ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
 						ast_verb(3, "Connected line update to %s prevented.\n", in->name);
-					} else if (!single) {
+						break;
+					}
+					if (!single) {
 						struct ast_party_connected_line connected;
-						ast_verb(3, "%s connected line has changed. Saving it until answer for %s\n", c->name, in->name);
+
+						ast_verb(3, "%s connected line has changed. Saving it until answer for %s\n",
+							c->name, in->name);
 						ast_party_connected_line_set_init(&connected, &o->connected);
 						ast_connected_line_parse_data(f->data.ptr, f->datalen, &connected);
 						ast_party_connected_line_set(&o->connected, &connected, NULL);
 						ast_party_connected_line_free(&connected);
 						o->pending_connected_update = 1;
-					} else {
-						if (ast_channel_connected_line_macro(c, in, f, 1, 1)) {
-							ast_indicate_data(in, AST_CONTROL_CONNECTED_LINE, f->data.ptr, f->datalen);
-						}
+						break;
+					}
+					if (ast_channel_connected_line_macro(c, in, f, 1, 1)) {
+						ast_indicate_data(in, AST_CONTROL_CONNECTED_LINE, f->data.ptr, f->datalen);
 					}
 					break;
 				case AST_CONTROL_AOC:
@@ -1347,15 +1402,23 @@
 					}
 					break;
 				case AST_CONTROL_REDIRECTING:
-					if (ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
+					if (!single) {
+						/*
+						 * Redirecting updates to the caller make sense only on single
+						 * calls.
+						 */
+						break;
+					}
+					if (ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
 						ast_verb(3, "Redirecting update to %s prevented.\n", in->name);
-					} else if (single) {
-						ast_verb(3, "%s redirecting info has changed, passing it to %s\n", c->name, in->name);
-						if (ast_channel_redirecting_macro(c, in, f, 1, 1)) {
-							ast_indicate_data(in, AST_CONTROL_REDIRECTING, f->data.ptr, f->datalen);
-						}
-						pa->sentringing = 0;
-					}
+						break;
+					}
+					ast_verb(3, "%s redirecting info has changed, passing it to %s\n",
+						c->name, in->name);
+					if (ast_channel_redirecting_macro(c, in, f, 1, 1)) {
+						ast_indicate_data(in, AST_CONTROL_REDIRECTING, f->data.ptr, f->datalen);
+					}
+					pa->sentringing = 0;
 					break;
 				case AST_CONTROL_PROCEEDING:
 					ast_verb(3, "%s is proceeding passing it to %s\n", c->name, in->name);
@@ -2162,9 +2225,12 @@
 	} else if ((outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP"))) {
 		outbound_group = ast_strdupa(outbound_group);
 	}
-	ast_channel_unlock(chan);	
-	ast_copy_flags64(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING | OPT_IGNORE_CONNECTEDLINE |
-			 OPT_CANCEL_TIMEOUT | OPT_ANNOUNCE | OPT_CALLEE_MACRO | OPT_CALLEE_GOSUB | OPT_FORCECLID);
+	ast_channel_unlock(chan);
+
+	/* Set per dial instance flags.  These flags are also passed back to RetryDial. */
+	ast_copy_flags64(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID
+		| OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING | OPT_CANCEL_TIMEOUT
+		| OPT_ANNOUNCE | OPT_CALLEE_MACRO | OPT_CALLEE_GOSUB | OPT_FORCECLID);
 
 	/* loop through the list of dial destinations */
 	rest = args.peers;
@@ -2186,6 +2252,7 @@
 		if (!(tmp = ast_calloc(1, sizeof(*tmp))))
 			goto out;
 		if (opts.flags) {
+			/* Set per outgoing call leg options. */
 			ast_copy_flags64(tmp, &opts,
 				OPT_CANCEL_ELSEWHERE |
 				OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
@@ -2193,7 +2260,7 @@
 				OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 				OPT_CALLEE_PARK | OPT_CALLER_PARK |
 				OPT_CALLEE_MIXMONITOR | OPT_CALLER_MIXMONITOR |
-				OPT_RINGBACK | OPT_MUSICBACK | OPT_FORCECLID);
+				OPT_RINGBACK | OPT_MUSICBACK | OPT_FORCECLID | OPT_IGNORE_CONNECTEDLINE);
 			ast_set2_flag64(tmp, args.url, DIAL_NOFORWARDHTML);
 		}
 		ast_copy_string(numsubst, number, sizeof(numsubst));
@@ -2621,7 +2688,9 @@
 			ast_copy_string(peer->context, chan->context, sizeof(peer->context));
 			ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten));
 			peer->priority = chan->priority + 2;
-			ast_pbx_start(peer);
+			if (ast_pbx_start(peer)) {
+				ast_hangup(peer);
+			}
 			hanguptree(outgoing, NULL, ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE) ? 1 : 0);
 			if (continue_exec)
 				*continue_exec = 1;
@@ -2912,24 +2981,26 @@
 			}
 			ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP);  /* set it back the way it was */
 		}
-		if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
-			if(!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
-				replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
-				ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
-			} else { /* F() */
-				int res;
-				res = ast_goto_if_exists(peer, chan->context, chan->exten, (chan->priority) + 1); 
-				if (res == AST_PBX_GOTO_FAILED) {
-					ast_hangup(peer);
+		if (!ast_check_hangup(peer)) {
+			if (ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
+				int goto_res;
+
+				if (!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
+					replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+					goto_res = ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+				} else { /* F() */
+					goto_res = ast_goto_if_exists(peer, chan->context,
+						chan->exten, chan->priority + 1);
+				}
+				if (!goto_res && !ast_pbx_start(peer)) {
+					/* The peer is now running its own PBX. */
 					goto out;
 				}
-			}
-			ast_pbx_start(peer);
-		} else {
-			if (!ast_check_hangup(chan))
+			} else {
 				chan->hangupcause = peer->hangupcause;
-			ast_hangup(peer);
-		}
+			}
+		}
+		ast_hangup(peer);
 	}
 out:
 	if (moh) {

Modified: team/oej/adb-appleraision-1.8-mark-2/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/apps/app_directory.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/apps/app_directory.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/apps/app_directory.c Wed Jun 27 03:09:18 2012
@@ -475,7 +475,8 @@
 		const char *context = ast_variable_retrieve(rtdata, mailbox, "context");
 
 		fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
-		if (ast_true((hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir")))) {
+		hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir");
+		if (ast_true(hidefromdir)) {
 			/* Skip hidden */
 			continue;
 		}

Modified: team/oej/adb-appleraision-1.8-mark-2/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/adb-appleraision-1.8-mark-2/apps/app_meetme.c?view=diff&rev=369423&r1=369422&r2=369423
==============================================================================
--- team/oej/adb-appleraision-1.8-mark-2/apps/app_meetme.c (original)
+++ team/oej/adb-appleraision-1.8-mark-2/apps/app_meetme.c Wed Jun 27 03:09:18 2012

[... 9896 lines stripped ...]



More information about the svn-commits mailing list