[asterisk-commits] mmichelson: branch mmichelson/atxfer_features r395072 - in /team/mmichelson/a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 22 09:58:27 CDT 2013


Author: mmichelson
Date: Mon Jul 22 09:58:09 2013
New Revision: 395072

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395072
Log:
Re-add automerge property.


Added:
    team/mmichelson/atxfer_features/channels/chan_bridge_media.c
      - copied unchanged from r395034, trunk/channels/chan_bridge_media.c
    team/mmichelson/atxfer_features/configs/safe_asterisk.conf.sample
      - copied unchanged from r395034, trunk/configs/safe_asterisk.conf.sample
Modified:
    team/mmichelson/atxfer_features/   (props changed)
    team/mmichelson/atxfer_features/CHANGES
    team/mmichelson/atxfer_features/Makefile
    team/mmichelson/atxfer_features/apps/app_celgenuserevent.c
    team/mmichelson/atxfer_features/apps/app_dial.c
    team/mmichelson/atxfer_features/apps/app_directed_pickup.c
    team/mmichelson/atxfer_features/apps/app_queue.c
    team/mmichelson/atxfer_features/apps/confbridge/conf_chan_announce.c
    team/mmichelson/atxfer_features/apps/confbridge/conf_chan_record.c
    team/mmichelson/atxfer_features/apps/confbridge/confbridge_manager.c
    team/mmichelson/atxfer_features/bridges/bridge_native_rtp.c
    team/mmichelson/atxfer_features/channels/chan_dahdi.c
    team/mmichelson/atxfer_features/channels/chan_sip.c
    team/mmichelson/atxfer_features/channels/iax2/parser.c
    team/mmichelson/atxfer_features/channels/sig_analog.c
    team/mmichelson/atxfer_features/configs/iax.conf.sample
    team/mmichelson/atxfer_features/configs/indications.conf.sample
    team/mmichelson/atxfer_features/contrib/realtime/postgresql/realtime.sql
    team/mmichelson/atxfer_features/contrib/scripts/safe_asterisk
    team/mmichelson/atxfer_features/funcs/func_channel.c
    team/mmichelson/atxfer_features/include/asterisk/astobj2.h
    team/mmichelson/atxfer_features/include/asterisk/audiohook.h
    team/mmichelson/atxfer_features/include/asterisk/cel.h
    team/mmichelson/atxfer_features/include/asterisk/channel.h
    team/mmichelson/atxfer_features/include/asterisk/core_unreal.h
    team/mmichelson/atxfer_features/include/asterisk/logger.h
    team/mmichelson/atxfer_features/include/asterisk/stasis_app.h
    team/mmichelson/atxfer_features/include/asterisk/stasis_app_playback.h
    team/mmichelson/atxfer_features/include/asterisk/stasis_channels.h
    team/mmichelson/atxfer_features/include/asterisk/stasis_system.h
    team/mmichelson/atxfer_features/main/asterisk.c
    team/mmichelson/atxfer_features/main/audiohook.c
    team/mmichelson/atxfer_features/main/bridging.c
    team/mmichelson/atxfer_features/main/ccss.c
    team/mmichelson/atxfer_features/main/cdr.c
    team/mmichelson/atxfer_features/main/cel.c
    team/mmichelson/atxfer_features/main/channel.c
    team/mmichelson/atxfer_features/main/core_unreal.c
    team/mmichelson/atxfer_features/main/features.c
    team/mmichelson/atxfer_features/main/http.c
    team/mmichelson/atxfer_features/main/manager.c
    team/mmichelson/atxfer_features/main/manager_bridging.c
    team/mmichelson/atxfer_features/main/manager_channels.c
    team/mmichelson/atxfer_features/main/pbx.c
    team/mmichelson/atxfer_features/main/stasis_channels.c
    team/mmichelson/atxfer_features/main/stasis_system.c
    team/mmichelson/atxfer_features/res/parking/parking_manager.c
    team/mmichelson/atxfer_features/res/res_stasis.c
    team/mmichelson/atxfer_features/res/res_stasis_http_bridges.c
    team/mmichelson/atxfer_features/res/res_stasis_http_channels.c
    team/mmichelson/atxfer_features/res/res_stasis_http_playback.c
    team/mmichelson/atxfer_features/res/res_stasis_playback.c
    team/mmichelson/atxfer_features/res/stasis/control.c
    team/mmichelson/atxfer_features/res/stasis_http/ari_model_validators.c
    team/mmichelson/atxfer_features/res/stasis_http/ari_model_validators.h
    team/mmichelson/atxfer_features/res/stasis_http/resource_bridges.c
    team/mmichelson/atxfer_features/res/stasis_http/resource_bridges.h
    team/mmichelson/atxfer_features/res/stasis_http/resource_channels.c
    team/mmichelson/atxfer_features/res/stasis_http/resource_channels.h
    team/mmichelson/atxfer_features/rest-api/api-docs/bridges.json
    team/mmichelson/atxfer_features/rest-api/api-docs/channels.json
    team/mmichelson/atxfer_features/rest-api/api-docs/playback.json
    team/mmichelson/atxfer_features/rest-api/api-docs/recordings.json
    team/mmichelson/atxfer_features/tests/test_cel.c

