[svn-commits] rmudgett: branch group/performance r400396 - in /team/group/performance: ./ a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 3 13:32:41 CDT 2013


Author: rmudgett
Date: Thu Oct  3 13:32:30 2013
New Revision: 400396

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400396
Log:
Bring performance branch up to date with v12.

Added:
    team/group/performance/configs/pjsip_notify.conf.sample
      - copied unchanged from r400373, branches/12/configs/pjsip_notify.conf.sample
    team/group/performance/doc/astdb2bdb.8
      - copied unchanged from r400373, branches/12/doc/astdb2bdb.8
    team/group/performance/doc/astdb2sqlite3.8
      - copied unchanged from r400373, branches/12/doc/astdb2sqlite3.8
Modified:
    team/group/performance/   (props changed)
    team/group/performance/CHANGES
    team/group/performance/Makefile
    team/group/performance/apps/app_cdr.c
    team/group/performance/apps/app_queue.c
    team/group/performance/apps/app_stack.c
    team/group/performance/channels/chan_dahdi.c
    team/group/performance/channels/chan_iax2.c
    team/group/performance/channels/chan_sip.c
    team/group/performance/channels/chan_vpb.cc
    team/group/performance/channels/sig_analog.c
    team/group/performance/channels/sig_pri.c
    team/group/performance/channels/sig_ss7.c
    team/group/performance/channels/sip/include/sip.h
    team/group/performance/channels/sip/reqresp_parser.c
    team/group/performance/configs/features.conf.sample
    team/group/performance/configs/pjsip.conf.sample
    team/group/performance/configs/res_parking.conf.sample
    team/group/performance/configs/sip.conf.sample
    team/group/performance/configure
    team/group/performance/configure.ac
    team/group/performance/funcs/func_cdr.c
    team/group/performance/include/asterisk/astobj2.h
    team/group/performance/include/asterisk/res_pjsip.h
    team/group/performance/include/asterisk/sem.h
    team/group/performance/include/asterisk/stasis_app.h
    team/group/performance/include/asterisk/vector.h
    team/group/performance/main/astobj2.c
    team/group/performance/main/cdr.c
    team/group/performance/main/cel.c
    team/group/performance/main/features_config.c
    team/group/performance/main/json.c
    team/group/performance/main/manager.c
    team/group/performance/main/pbx.c
    team/group/performance/main/sem.c
    team/group/performance/main/stasis.c
    team/group/performance/main/stasis_cache.c
    team/group/performance/main/stasis_message_router.c
    team/group/performance/main/taskprocessor.c
    team/group/performance/main/utils.c
    team/group/performance/res/ari/resource_channels.c
    team/group/performance/res/res_ari.c
    team/group/performance/res/res_parking.c
    team/group/performance/res/res_pjsip.c
    team/group/performance/res/res_pjsip.exports.in
    team/group/performance/res/res_pjsip_notify.c
    team/group/performance/res/res_pjsip_outbound_registration.c
    team/group/performance/res/res_pjsip_sdp_rtp.c
    team/group/performance/res/res_pjsip_session.c
    team/group/performance/res/res_pjsip_t38.c
    team/group/performance/res/res_rtp_asterisk.c
    team/group/performance/res/stasis/control.c
    team/group/performance/res/stasis_recording/stored.c
    team/group/performance/rest-api/api-docs/asterisk.json
    team/group/performance/tests/test_astobj2.c
    team/group/performance/tests/test_taskprocessor.c

Propchange: team/group/performance/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/group/performance/
------------------------------------------------------------------------------
--- performance-integrated (original)
+++ performance-integrated Thu Oct  3 13:32:30 2013
@@ -1,1 +1,1 @@
-/branches/12:1-399935
+/branches/12:1-400375

Modified: team/group/performance/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/CHANGES?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/CHANGES (original)
+++ team/group/performance/CHANGES Thu Oct  3 13:32:30 2013
@@ -853,6 +853,10 @@
 
  * Added 'ignore_requested_pref'. When enabled, this will use the preferred
    codecs configured for a peer instead of the requested codec.
+
+ * The option "register_retry_403" has been added to chan_sip to work around
+   servers that are known to erroneously send 403 in response to valid
+   REGISTER requests and allows Asterisk to continue attepmting to connect.
 
 chan_skinny
 ------------------