Propchange: team/mmichelson/atxfer_features/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/mmichelson/atxfer_features/
------------------------------------------------------------------------------
--- branch-11-blocked (original)
+++ branch-11-blocked Mon Jul 22 09:58:09 2013
@@ -1,1 +1,1 @@
-/branches/11:373240,375247,375702,385356
+/branches/11:373240,375247,375702,385356,395020

Propchange: team/mmichelson/atxfer_features/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/mmichelson/atxfer_features/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul 22 09:58:09 2013
@@ -1,1 +1,1 @@
-/trunk:1-394778
+/trunk:1-395071

Modified: team/mmichelson/atxfer_features/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/CHANGES?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/CHANGES (original)
+++ team/mmichelson/atxfer_features/CHANGES Mon Jul 22 09:58:09 2013
@@ -294,6 +294,10 @@
    the Local channel. This affects the LocalBridge, LocalOptimizationBegin,
    and LocalOptimizationEnd events.
 
+ * The option 'allowmultiplelogin' can now be set or overriden in a particular
+   account. When set in the general context, it will act as the default
+   setting for defined accounts.
+
 AGI (Asterisk Gateway Interface)
 ------------------
  * The manager event AGIExec has been split into AGIExecStart and AGIExecEnd.
@@ -319,6 +323,27 @@
  * When a CDR is dispatched, user defined CDR variables from both parties are
    included in the resulting CDR. If both parties have the same variable, only
    the Party A value is provided.
+
+CEL (Channel Event Logging)
+------------------
+ * The 'extra' field of all CEL events that use it now consists of a JSON blob
+   with key/value pairs which are defined in the Asterisk 12 CEL documentation.
+
+ * AST_CEL_BLINDTRANSFER events now report the transferee bridge unique
+   identifier, extension, and context in a JSON blob as the extra string
+   instead of the transferee channel name as the peer.
+
+ * AST_CEL_ATTENDEDTRANSFER events now report the peer as NULL and additional
+   information in the 'extra' string as a JSON blob. For transfers that occur
+   between two bridged channels, the 'extra' JSON blob contains the primary
+   bridge unique identifier, the secondary channel name, and the secondary
+   bridge unique identifier. For transfers that occur between a bridged channel
+   and a channel running an app, the 'extra' JSON blob contains the primary
+   bridge unique identifier, the secondary channel name, and the app name.
+
+ * AST_CEL_LOCAL_OPTIMIZE events have been added to convey local channel
+   optimizations with the record occurring for the semi-one channel and
+   the semi-two channel name in the peer field.
 
 Features
 -------------------
@@ -555,6 +580,18 @@
    If no resources exist or all are unavailable the device state is considered
    to be unavailable.
 
+
+Scripts
+------------------
+
+safe_asterisk
+------------------
+ * The safe_asterisk script will now install over previously installations.
+   In previous versions of Asterisk, once installed a 'make install' would
+   skip over safe_asterisk if it was already installed.
+ * Certain options in safe_asterisk can now be configured from the
+   safe_asterisk.conf file. A sample version of this is located in the
+   configs/ folder.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 10 to Asterisk 11 --------------------

Modified: team/mmichelson/atxfer_features/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/Makefile?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/Makefile (original)
+++ team/mmichelson/atxfer_features/Makefile Mon Jul 22 09:58:09 2013
@@ -558,8 +558,8 @@
 bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
 	$(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
 	$(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
-	if [ ! -f "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" -a ! -f /sbin/launchd ]; then \
-		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;' > contrib/scripts/safe.tmp ; \
+	if [ ! -f /sbin/launchd ]; then \
+		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;s|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;' > contrib/scripts/safe.tmp ; \
 		$(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
 		rm -f contrib/scripts/safe.tmp ; \
 	fi

Modified: team/mmichelson/atxfer_features/apps/app_celgenuserevent.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/app_celgenuserevent.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/app_celgenuserevent.c (original)
+++ team/mmichelson/atxfer_features/apps/app_celgenuserevent.c Mon Jul 22 09:58:09 2013
@@ -75,9 +75,9 @@
 	parse = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, parse);
 
-	blob = ast_json_pack("{s: s, s: s}",
+	blob = ast_json_pack("{s: s, s: {s: s}}",
 		"event", args.event,
-		"extra", args.extra);
+		"extra", "extra", args.extra);
 	if (!blob) {
 		return res;
 	}

Modified: team/mmichelson/atxfer_features/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/app_dial.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/app_dial.c (original)
+++ team/mmichelson/atxfer_features/apps/app_dial.c Mon Jul 22 09:58:09 2013
@@ -60,7 +60,6 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/global_datastores.h"
 #include "asterisk/dsp.h"
-#include "asterisk/cel.h"
 #include "asterisk/aoc.h"
 #include "asterisk/ccss.h"
 #include "asterisk/indications.h"

Modified: team/mmichelson/atxfer_features/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/app_directed_pickup.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/app_directed_pickup.c (original)
+++ team/mmichelson/atxfer_features/apps/app_directed_pickup.c Mon Jul 22 09:58:09 2013
@@ -46,7 +46,6 @@
 #include "asterisk/features.h"
 #include "asterisk/manager.h"
 #include "asterisk/callerid.h"
-#include "asterisk/cel.h"
 
 #define PICKUPMARK "PICKUPMARK"
 

Modified: team/mmichelson/atxfer_features/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/app_queue.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/app_queue.c (original)
+++ team/mmichelson/atxfer_features/apps/app_queue.c Mon Jul 22 09:58:09 2013
@@ -103,7 +103,6 @@
 #include "asterisk/taskprocessor.h"
 #include "asterisk/aoc.h"
 #include "asterisk/callerid.h"
-#include "asterisk/cel.h"
 #include "asterisk/data.h"
 #include "asterisk/term.h"
 #include "asterisk/dial.h"

Modified: team/mmichelson/atxfer_features/apps/confbridge/conf_chan_announce.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/confbridge/conf_chan_announce.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/confbridge/conf_chan_announce.c (original)
+++ team/mmichelson/atxfer_features/apps/confbridge/conf_chan_announce.c Mon Jul 22 09:58:09 2013
@@ -134,6 +134,7 @@
 	.send_text = ast_unreal_sendtext,
 	.queryoption = ast_unreal_queryoption,
 	.setoption = ast_unreal_setoption,
+	.properties = AST_CHAN_TP_ANNOUNCER,
 };
 
 struct ast_channel_tech *conf_announce_get_tech(void)

Modified: team/mmichelson/atxfer_features/apps/confbridge/conf_chan_record.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/confbridge/conf_chan_record.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/confbridge/conf_chan_record.c (original)
+++ team/mmichelson/atxfer_features/apps/confbridge/conf_chan_record.c Mon Jul 22 09:58:09 2013
@@ -86,6 +86,7 @@
 	.call = rec_call,
 	.read = rec_read,
 	.write = rec_write,
+	.properties = AST_CHAN_TP_RECORDER,
 };
 
 struct ast_channel_tech *conf_record_get_tech(void)

Modified: team/mmichelson/atxfer_features/apps/confbridge/confbridge_manager.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/apps/confbridge/confbridge_manager.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/apps/confbridge/confbridge_manager.c (original)
+++ team/mmichelson/atxfer_features/apps/confbridge/confbridge_manager.c Mon Jul 22 09:58:09 2013
@@ -195,13 +195,16 @@
 {
 	struct ast_bridge_blob *blob = stasis_message_data(message);
 	const char *conference_name;
-	RAII_VAR(struct ast_str *, bridge_text,
-		ast_manager_build_bridge_state_string(blob->bridge, ""),
-		ast_free);
+	RAII_VAR(struct ast_str *, bridge_text, NULL, ast_free);
 	RAII_VAR(struct ast_str *, channel_text, NULL, ast_free);
 
 	ast_assert(blob != NULL);
 	ast_assert(event != NULL);
+
+	bridge_text = ast_manager_build_bridge_state_string(blob->bridge, "");
+	if (!bridge_text) {
+		return;
+	}
 
 	conference_name = ast_json_string_get(ast_json_object_get(blob->blob, "conference"));
 	ast_assert(conference_name != NULL);

Modified: team/mmichelson/atxfer_features/bridges/bridge_native_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/bridges/bridge_native_rtp.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/bridges/bridge_native_rtp.c (original)
+++ team/mmichelson/atxfer_features/bridges/bridge_native_rtp.c Mon Jul 22 09:58:09 2013
@@ -45,7 +45,6 @@
 #include "asterisk/bridging_technology.h"
 #include "asterisk/frame.h"
 #include "asterisk/rtp_engine.h"
-#include "asterisk/audiohook.h"
 
 /*! \brief Forward declarations for frame hook usage */
 static int native_rtp_bridge_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);
@@ -85,13 +84,7 @@
 /*! \brief Internal helper function which checks whether the channels are compatible with our native bridging */
 static int native_rtp_bridge_capable(struct ast_channel *chan)
 {
-	if (ast_channel_monitor(chan) || (ast_channel_audiohooks(chan) &&
-		!ast_audiohook_write_list_empty(ast_channel_audiohooks(chan))) ||
-		!ast_framehook_list_contains_no_active(ast_channel_framehooks(chan))) {
-		return 0;
-	} else {
-		return 1;
-	}
+	return ast_channel_has_audio_frame_or_monitor(chan);
 }
 
 /*! \brief Internal helper function which gets all RTP information (glue and instances) relating to the given channels */