Modified: team/group/performance/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/Makefile?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/Makefile (original)
+++ team/group/performance/Makefile Thu Oct  3 13:32:30 2013
@@ -578,6 +578,7 @@
 	$(INSTALL) -m 644 doc/snapshots.xslt "$(DESTDIR)$(ASTDATADIR)/documentation"
 	$(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
 	$(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
+	$(INSTALL) -m 644 doc/astdb*.8 "$(DESTDIR)$(ASTMANDIR)/man8"
 	$(INSTALL) -m 644 contrib/scripts/astgenkey.8 "$(DESTDIR)$(ASTMANDIR)/man8"
 	$(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
 	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"

Modified: team/group/performance/apps/app_cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/app_cdr.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/apps/app_cdr.c (original)
+++ team/group/performance/apps/app_cdr.c Thu Oct  3 13:32:30 2013
@@ -149,7 +149,9 @@
 
 static int unload_module(void)
 {
-	return ast_unregister_application(nocdr_app);
+	ast_unregister_application(nocdr_app);
+	ast_unregister_application(resetcdr_app);
+	return 0;
 }
 
 static int load_module(void)

Modified: team/group/performance/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/app_queue.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/apps/app_queue.c (original)
+++ team/group/performance/apps/app_queue.c Thu Oct  3 13:32:30 2013
@@ -1870,13 +1870,21 @@
 	RAII_VAR(struct ast_str *, event_string, NULL, ast_free);
 
 	caller = ast_multi_channel_blob_get_channel(obj, "caller");
+	if (caller) {
+		caller_event_string = ast_manager_build_channel_state_string(caller);
+		if (!caller_event_string) {
+			ast_log(AST_LOG_NOTICE, "No caller event string, bailing\n");
+			return;
+		}
+	}
+
 	agent = ast_multi_channel_blob_get_channel(obj, "agent");
-
-	caller_event_string = ast_manager_build_channel_state_string(caller);
-	agent_event_string = ast_manager_build_channel_state_string_prefix(agent, "Dest");
-
-	if (!caller_event_string || !agent_event_string) {
-		return;
+	if (agent) {
+		agent_event_string = ast_manager_build_channel_state_string_prefix(agent, "Dest");
+		if (!agent_event_string) {
+			ast_log(AST_LOG_NOTICE, "No agent event string, bailing\n");
+			return;
+		}
 	}
 
 	event_string = ast_manager_str_from_json_object(ast_multi_channel_blob_get_json(obj), NULL);
@@ -1888,8 +1896,8 @@
 		"%s"
 		"%s"
 		"%s",
-		ast_str_buffer(caller_event_string),
-		ast_str_buffer(agent_event_string),
+		caller_event_string ? ast_str_buffer(caller_event_string) : "",
+		agent_event_string ? ast_str_buffer(agent_event_string) : "",
 		ast_str_buffer(event_string));
 }
 
@@ -1925,7 +1933,9 @@
 	}
 
 	ast_multi_channel_blob_add_channel(payload, "caller", caller_snapshot);
-	ast_multi_channel_blob_add_channel(payload, "agent", agent_snapshot);
+	if (agent_snapshot) {
+		ast_multi_channel_blob_add_channel(payload, "agent", agent_snapshot);
+	}
 
 	msg = stasis_message_create(type, payload);
 	if (!msg) {
@@ -5150,9 +5160,6 @@
 	const char *reason = NULL;	/* silence dumb compilers */
 	RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
-	ast_assert(peer != NULL);
-	ast_assert(caller != NULL);
-
 	switch (rsn) {
 	case CALLER:
 		reason = "caller";
@@ -5729,7 +5736,7 @@
 	ast_debug(3, "Detected hangup of queue %s channel %s\n", reason == CALLER ? "caller" : "member",
 			channel_blob->snapshot->name);
 
-	ast_queue_log(queue_data->queue->name, caller_snapshot->uniqueid, queue_data->member->membername,
+	ast_queue_log(queue_data->queue->name, queue_data->caller_uniqueid, queue_data->member->membername,
 			reason == CALLER ? "COMPLETECALLER" : "COMPLETEAGENT", "%ld|%ld|%d",
 		(long) (queue_data->starttime - queue_data->holdstart),
 		(long) (time(NULL) - queue_data->starttime), queue_data->caller_pos);

Modified: team/group/performance/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/app_stack.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/apps/app_stack.c (original)
+++ team/group/performance/apps/app_stack.c Thu Oct  3 13:32:30 2013
@@ -1215,8 +1215,7 @@
 		ast_agi_send(agi->fd, chan, "200 result=%d Gosub failed\n", res);
 	}
 
-	/* Must use free because the memory was allocated by asprintf(). */
-	free(gosub_args);
+	ast_free(gosub_args);
 
 	ast_channel_lock(chan);
 	ast_debug(4, "%s Ending location: %s,%s,%d\n", ast_channel_name(chan),

Modified: team/group/performance/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_dahdi.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/chan_dahdi.c (original)
+++ team/group/performance/channels/chan_dahdi.c Thu Oct  3 13:32:30 2013
@@ -9726,16 +9726,34 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if ((p->transfer || p->canpark) && is_exten_parking &&
-						p->subs[SUB_THREEWAY].owner) {
-				RAII_VAR(struct ast_bridge_channel *, bridge_channel, NULL, ao2_cleanup);
-				/* This is a three way call, the main call being a real channel,
-					and we're parking the first call. */
-				ast_channel_lock(chan);
-				bridge_channel = ast_channel_get_bridge_channel(chan);
-				ast_channel_unlock(chan);
-				if (bridge_channel && !ast_parking_blind_transfer_park(bridge_channel, ast_channel_context(chan), exten)) {
-					ast_verb(3, "Parking call to '%s'\n", ast_channel_name(chan));
+			} else if ((p->transfer || p->canpark) && is_exten_parking
+				&& p->subs[SUB_THREEWAY].owner) {
+				struct ast_bridge_channel *bridge_channel;
+
+				/*
+				 * This is a three way call, the main call being a real channel,
+				 * and we're parking the first call.
+				 */
+				ast_channel_lock(p->subs[SUB_THREEWAY].owner);
+				bridge_channel = ast_channel_get_bridge_channel(p->subs[SUB_THREEWAY].owner);
+				ast_channel_unlock(p->subs[SUB_THREEWAY].owner);
+				if (bridge_channel) {
+					if (!ast_parking_blind_transfer_park(bridge_channel, ast_channel_context(chan), exten)) {
+						/*
+						 * Swap things around between the three-way and real call so we
+						 * can hear where the channel got parked.
+						 */
+						ast_mutex_lock(&p->lock);
+						p->owner = p->subs[SUB_THREEWAY].owner;
+						swap_subs(p, SUB_THREEWAY, SUB_REAL);
+						ast_mutex_unlock(&p->lock);
+
+						ast_verb(3, "%s: Parked call\n", ast_channel_name(chan));
+						ast_hangup(chan);
+						ao2_ref(bridge_channel, -1);
+						goto quit;
+					}
+					ao2_ref(bridge_channel, -1);
 				}
 				break;
 			} else if (p->hidecallerid && !strcmp(exten, "*82")) {

Modified: team/group/performance/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_iax2.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/chan_iax2.c (original)
+++ team/group/performance/channels/chan_iax2.c Thu Oct  3 13:32:30 2013
@@ -8615,7 +8615,7 @@
 		"cause", "Expired");
 	ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
 	/* modify entry in peercnts table as _not_ registered */
-	peercnt_modify(0, 0, &peer->addr);
+	peercnt_modify((unsigned char) 0, 0, &peer->addr);
 	/* Reset the address */
 	memset(&peer->addr, 0, sizeof(peer->addr));
 	/* Reset expiry value */
@@ -8759,7 +8759,7 @@
 		}
 
 		/* modify entry in peercnts table as _not_ registered */
-		peercnt_modify(0, 0, &p->addr);
+		peercnt_modify((unsigned char) 0, 0, &p->addr);
 
 		/* Stash the IP address from which they registered */
 		ast_sockaddr_from_sin(&p->addr, sin);
@@ -8796,7 +8796,7 @@
 
 	/* modify entry in peercnts table as registered */
 	if (p->maxcallno) {
-		peercnt_modify(1, p->maxcallno, &p->addr);
+		peercnt_modify((unsigned char) 1, p->maxcallno, &p->addr);
 	}
 
 	/* Make sure our call still exists, an INVAL at the right point may make it go away */
@@ -12417,7 +12417,7 @@
 			peer->pokefreqok = DEFAULT_FREQ_OK;
 			peer->pokefreqnotok = DEFAULT_FREQ_NOTOK;
 			peer->maxcallno = 0;
-			peercnt_modify(0, 0, &peer->addr);
+			peercnt_modify((unsigned char) 0, 0, &peer->addr);
 			peer->calltoken_required = CALLTOKEN_DEFAULT;
 			ast_string_field_set(peer,context,"");
 			ast_string_field_set(peer,peercontext,"");
@@ -12605,7 +12605,7 @@
 				if (sscanf(v->value, "%10hu", &peer->maxcallno) != 1) {
 					ast_log(LOG_WARNING, "maxcallnumbers must be set to a valid number. %s is not valid at line %d.\n", v->value, v->lineno);
 				} else {
-					peercnt_modify(1, peer->maxcallno, &peer->addr);
+					peercnt_modify((unsigned char) 1, peer->maxcallno, &peer->addr);
 				}
 			} else if (!strcasecmp(v->name, "requirecalltoken")) {
 				/* default is required unless in optional ip list */

Modified: team/group/performance/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_sip.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/chan_sip.c (original)
+++ team/group/performance/channels/chan_sip.c Thu Oct  3 13:32:30 2013
@@ -819,6 +819,7 @@
 static int global_rtpkeepalive;     /*!< Send RTP keepalives */
 static int global_reg_timeout;      /*!< Global time between attempts for outbound registrations */
 static int global_regattempts_max;  /*!< Registration attempts before giving up */
+static int global_reg_retry_403;    /*!< Treat 403 responses to registrations as 401 responses */
 static int global_shrinkcallerid;   /*!< enable or disable shrinking of caller id  */
 static int global_callcounter;      /*!< Enable call counters for all devices. This is currently enabled by setting the peer
                                      *   call-limit to INT_MAX. When we remove the call-limit from the code, we can make it
@@ -18712,9 +18713,9 @@
 					      int sipmethod, const char *uri, enum xmittype reliable,
 					      struct ast_sockaddr *addr, struct sip_peer **authpeer)
 {
-	char from[256] = "", *of, *name, *unused_password, *domain;
+	char from[256], *of, *name, *unused_password, *domain;
 	enum check_auth_result res = AUTH_DONT_KNOW;
-	char calleridname[50];
+	char calleridname[256];
 	char *uri2 = ast_strdupa(uri);
 
 	terminate_uri(uri2);	/* trim extra stuff */
@@ -21154,6 +21155,7 @@
 	ast_cli(a->fd, "  Sub. max duration:      %d secs\n", max_subexpiry);
 	ast_cli(a->fd, "  Outbound reg. timeout:  %d secs\n", global_reg_timeout);
 	ast_cli(a->fd, "  Outbound reg. attempts: %d\n", global_regattempts_max);
+	ast_cli(a->fd, "  Outbound reg. retry 403:%d\n", global_reg_retry_403);
 	ast_cli(a->fd, "  Notify ringing state:   %s\n", AST_CLI_YESNO(sip_cfg.notifyringing));
 	if (sip_cfg.notifyringing) {
 		ast_cli(a->fd, "    Include CID:          %s%s\n",
@@ -23261,6 +23263,15 @@
 					ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
 				}
 			ast_rtp_instance_activate(p->rtp);
+		} else if (!reinvite) {
+			struct ast_sockaddr remote_address = {{0,}};
+
+			ast_rtp_instance_get_remote_address(p->rtp, &remote_address);
+			if (ast_sockaddr_isnull(&remote_address) || (!ast_strlen_zero(p->theirprovtag) && strcmp(p->theirtag, p->theirprovtag))) {
+				ast_log(LOG_WARNING, "Received response: \"200 OK\" from '%s' without SDP\n", p->relatedpeer->name);
+				ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
+				ast_rtp_instance_activate(p->rtp);
+			}
 		}
 
 		if (!req->ignore && p->owner) {
@@ -24211,7 +24222,11 @@
 
 		gettag(req, "To", tag, sizeof(tag));
 		ast_string_field_set(p, theirtag, tag);
-	}
+	} else {
+		/* Store theirtag to track for changes when 200 responses to invites are received without SDP */
+		ast_string_field_set(p, theirprovtag, p->theirtag);
+	}
+
 	/* This needs to be configurable on a channel/peer level,
 	   not mandatory for all communication. Sadly enough, NAT implementations
 	   are not so stable so we can always rely on these headers.
@@ -31379,6 +31394,7 @@
 	sip_cfg.compactheaders = DEFAULT_COMPACTHEADERS;
 	global_reg_timeout = DEFAULT_REGISTRATION_TIMEOUT;
 	global_regattempts_max = 0;
+	global_reg_retry_403 = 0;
 	sip_cfg.pedanticsipchecking = DEFAULT_PEDANTIC;
 	sip_cfg.autocreatepeer = DEFAULT_AUTOCREATEPEER;
 	global_autoframing = 0;
@@ -31767,6 +31783,8 @@
 			}
 		} else if (!strcasecmp(v->name, "registerattempts")) {
 			global_regattempts_max = atoi(v->value);
+		} else if (!strcasecmp(v->name, "register_retry_403")) {
+			global_reg_retry_403 = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "bindaddr") || !strcasecmp(v->name, "udpbindaddr")) {
 			if (ast_parse_arg(v->value, PARSE_ADDR, &bindaddr)) {
 				ast_log(LOG_WARNING, "Invalid address: %s\n", v->value);

Modified: team/group/performance/channels/chan_vpb.cc
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_vpb.cc?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/chan_vpb.cc (original)
+++ team/group/performance/channels/chan_vpb.cc Thu Oct  3 13:32:30 2013
@@ -2673,10 +2673,12 @@
 	struct ast_format tmpfmt;
 	int num_cards = 0;
 
-	if (!(vpb_tech.capabilities = ast_format_cap_alloc())) {
+	vpb_tech.capabilities = ast_format_cap_alloc((enum ast_format_cap_flags) 0);
+	if (!vpb_tech.capabilities) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
-	if (!(vpb_tech_indicate.capabilities = ast_format_cap_alloc())) {
+	vpb_tech_indicate.capabilities = ast_format_cap_alloc((enum ast_format_cap_flags) 0);
+	if (!vpb_tech_indicate.capabilities) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 	ast_format_cap_add(vpb_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));

Modified: team/group/performance/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/sig_analog.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/sig_analog.c (original)
+++ team/group/performance/channels/sig_analog.c Thu Oct  3 13:32:30 2013
@@ -2245,18 +2245,35 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if ((p->transfer || p->canpark) && is_exten_parking &&
-						p->subs[ANALOG_SUB_THREEWAY].owner) {
+			} else if ((p->transfer || p->canpark) && is_exten_parking
+				&& p->subs[ANALOG_SUB_THREEWAY].owner) {
 				struct ast_bridge_channel *bridge_channel;
-				/* This is a three way call, the main call being a real channel,
-					and we're parking the first call. */
-				ast_channel_lock(chan);
-				bridge_channel = ast_channel_get_bridge_channel(chan);
-				ast_channel_unlock(chan);
-				if (bridge_channel && !ast_parking_blind_transfer_park(bridge_channel, ast_channel_context(chan), exten)) {
-					ast_verb(3, "Parking call to '%s'\n", ast_channel_name(chan));
-				}
-				ao2_ref(bridge_channel, -1);
+
+				/*
+				 * This is a three way call, the main call being a real channel,
+				 * and we're parking the first call.
+				 */
+				ast_channel_lock(p->subs[ANALOG_SUB_THREEWAY].owner);
+				bridge_channel = ast_channel_get_bridge_channel(p->subs[ANALOG_SUB_THREEWAY].owner);
+				ast_channel_unlock(p->subs[ANALOG_SUB_THREEWAY].owner);
+				if (bridge_channel) {
+					if (!ast_parking_blind_transfer_park(bridge_channel, ast_channel_context(chan), exten)) {
+						/*
+						 * Swap things around between the three-way and real call so we
+						 * can hear where the channel got parked.
+						 */
+						analog_lock_private(p);
+						analog_set_new_owner(p, p->subs[ANALOG_SUB_THREEWAY].owner);
+						analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
+						analog_unlock_private(p);
+
+						ast_verb(3, "%s: Parked call\n", ast_channel_name(chan));
+						ast_hangup(chan);
+						ao2_ref(bridge_channel, -1);
+						goto quit;
+					}
+					ao2_ref(bridge_channel, -1);
+				}
 				break;
 			} else if (!ast_strlen_zero(p->lastcid_num) && !strcmp(exten, "*60")) {
 				ast_verb(3, "Blacklisting number %s\n", p->lastcid_num);

Modified: team/group/performance/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/sig_pri.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/sig_pri.c (original)
+++ team/group/performance/channels/sig_pri.c Thu Oct  3 13:32:30 2013
@@ -6473,6 +6473,7 @@
 						ast_mutex_lock(&pri->lock);
 						sig_pri_lock_private(pri->pvts[chanpos]);
 						if (c) {
+							ast_channel_stage_snapshot(c);
 #if defined(HAVE_PRI_SUBADDR)
 							if (e->ring.calling.subaddress.valid) {
 								/* Set Calling Subaddress */
@@ -6557,6 +6558,7 @@
 									PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
 #endif
 							}
+							ast_channel_stage_snapshot_done(c);
 						}
 						if (c && !ast_pthread_create_detached(&threadid, NULL, pri_ss_thread, pri->pvts[chanpos])) {
 							ast_verb(3, "Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d\n",
@@ -6602,6 +6604,7 @@
 							 * will do anything with the channel we have just
 							 * created.
 							 */
+							ast_channel_stage_snapshot(c);
 #if defined(HAVE_PRI_SUBADDR)
 							if (e->ring.calling.subaddress.valid) {
 								/* Set Calling Subaddress */
@@ -6670,6 +6673,8 @@
 
 							sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.subcmds,
 								e->ring.call);
+
+							ast_channel_stage_snapshot_done(c);
 						}
 						if (c && !ast_pbx_start(c)) {
 							ast_verb(3, "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",

Modified: team/group/performance/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/sig_ss7.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/sig_ss7.c (original)
+++ team/group/performance/channels/sig_ss7.c Thu Oct  3 13:32:30 2013
@@ -42,6 +42,7 @@
 #include "asterisk/musiconhold.h"
 #include "asterisk/cli.h"
 #include "asterisk/transcap.h"
+#include "asterisk/stasis_channels.h"
 
 #include "sig_ss7.h"
 #if defined(LIBSS7_ABI_COMPATIBILITY)
@@ -621,6 +622,8 @@
 
 	sig_ss7_set_echocanceller(p, 1);
 
+	ast_channel_stage_snapshot(c);
+
 	/*
 	 * It is reasonably safe to set the following
 	 * channel variables while the channel private
@@ -699,6 +702,8 @@
 		/* Clear this after we set it */
 		p->generic_name[0] = 0;
 	}
+
+	ast_channel_stage_snapshot_done(c);
 
 	sig_ss7_unlock_private(p);
 	ast_channel_unlock(c);

Modified: team/group/performance/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/sip/include/sip.h?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/sip/include/sip.h (original)
+++ team/group/performance/channels/sip/include/sip.h Thu Oct  3 13:32:30 2013
@@ -1019,6 +1019,7 @@
 		AST_STRING_FIELD(rdnis);        /*!< Referring DNIS */
 		AST_STRING_FIELD(redircause);   /*!< Referring cause */
 		AST_STRING_FIELD(theirtag);     /*!< Their tag */
+		AST_STRING_FIELD(theirprovtag); /*!< Provisional their tag, used when evaluating responses to invites */
 		AST_STRING_FIELD(tag);          /*!< Our tag for this session */
 		AST_STRING_FIELD(username);     /*!< [user] name */
 		AST_STRING_FIELD(peername);     /*!< [peer] name, not set if [user] */

Modified: team/group/performance/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/sip/reqresp_parser.c?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/channels/sip/reqresp_parser.c (original)
+++ team/group/performance/channels/sip/reqresp_parser.c Thu Oct  3 13:32:30 2013
@@ -806,7 +806,7 @@
 int get_name_and_number(const char *hdr, char **name, char **number)
 {
 	char header[256];
-	char tmp_name[50];
+	char tmp_name[256];
 	char *tmp_number = NULL;
 	char *hostport = NULL;
 	char *dummy = NULL;

Modified: team/group/performance/configs/features.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/configs/features.conf.sample?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/configs/features.conf.sample (original)
+++ team/group/performance/configs/features.conf.sample Thu Oct  3 13:32:30 2013
@@ -1,101 +1,10 @@
 ;
-; Sample Call Features (parking, transfer, etc) configuration
+; Sample Call Features (transfer, monitor/mixmonitor, etc) configuration
 ;
 
+; Asterisk 12 Note - All parking lot configuration is now done in res_parking.conf
+
 [general]
-parkext => 700                  ; What extension to dial to park.  Set per parking lot.
-;parkext_exclusive=yes          ; Specify that the parkext created for this parking lot
-                                ; will only access this parking lot. (default is no)
-parkpos => 701-720              ; What extensions to park calls on. (defafult parking lot)
-                                ; These need to be numeric, as Asterisk starts from the start position
-                                ; and increments with one for the next parked call.
-                                ; Set per parking lot.
-context => parkedcalls          ; Which context parked calls are in (default parking lot)
-                                ; Set per parking lot.
-;parkinghints = no              ; Add hints priorities automatically for parking slots (default is no).
-                                ; Set per parking lot.
-;parkingtime => 45              ; Number of seconds a call can be parked before returning.
-                                ; Set per parking lot. (default is 45 seconds)
-
-;comebacktoorigin = yes         ; Setting this option configures the behavior of call parking when the
-                                ; parked call times out (See the parkingtime option).  The default value is 'yes'.
-                                ; Set per parking lot.
-                                ;
-                                ; 'yes' - When the parked call times out, attempt to send the call back to the peer
-                                ;         that parked this call. This is done by saving off the name of the channel
-                                ;         that parked the call. The call will return to the context 'park-dial' and
-                                ;         an extension created based on the name of the channel that originally parked
-                                ;         the call.  This extension will be created automatically to do a Dial() to the
-                                ;         device that originally parked the call for comebacktodialtime seconds. If the
-                                ;         call is not answered, the call will proceed to the next priority (usually none
-                                ;         unless you deliberately set up a catch-all second priority in the park-call
-                                ;         context) in the dialplan for extension matching the peer name (same as how
-                                ;         peer names are flattened into extensions when comebacktoorigin is 'no').
-                                ;
-                                ; 'no'  - This option is useful for performing custom dialplan functionality prior to
-                                ;         sending the call back to the extension that initially parked the call, or to
-                                ;         an entirely different destination.
-                                ;
-                                ;         When the parked call times out, send it back to the dialplan.  The location
-                                ;         will be defined by the comebackcontext option. The extension will be built from
-                                ;         the saved channel name that parked the call. For example, if a SIP peer named
-                                ;         '0004F2040001' parked this call, the extension will be 'SIP_0004F2040001'.
-                                ;         (Note that an underscore is used here because the '/' character has a special
-                                ;         meaning in extension names for CallerID matching.)  If this extension does not
-                                ;         exist, the call will be sent to the 's' extension, instead.  Finally, if the 's'
-                                ;         extension of 'parkedcallstimeout' does not exist, the call will fall back to the
-                                ;         's' extension of the 'default' context.
-                                ;
-                                ;         Additionally, in this example an extension of 'SIP_0004F2040001' will be
-                                ;         created in the 'park-dial' context.  This extension will be set up to do a
-                                ;         Dial() to 'SIP/0004F2040001'.
-                                ;
-                                ;         During the timeout procedure, the following variables are set
-                                ;         PARKINGSLOT - extension that the call was parked in prior to timing out
-                                ;         PARKEDLOT - name of the lot that the call was parked in prior to timing out
-                                ;         PARKER - name of the device that parked the call
-
-;comebackdialtime = 30          ; When a parked call times out, this is the number of seconds to dial the device that
-                                ; originally parked the call.  It is also available as a channel variable COMEBACKDIALTIME
-                                ; after a parked call has timed out.
-                                ; The default value is 30 seconds.
-                                ; Set per parking lot.
-
-;comebackcontext = parkedcallstimeout
-                                ; The context a timed out call will return to if comebcktoorigin=no.
-                                ; The default value is 'parkedcallstimeout'.
-                                ; Set per parking lot.
-
-;courtesytone = beep            ; Sound file to play to when someone picks up a parked call
-                                ; and also when the Touch Monitor is activated/deactivated.
-                                ; Default is no tone.
-;parkedplay = caller            ; Who to play courtesytone to when picking up a parked call.
-                                ; One of: parked, caller, both  (default is caller)
-                                ; Operates on all parking lots.
-;parkedcalltransfers = caller   ; Enables or disables DTMF based transfers when picking up a parked call.
-                                ; one of: callee, caller, both, no (default is no)
-                                ; Set per parking lot.
-;parkedcallreparking = caller   ; Enables or disables DTMF based parking when picking up a parked call.
-                                ; one of: callee, caller, both, no (default is no)
-                                ; Set per parking lot.
-;parkedcallhangup = caller      ; Enables or disables DTMF based hangups when picking up a parked call.
-                                ; one of: callee, caller, both, no (default is no)
-                                ; Set per parking lot.
-;parkedcallrecording = caller   ; Enables or disables DTMF based one-touch recording when picking up a parked call.
-                                ; one of: callee, caller, both, no (default is no)
-                                ; Set per parking lot.
-;parkeddynamic = yes            ; Enables dynamically created parkinglots. (default is no)
-                                ; Operates on all parking lots.
-;adsipark = yes                 ; if you want ADSI parking announcements
-                                ; Operates on all parking lots.
-;findslot => next               ; Continue to the 'next' free parking space.
-                                ; Defaults to 'first' available
-                                ; Set per parking lot.
-;parkedmusicclass=default       ; This is the MOH class to use for the parked channel
-                                ; as long as the class is not set on the channel directly
-                                ; using Set(CHANNEL(musicclass)=whatever) in the dialplan
-                                ; Set per parking lot.
-
 ;transferdigittimeout => 3      ; Number of seconds to wait between digits when transferring a call
                                 ; (default is 3 seconds)
 ;xfersound = beep               ; to indicate an attended transfer is complete
@@ -116,29 +25,10 @@
 ;atxfercallbackretries = 2      ; Number of times to attempt to send the call back to the transferer.
                                 ; By default, this is 2.
 
-;
-;*** Define another parking lot
-;
-; You can set parkinglot with the CHANNEL dialplan function
-; or by setting 'parkinglot' directly in the channel configuration file.
-;
-; (Note: Leading '0's and any non-numerical characters on parkpos extensions
-;  will be ignored.  Parkext on the other hand can be any string.)
-;
-;[parkinglot_edvina]
-;context => edvinapark
-;parkext => 799
-;parkpos => 800-850
-;findslot => next
-;comebacktoorigin = no
-;comebackdialtime = 90
-;comebackcontext = edvinapark-timeout ; Make sure you create the context!
-;parkedmusicclass = edvina
 
 ; Note that the DTMF features listed below only work when two channels have answered and are bridged together.
 ; They can not be used while the remote party is ringing or in progress. If you require this feature you can use
 ; chan_local in combination with Answer to accomplish it.
-
 
 [featuremap]
 ;blindxfer => #1                ; Blind transfer  (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call!

Modified: team/group/performance/configs/pjsip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/configs/pjsip.conf.sample?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/configs/pjsip.conf.sample (original)
+++ team/group/performance/configs/pjsip.conf.sample Thu Oct  3 13:32:30 2013
@@ -147,6 +147,7 @@
 ;client_uri=sip:1234567890 at sip.example.com
 ;contact_user=1234567890
 ;retry_interval=60
+;forbidden_retry_interval=600
 ;expiration=3600
 
 ;[mytrunk_auth]

Modified: team/group/performance/configs/res_parking.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/configs/res_parking.conf.sample?view=diff&rev=400396&r1=400395&r2=400396
==============================================================================
--- team/group/performance/configs/res_parking.conf.sample (original)
+++ team/group/performance/configs/res_parking.conf.sample Thu Oct  3 13:32:30 2013
@@ -1,48 +1,121 @@
 [general]
-;parkeddynamic = yes        ; Enables dynamically created parkinglots. (default is no)
-
+;parkeddynamic = yes            ; Enables dynamically created parkinglots. (default is no)
 
 ; A parking lot named 'default' will automatically be used when no other
 ; named parking lot is indicated for use by the park application or a
-; channel's parkinglot function and PARKINGLOT channel variable.
+; channel's parkinglot function and PARKINGLOT channel variable. This parking
+; lot is guaranteed to exist and will be created even if default is left out of
+; the configuration file.
 
-[default]                                 ; based on the old default from features.conf.sample
-parkext => 700
-;parkext_exclusive=yes
-parkpos => 701-720
-context => parkedcalls
-;parkinghints = no
-;parkingtime => 45
-;comebacktoorigin = yes
-;comebackdialtime = 30
+[default]                       ; Default Parking Lot
+parkext => 700                  ; What extension to dial to park. (optional; if
+                                ; specified, extensions will be created for parkext and
+                                ; the whole range of parkpos)
+
+;parkext_exclusive=yes          ; Specify that the parkext created for this parking lot
+                                ; will only access this parking lot. (default is no)
+
+parkpos => 701-720              ; What range of parking spaces to use - must be numeric
+                                ; Creates these spaces as extensions if parkext is set.
+                                ; Since this value is interpreted numerically, leading 0's
+                                ; will be ignored (so expect 00700-00720 to map to 700-720)
+
+context => parkedcalls          ; Which context parked calls and the default park
+
+;parkinghints = no              ; Add hints priorities automatically for parkpos
+                                ; extensions if parkext is set
+
+;parkingtime => 45              ; Number of seconds a call can be parked before returning
+
+;comebacktoorigin = yes         ; Setting this option configures the behavior of call parking when the
+                                ; parked call times out (See the parkingtime option).  The default value is 'yes'.
+                                ;
+                                ; 'yes' - When the parked call times out, attempt to send the call back to the peer
+                                ;         that parked this call. This is done by saving off the name of the channel
+                                ;         that parked the call. The call will return to the context 'park-dial' and
+                                ;         an extension created based on the name of the channel that originally parked
+                                ;         the call.  This extension will be created automatically to do a Dial() to the
+                                ;         device that originally parked the call for comebacktodialtime seconds. If the
+                                ;         call is not answered, the call will proceed to the next priority (usually none
+                                ;         unless you deliberately set up a catch-all second priority in the park-call
+                                ;         context) in the dialplan for extension matching the peer name (same as how
+                                ;         peer names are flattened into extensions when comebacktoorigin is 'no').
+                                ;
+                                ; 'no'  - This option is useful for performing custom dialplan functionality prior to

[... 2307 lines stripped ...]



More information about the svn-commits mailing list