Modified: team/mmichelson/atxfer_features/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/channels/chan_dahdi.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/channels/chan_dahdi.c (original)
+++ team/mmichelson/atxfer_features/channels/chan_dahdi.c Mon Jul 22 09:58:09 2013
@@ -107,7 +107,6 @@
 #include "asterisk/callerid.h"
 #include "asterisk/adsi.h"
 #include "asterisk/cli.h"
-#include "asterisk/cel.h"
 #include "asterisk/features.h"
 #include "asterisk/musiconhold.h"
 #include "asterisk/say.h"

Modified: team/mmichelson/atxfer_features/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/channels/chan_sip.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/channels/chan_sip.c (original)
+++ team/mmichelson/atxfer_features/channels/chan_sip.c Mon Jul 22 09:58:09 2013
@@ -276,7 +276,6 @@
 #include "asterisk/translate.h"
 #include "asterisk/ast_version.h"
 #include "asterisk/event.h"
-#include "asterisk/cel.h"
 #include "asterisk/data.h"
 #include "asterisk/aoc.h"
 #include "asterisk/message.h"
@@ -8044,7 +8043,7 @@
 		return NULL;
 	}
 
-	if (i->relatedpeer) {
+	if (i->relatedpeer && i->relatedpeer->endpoint) {
 		if (ast_endpoint_add_channel(i->relatedpeer->endpoint, tmp)) {
 			ast_channel_unref(tmp);
 			sip_pvt_lock(i);
@@ -15744,7 +15743,6 @@
 static int expire_register(const void *data)
 {
 	struct sip_peer *peer = (struct sip_peer *)data;
-	RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
 	if (!peer) {		/* Hmmm. We have no peer. Weird. */
 		return 0;
@@ -15764,11 +15762,14 @@
 		peer->socket.ws_session = NULL;
 	}
 
-	ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_OFFLINE);
-	blob = ast_json_pack("{s: s, s: s}",
-		"peer_status", "Unregistered",
-		"cause", "Expired");
-	ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+	if (peer->endpoint) {
+		RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
+		ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_OFFLINE);
+		blob = ast_json_pack("{s: s, s: s}",
+			"peer_status", "Unregistered",
+			"cause", "Expired");
+		ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+	}
 	register_peer_exten(peer, FALSE);	/* Remove regexten */
 	ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", peer->name);
 
@@ -16013,7 +16014,6 @@
 	int start = 0;
 	int wildcard_found = 0;
 	int single_binding_found = 0;
-	RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
 	ast_copy_string(contact, __get_header(req, "Contact", &start), sizeof(contact));
 
@@ -16201,11 +16201,14 @@
 		ast_db_put("SIP/Registry", peer->name, data);
 	}
 
-	ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_ONLINE);
-	blob = ast_json_pack("{s: s, s: s}",
-		"peer_status", "Registered",
-		"address", ast_sockaddr_stringify(&peer->addr));
-	ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+	if (peer->endpoint) {
+		RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
+		ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_ONLINE);
+		blob = ast_json_pack("{s: s, s: s}",
+			"peer_status", "Registered",
+			"address", ast_sockaddr_stringify(&peer->addr));
+		ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+	}
 
 	/* Is this a new IP address for us? */
 	if (ast_sockaddr_cmp(&peer->addr, &oldsin)) {
@@ -17209,7 +17212,6 @@
 		/* Create peer if we have autocreate mode enabled */
 		peer = temp_peer(name);
 		if (peer) {
-			RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 			ao2_t_link(peers, peer, "link peer into peer table");
 			if (!ast_sockaddr_isnull(&peer->addr)) {
 				ao2_t_link(peers_by_ip, peer, "link peer into peers-by-ip table");
@@ -17238,11 +17240,14 @@
 				ast_string_field_set(p, fullcontact, peer->fullcontact);
 				/* Say OK and ask subsystem to retransmit msg counter */
 				transmit_response_with_date(p, "200 OK", req);
-				ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_ONLINE);
-				blob = ast_json_pack("{s: s, s: s}",
-					"peer_status", "Registered",
-					"address", ast_sockaddr_stringify(addr));
-				ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+				if (peer->endpoint) {
+					RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
+					ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_ONLINE);
+					blob = ast_json_pack("{s: s, s: s}",
+						"peer_status", "Registered",
+						"address", ast_sockaddr_stringify(addr));
+					ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+				}
 				send_mwi = 1;
 				res = 0;
 				break;
@@ -17332,7 +17337,9 @@
 			break;
 		}
 
-		ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+		if (peer->endpoint) {
+			ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+		}
 	}
 	if (peer) {
 		sip_unref_peer(peer, "register_verify: sip_unref_peer: tossing stack peer pointer at end of func");
@@ -23815,7 +23822,6 @@
 	if (statechanged) {
 		const char *s = is_reachable ? "Reachable" : "Lagged";
 		char str_lastms[20];
-		RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
 		snprintf(str_lastms, sizeof(str_lastms), "%d", pingtime);
 
@@ -23825,13 +23831,18 @@
 		if (sip_cfg.peer_rtupdate) {
 			ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", str_lastms, SENTINEL);
 		}
-		ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_ONLINE);
-		blob = ast_json_pack("{s: s, s: i}",
-			"peer_status", s,
-			"time", pingtime);
-		ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
-		if (is_reachable && sip_cfg.regextenonqualify)
+		if (peer->endpoint) {
+			RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
+			ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_ONLINE);
+			blob = ast_json_pack("{s: s, s: i}",
+				"peer_status", s,
+				"time", pingtime);
+			ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+		}
+
+		if (is_reachable && sip_cfg.regextenonqualify) {
 			register_peer_exten(peer, TRUE);
+		}
 	}
 
 	pvt_set_needdestroy(p, "got OPTIONS response");
@@ -29143,17 +29154,21 @@
 	peer->pokeexpire = -1;
 
 	if (peer->lastms > -1) {
-		RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
 		ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE!  Last qualify: %d\n", peer->name, peer->lastms);
 		if (sip_cfg.peer_rtupdate) {
 			ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", "-1", SENTINEL);
 		}
-		ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_OFFLINE);
-		blob = ast_json_pack("{s: s, s: s}",
-			"peer_status", "Unreachable",
-			"time", "-1");
-		ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+
+		if (peer->endpoint) {
+			RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
+			ast_endpoint_set_state(peer->endpoint, AST_ENDPOINT_OFFLINE);
+			blob = ast_json_pack("{s: s, s: s}",
+				"peer_status", "Unreachable",
+				"time", "-1");
+			ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
+		}
+
 		if (sip_cfg.regextenonqualify) {
 			register_peer_exten(peer, FALSE);
 		}

Modified: team/mmichelson/atxfer_features/channels/iax2/parser.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/channels/iax2/parser.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/channels/iax2/parser.c (original)
+++ team/mmichelson/atxfer_features/channels/iax2/parser.c Mon Jul 22 09:58:09 2013
@@ -604,6 +604,16 @@
 		"TXFER  ",
 		"CNLINE ",
 		"REDIR  ",
+		"T38PARM",
+		"CONTRCC",
+		"SRCCHG ",
+		"READACT",
+		"AOC    ",
+		"ENDOFQ ",
+		"INCOMPL",
+		"MCID   ",
+		"UPDRTPP",
+		"PCAUSEC",
 	};
 	struct ast_iax2_full_hdr *fh;
 	char retries[20];

Modified: team/mmichelson/atxfer_features/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/channels/sig_analog.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/channels/sig_analog.c (original)
+++ team/mmichelson/atxfer_features/channels/sig_analog.c Mon Jul 22 09:58:09 2013
@@ -41,7 +41,6 @@
 #include "asterisk/manager.h"
 #include "asterisk/astdb.h"
 #include "asterisk/features.h"
-#include "asterisk/cel.h"
 #include "asterisk/causes.h"
 #include "asterisk/features_config.h"
 #include "asterisk/bridging.h"

Modified: team/mmichelson/atxfer_features/configs/iax.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/configs/iax.conf.sample?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/configs/iax.conf.sample (original)
+++ team/mmichelson/atxfer_features/configs/iax.conf.sample Mon Jul 22 09:58:09 2013
@@ -608,6 +608,15 @@
 ; IPs can also optionally be given but are not required.  Caller*ID can be
 ; suggested to the other side as well if it is for example a phone instead of
 ; another PBX.
+;connectedline=yes ; Set how connected line information is handled for this
+;                  ; peer. If set to "yes", both sending and receiving
+;                  ; connected line information will be enabled. If set to
+;                  ; "send", this peer will send connected line information
+;                  ; but will not process connected line updates. If set to
+;                  ; "receive", connected line updates will be processed
+;                  ; but not sent. If set to "no", connected line updates
+;                  ; will be disabled. Default is "no".
+
 
 ;[dynamichost]
 ;host=dynamic

Modified: team/mmichelson/atxfer_features/configs/indications.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/configs/indications.conf.sample?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/configs/indications.conf.sample (original)
+++ team/mmichelson/atxfer_features/configs/indications.conf.sample Mon Jul 22 09:58:09 2013
@@ -434,7 +434,7 @@
 ringcadence = 2000,4000
 dial = 425
 busy = 425/500,0/500
-ring = 425/400,0/200
+ring = 425/400,0/200,425/400,0/2000
 congestion = 425/500,0/500
 
 [nl]

Modified: team/mmichelson/atxfer_features/contrib/realtime/postgresql/realtime.sql
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/contrib/realtime/postgresql/realtime.sql?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/contrib/realtime/postgresql/realtime.sql (original)
+++ team/mmichelson/atxfer_features/contrib/realtime/postgresql/realtime.sql Mon Jul 22 09:58:09 2013
@@ -138,6 +138,23 @@
 PRIMARY KEY (queue_name, interface)
 ) WITHOUT OIDS;
 
+drop table queue_log;
+CREATE TABLE "queue_log" (
+"id" SERIAL,
+"time" TIMESTAMP WITHOUT TIME ZONE DEFAULT now() NOT NULL,
+"callid" character varying(50) NOT NULL,
+"queuename" character varying(50) NOT NULL,
+"agent" character varying(50) NOT NULL,
+"event" character varying(20) NOT NULL,
+"data1" character varying(50) NOT NULL,
+"data2" character varying(50) NOT NULL,
+"data3" character varying(50) NOT NULL,
+"data4" character varying(50) NOT NULL,
+"data5" character varying(50) NOT NULL,
+CONSTRAINT queue_log_pkey PRIMARY KEY (id)
+) WITHOUT OIDS;
+
+GRANT ALL ON TABLE queue_log TO asterisk;
 GRANT ALL ON TABLE cdr TO asterisk;
 GRANT ALL ON TABLE extensions_conf TO asterisk;
 GRANT ALL ON TABLE sip_conf TO asterisk;

Modified: team/mmichelson/atxfer_features/contrib/scripts/safe_asterisk
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/contrib/scripts/safe_asterisk?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/contrib/scripts/safe_asterisk (original)
+++ team/mmichelson/atxfer_features/contrib/scripts/safe_asterisk Mon Jul 22 09:58:09 2013
@@ -1,6 +1,7 @@
 #!/bin/sh
 # vim:textwidth=80:tabstop=4:shiftwidth=4:smartindent:autoindent
 
+ASTETCDIR=__ASTERISK_ETC_DIR__
 ASTSBINDIR=__ASTERISK_SBIN_DIR__
 ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
 ASTVARLOGDIR=__ASTERISK_LOG_DIR__
@@ -19,23 +20,32 @@
 SLEEPSECS=4
 ASTPIDFILE=${ASTVARRUNDIR}/asterisk.pid
 
-# comment this line out to have this script _not_ kill all mpg123 processes when
-# asterisk exits
-KILLALLMPG123=1
-
-# run asterisk with this priority
-PRIORITY=0
-
-# set system filemax on supported OSes if this variable is set
-# SYSMAXFILES=262144
-
-# Asterisk allows full permissions by default, so set a umask, if you want
-# restricted permissions.
-#UMASK=022
-
-# set max files open with ulimit. On linux systems, this will be automatically
-# set to the system's maximum files open devided by two, if not set here.
-# MAXFILES=32768
+# Obtain parameters from the safe_asterisk.conf file in the
+# ASTETCDIR directory
+
+kvalue=`grep ^KILLALLMPG123= $ASTETCDIR 2>/dev/null | cut -c 15`
+if test "x$kvalue" != "x" ; then
+    KILLALLMPG123=$kvalue
+else
+    KILLALLMPG123=0
+fi
+
+pvalue=`grep ^PRIORITY= $ASTETCDIR 2>/dev/null | cut -c 10`
+if test "x$pvalue" != "x" ; then
+    PRIORITY=$pvalue
+else
+    PRIORITY=0
+fi
+
+svalue=`grep ^SYSMAXFILES= $ASTETCDIR 2>/dev/null | cut -c 13-21`
+if test "x$svalue" != "x" ; then
+    SYSMAXFILES=$svalue
+fi
+
+mvalue=`grep ^MAXFILES= $ASTETCDIR 2>/dev/null | cut -c 10-15`
+if test "x$mvalue" != "x" ; then
+    MAXFILES=$mvalue
+fi
 
 message() {
 	echo "$1" >&2
@@ -96,8 +106,10 @@
 
 fi
 
-if test "x$UMASK" != "x"; then
-	umask $UMASK
+
+uvalue=`grep ^UMASK= $ASTETCDIR 2>/dev/null | cut -c 7-10`
+if test "x$uvalue" != "x" ; then
+    umask $uvalue
 fi
 
 #
@@ -133,7 +145,7 @@
 	fi
 fi
 
-if test ! -w "${DUMPDROP}" ; then	
+if test ! -w "${DUMPDROP}" ; then
 	message "Cannot write to ${DUMPDROP}"
 	exit 1
 fi
@@ -157,7 +169,7 @@
 
 run_asterisk()
 {
-	while :; do 
+	while :; do
 
 		if test "x$TTY" != "x" ; then
 			cd "${RUNDIR}"

Modified: team/mmichelson/atxfer_features/funcs/func_channel.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/funcs/func_channel.c?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/funcs/func_channel.c (original)
+++ team/mmichelson/atxfer_features/funcs/func_channel.c Mon Jul 22 09:58:09 2013
@@ -20,7 +20,7 @@
  *
  * \author Kevin P. Fleming <kpfleming at digium.com>
  * \author Ben Winslow
- * 
+ *
  * \ingroup functions
  */
 
@@ -260,15 +260,34 @@
 						<para>     <literal>audio</literal>             Get audio destination</para>
 						<para>     <literal>video</literal>             Get video destination</para>
 						<para>     <literal>text</literal>              Get text destination</para>
+						<para>   Defaults to <literal>audio</literal> if unspecified.</para>
+					</enum>
+					<enum name="rtpsource">
+						<para>R/O Get source RTP destination information.</para>
+						<para>   This option takes one additional argument:</para>
+						<para>    Argument 1:</para>
+						<para>     <literal>audio</literal>             Get audio destination</para>
+						<para>     <literal>video</literal>             Get video destination</para>
+						<para>     <literal>text</literal>              Get text destination</para>
+						<para>   Defaults to <literal>audio</literal> if unspecified.</para>
 					</enum>
 				</enumlist>
 				<para><emphasis>chan_iax2</emphasis> provides the following additional options:</para>
 				<enumlist>
+					<enum name="osptoken">
+						<para>R/O Get the peer's osptoken.</para>
+					</enum>
 					<enum name="peerip">
 						<para>R/O Get the peer's ip address.</para>
 					</enum>
 					<enum name="peername">
 						<para>R/O Get the peer's username.</para>
+					</enum>
+					<enum name="secure_signaling">
+						<para>R/O Get the if the IAX channel is secured.</para>
+					</enum>
+					<enum name="secure_media">
+						<para>R/O Get the if the IAX channel is secured.</para>
 					</enum>
 				</enumlist>
 				<para><emphasis>chan_dahdi</emphasis> provides the following additional options:</para>
@@ -327,17 +346,35 @@
 				<para><emphasis>chan_ooh323</emphasis> provides the following additional options:</para>
 				<enumlist>
 					<enum name="faxdetect">
-						<para>Fax Detect [R/W]</para>
+						<para>R/W Fax Detect</para>
 						<para>Returns 0 or 1</para>
 						<para>Write yes or no</para>
 					</enum>
 					<enum name="t38support">
-						<para>t38support [R/W]</para>
+						<para>R/W t38support</para>
 						<para>Returns 0 or 1</para>
 						<para>Write yes or no</para>
 					</enum>
-					<enum name="h323id">
-						<para>Returns h323id [R]</para>
+					<enum name="h323id_url">
+						<para>R/0 Returns caller URL</para>
+ 					</enum>
+					<enum name="caller_h323id">
+						<para>R/0 Returns caller h323id</para>
+					</enum>
+					<enum name="caller_dialeddigits">
+						<para>R/0 Returns caller dialed digits</para>
+					</enum>
+					<enum name="caller_email">
+						<para>R/0 Returns caller email</para>
+					</enum>
+					<enum name="callee_email">
+						<para>R/0 Returns callee email</para>
+					</enum>
+					<enum name="callee_dialeddigits">
+						<para>R/0 Returns callee dialed digits</para>
+					</enum>
+					<enum name="caller_url">
+						<para>R/0 Returns caller URL</para>
 					</enum>
 				</enumlist>
 			</parameter>
@@ -553,7 +590,7 @@
 #ifdef CHANNEL_TRACE
 	else if (!strcasecmp(data, "trace")) {
 		ast_channel_lock(chan);
-		if (ast_true(value)) 
+		if (ast_true(value))
 			ret = ast_channel_trace_enable(chan);
 		else if (ast_false(value))
 			ret = ast_channel_trace_disable(chan);
@@ -568,7 +605,7 @@
 		struct ast_tone_zone *new_zone;
 		if (!(new_zone = ast_get_indication_zone(value))) {
 			ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", value);
-			ret = -1;	
+			ret = -1;
 		} else {
 			ast_channel_lock(chan);
 			if (ast_channel_zone(chan)) {

Modified: team/mmichelson/atxfer_features/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/include/asterisk/astobj2.h?view=diff&rev=395072&r1=395071&r2=395072
==============================================================================
--- team/mmichelson/atxfer_features/include/asterisk/astobj2.h (original)
+++ team/mmichelson/atxfer_features/include/asterisk/astobj2.h Mon Jul 22 09:58:09 2013
@@ -770,12 +770,12 @@
     OBJ_UNLINK - to remove the object, once found, from the container.
     OBJ_NODATA - don't return the object if found (no ref count change)
     OBJ_MULTIPLE - don't stop at first match
-    OBJ_POINTER - if set, 'arg' is an object pointer, and a hash table
+    OBJ_SEARCH_OBJECT - if set, 'arg' is an object pointer, and a hash table
                   search will be done. If not, a traversal is done.
-    OBJ_KEY - if set, 'arg', is a search key item that is not an object.
-              Similar to OBJ_POINTER and mutually exclusive.
-    OBJ_PARTIAL_KEY - if set, 'arg', is a partial search key item that is not an object.
-              Similar to OBJ_KEY and mutually exclusive.
+    OBJ_SEARCH_KEY - if set, 'arg', is a search key item that is not an object.
+              Similar to OBJ_SEARCH_OBJECT and mutually exclusive.
+    OBJ_SEARCH_PARTIAL_KEY - if set, 'arg', is a partial search key item that is not an object.
+              Similar to OBJ_SEARCH_KEY and mutually exclusive.
 
   -  \b ao2_callback(c, flags, fn, arg)
     apply fn(obj, arg) to all objects in the container.
@@ -786,13 +786,13 @@
          OBJ_UNLINK   - to remove the object, once found, from the container.
          OBJ_NODATA   - don't return the object if found (no ref count change)
          OBJ_MULTIPLE - don't stop at first match
-         OBJ_POINTER  - if set, 'arg' is an object pointer, and a hash table
+         OBJ_SEARCH_OBJECT - if set, 'arg' is an object pointer, and a hash table
                         search will be done. If not, a traversal is done through
                         all the hash table 'buckets'..
-         OBJ_KEY      - if set, 'arg', is a search key item that is not an object.
-                        Similar to OBJ_POINTER and mutually exclusive.
-         OBJ_PARTIAL_KEY - if set, 'arg', is a partial search key item that is not an object.
-                        Similar to OBJ_KEY and mutually exclusive.
+         OBJ_SEARCH_KEY - if set, 'arg', is a search key item that is not an object.
+                        Similar to OBJ_SEARCH_OBJECT and mutually exclusive.
+         OBJ_SEARCH_PARTIAL_KEY - if set, 'arg', is a partial search key item that is not an object.
+                        Similar to OBJ_SEARCH_KEY and mutually exclusive.
       - fn is a func that returns int, and takes 3 args:
         (void *obj, void *arg, int flags);
           obj is an object
@@ -859,11 +859,6 @@
 
 /*!
  * \brief Flags passed to ao2_callback_fn(), ao2_hash_fn(), and ao2_sort_fn() to modify behaviour.
- *
- * \todo XXX OBJ_POINTER, OBJ_KEY, and OBJ_PARTIAL_KEY need to
- * be put into a bit field like OBJ_ORDER_MASK since they are
- * mutually exclusive.  This change unfortunately is not
- * backwards compatible.
  */
 enum search_flags {
 	/*!
@@ -881,6 +876,59 @@
 	 * result of of the callback function has the CMP_STOP bit set.
 	 */
 	OBJ_MULTIPLE = (1 << 2),
+	/*!
+	 * \brief Continue if a match is not found.
+	 *
+	 * \details
+	 * This flag forces a whole container search.  The
+	 * OBJ_SEARCH_OBJECT, OBJ_SEARCH_KEY, and OBJ_SEARCH_PARTIAL_KEY
+	 * flags just specify where to start the search in the
+	 * container.  If the search is not stopped early then the
+	 * search _continues_ until the search wraps around to the
+	 * starting point.
+	 *
+	 * Normal searches start where the search key specifies to start
+	 * and end when the search key indicates that the object is not
+	 * in the container.
+	 *
+	 * For hash containers, this tells the ao2_callback() core to
+	 * keep searching through the rest of the buckets if a match is
+	 * not found in the starting bucket defined by the hash value on
+	 * the argument.
+	 *
+	 * For rbtree containers, if the search key is not in the
+	 * container, the search will start either at the first item
+	 * before the search key or the first item after the search key.
+	 *
+	 * \note The supplied ao2_callback_fn is called for every node
+	 * in the container from the starting point.
+	 */
+	OBJ_CONTINUE = (1 << 3),
+	/*!
+	 * \brief Assume that the ao2_container is already locked.
+	 *
+	 * \note For ao2_containers that have mutexes, no locking will
+	 * be done.
+	 *
+	 * \note For ao2_containers that have RWLOCKs, the lock will be
+	 * promoted to write mode as needed.  The lock will be returned
+	 * to the original locked state.
+	 *
+	 * \note Only use this flag if the ao2_container is manually
+	 * locked already.
+	 */
+	OBJ_NOLOCK = (1 << 4),
+
+	/*!
+	 * \brief Search option field mask.
+	 *
+	 * \todo Eventually OBJ_SEARCH_MASK will shrink to a two bit
+	 * field when the codebase is made to use the search field

[... 4836 lines stripped ...]



More information about the asterisk-commits mailing list