[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r335492 - in /team/irroot/di...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 12 15:28:18 CDT 2011


Author: irroot
Date: Mon Sep 12 15:28:11 2011
New Revision: 335492

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=335492
Log:
Fix conflicts re enable automerge

Modified:
    team/irroot/distrotech-customers-trunk/   (props changed)
    team/irroot/distrotech-customers-trunk/channels/chan_alsa.c
    team/irroot/distrotech-customers-trunk/channels/chan_console.c
    team/irroot/distrotech-customers-trunk/channels/chan_dahdi.c
    team/irroot/distrotech-customers-trunk/channels/chan_h323.c
    team/irroot/distrotech-customers-trunk/channels/chan_iax2.c
    team/irroot/distrotech-customers-trunk/channels/chan_mgcp.c
    team/irroot/distrotech-customers-trunk/channels/chan_misdn.c
    team/irroot/distrotech-customers-trunk/channels/chan_oss.c
    team/irroot/distrotech-customers-trunk/channels/chan_sip.c
    team/irroot/distrotech-customers-trunk/channels/chan_skinny.c
    team/irroot/distrotech-customers-trunk/channels/chan_unistim.c
    team/irroot/distrotech-customers-trunk/channels/chan_usbradio.c
    team/irroot/distrotech-customers-trunk/channels/sig_ss7.c
    team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h

Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/irroot/distrotech-customers-trunk/
            ('svnmerge-integrated' removed)

Modified: team/irroot/distrotech-customers-trunk/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_alsa.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_alsa.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_alsa.c Mon Sep 12 15:28:11 2011
@@ -536,6 +536,7 @@
 	case AST_CONTROL_BUSY:
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_RINGING:
+	case AST_CONTROL_INCOMPLETE:
 	case -1:
 		res = -1;  /* Ask for inband indications */
 		break;

Modified: team/irroot/distrotech-customers-trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_console.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_console.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_console.c Mon Sep 12 15:28:11 2011
@@ -602,6 +602,7 @@
 	case AST_CONTROL_BUSY:
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_RINGING:
+	case AST_CONTROL_INCOMPLETE:
 	case -1:
 		res = -1;  /* Ask for inband indications */
 		break;

Modified: team/irroot/distrotech-customers-trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_dahdi.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_dahdi.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_dahdi.c Mon Sep 12 15:28:11 2011
@@ -9398,13 +9398,18 @@
 				ast_setstate(chan, AST_STATE_RINGING);
 			}
 			break;
+		case AST_CONTROL_INCOMPLETE:
+			ast_debug(1, "Received AST_CONTROL_INCOMPLETE on %s\n", chan->name);
+			/* act as a progress or proceeding, allowing the caller to enter additional numbers */
+			res = 0;
+			break;
 		case AST_CONTROL_PROCEEDING:
-			ast_debug(1,"Received AST_CONTROL_PROCEEDING on %s\n",chan->name);
+			ast_debug(1, "Received AST_CONTROL_PROCEEDING on %s\n", chan->name);
 			/* don't continue in ast_indicate */
 			res = 0;
 			break;
 		case AST_CONTROL_PROGRESS:
-			ast_debug(1,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
+			ast_debug(1, "Received AST_CONTROL_PROGRESS on %s\n", chan->name);
 			/* don't continue in ast_indicate */
 			res = 0;
 			break;

Modified: team/irroot/distrotech-customers-trunk/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_h323.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_h323.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_h323.c Mon Sep 12 15:28:11 2011
@@ -910,6 +910,10 @@
 			res = 0;
 		}
 		break;
+	case AST_CONTROL_INCOMPLETE:
+		/* While h323 does support overlapped dialing, this channel driver does not
+		 * at this time.  Treat a response of Incomplete as if it were congestion.
+		 */
 	case AST_CONTROL_CONGESTION:
 		if (c->_state != AST_STATE_UP) {
 			h323_answering_call(token, 1);

Modified: team/irroot/distrotech-customers-trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_iax2.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_iax2.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_iax2.c Mon Sep 12 15:28:11 2011
@@ -8573,6 +8573,7 @@
 	if (!(reg = ast_calloc(1, sizeof(*reg))))
 		return -1;
 
+	reg->addr.ss.ss_family = AF_INET;
 	if (ast_dnsmgr_lookup(hostname, &reg->addr, &reg->dnsmgr, srvlookup ? "_iax._udp" : NULL) < 0) {
 		ast_free(reg);
 		return -1;
@@ -12415,6 +12416,7 @@
 		peer->expire = -1;
 		peer->pokeexpire = -1;
 		peer->sockfd = defaultsockfd;
+		peer->addr.ss.ss_family = AF_INET;
 		if (ast_string_field_init(peer, 32))
 			peer = peer_unref(peer);
 	}

Modified: team/irroot/distrotech-customers-trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_mgcp.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_mgcp.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_mgcp.c Mon Sep 12 15:28:11 2011
@@ -1456,6 +1456,10 @@
 	case AST_CONTROL_BUSY:
 		transmit_notify_request(sub, "L/bz");
 		break;
+	case AST_CONTROL_INCOMPLETE:
+		/* We do not currently support resetting of the Interdigit Timer, so treat
+		 * Incomplete control frames as a congestion response
+		 */
 	case AST_CONTROL_CONGESTION:
 		transmit_notify_request(sub, sub->parent->ncs ? "L/cg" : "G/cg");
 		break;

Modified: team/irroot/distrotech-customers-trunk/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_misdn.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_misdn.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_misdn.c Mon Sep 12 15:28:11 2011
@@ -6985,6 +6985,19 @@
 		chan_misdn_log(1, p->bc->port, " --> * IND :\tproceeding pid:%d\n", p->bc->pid);
 		misdn_lib_send_event(p->bc, EVENT_PROCEEDING);
 		break;
+	case AST_CONTROL_INCOMPLETE:
+		chan_misdn_log(1, p->bc->port, " --> *\tincomplete pid:%d\n", p->bc->pid);
+		if (!p->overlap_dial) {
+			/* Overlapped dialing not enabled - send hangup */
+			p->bc->out_cause = AST_CAUSE_INVALID_NUMBER_FORMAT;
+			start_bc_tones(p);
+			misdn_lib_send_event(p->bc, EVENT_DISCONNECT);
+
+			if (p->bc->nt) {
+				hanguptone_indicate(p);
+			}
+		}
+		break;
 	case AST_CONTROL_CONGESTION:
 		chan_misdn_log(1, p->bc->port, " --> * IND :\tcongestion pid:%d\n", p->bc->pid);
 

Modified: team/irroot/distrotech-customers-trunk/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_oss.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_oss.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_oss.c Mon Sep 12 15:28:11 2011
@@ -754,6 +754,7 @@
 	int res = 0;
 
 	switch (cond) {
+	case AST_CONTROL_INCOMPLETE:
 	case AST_CONTROL_BUSY:
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_RINGING:

Modified: team/irroot/distrotech-customers-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_sip.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_sip.c Mon Sep 12 15:28:11 2011
@@ -340,7 +340,7 @@
 	</application>
 	<function name="SIP_HEADER" language="en_US">
 		<synopsis>
-			Gets the specified SIP header.
+			Gets the specified SIP header from an incoming INVITE message.
 		</synopsis>
 		<syntax>
 			<parameter name="name" required="true" />
@@ -352,6 +352,8 @@
 			<para>Since there are several headers (such as Via) which can occur multiple
 			times, SIP_HEADER takes an optional second argument to specify which header with
 			that name to retrieve. Headers start at offset <literal>1</literal>.</para>
+			<para>Please observe that contents of the SDP (an attachment to the 
+			SIP request) can't be accessed with this function.</para>
 		</description>
 	</function>
 	<function name="SIPPEER" language="en_US">
@@ -363,7 +365,7 @@
 			<parameter name="item">
 				<enumlist>
 					<enum name="ip">
-						<para>(default) The ip address.</para>
+						<para>(default) The IP address.</para>
 					</enum>
 					<enum name="port">
 						<para>The port number.</para>
@@ -399,7 +401,7 @@
 						<para>Status (if qualify=yes).</para>
 					</enum>
 					<enum name="regexten">
-						<para>Registration extension.</para>
+						<para>Extension activated at registration.</para>
 					</enum>
 					<enum name="limit">
 						<para>Call limit (call-limit).</para>
@@ -417,7 +419,7 @@
 						<para>Account code for this peer.</para>
 					</enum>
 					<enum name="useragent">
-						<para>Current user agent id for peer.</para>
+						<para>Current user agent header used by peer.</para>
 					</enum>
 					<enum name="maxforwards">
 						<para>The value used for SIP loop prevention in outbound requests</para>
@@ -447,13 +449,13 @@
 						<para>The source IP address of the peer.</para>
 					</enum>
 					<enum name="from">
-						<para>The URI from the <literal>From:</literal> header.</para>
+						<para>The SIP URI from the <literal>From:</literal> header.</para>
 					</enum>
 					<enum name="uri">
-						<para>The URI from the <literal>Contact:</literal> header.</para>
+						<para>The SIP URI from the <literal>Contact:</literal> header.</para>
 					</enum>
 					<enum name="useragent">
-						<para>The useragent.</para>
+						<para>The Useragent header used by the peer.</para>
 					</enum>
 					<enum name="peername">
 						<para>The name of the peer.</para>
@@ -490,8 +492,8 @@
 		</syntax>
 		<description>
 			<para>Lists SIP peers in text format with details on current status.
-			Peerlist will follow as separate events, followed by a final event called
-			PeerlistComplete.</para>
+			<literal>Peerlist</literal> will follow as separate events, followed by a final event called
+			<literal>PeerlistComplete</literal>.</para>
 		</description>
 	</manager>
 	<manager name="SIPshowpeer" language="en_US">
@@ -531,7 +533,7 @@
 		</syntax>
 		<description>
 			<para>Lists all registration requests and status. Registrations will follow as separate
-			events. followed by a final event called RegistrationsComplete.</para>
+			events followed by a final event called <literal>RegistrationsComplete</literal>.</para>
 		</description>
 	</manager>
 	<manager name="SIPnotify" language="en_US">
@@ -551,7 +553,7 @@
 		<description>
 			<para>Sends a SIP Notify event.</para>
 			<para>All parameters for this event must be specified in the body of this request
-			via multiple Variable: name=value sequences.</para>
+			via multiple <literal>Variable: name=value</literal> sequences.</para>
 		</description>
 	</manager>
  ***/
@@ -692,6 +694,7 @@
 static char default_engine[256];                   /*!< Default RTP engine */
 static int default_maxcallbitrate;                 /*!< Maximum bitrate for call */
 static struct ast_codec_pref default_prefs;        /*!< Default codec prefs */
+static char default_zone[MAX_TONEZONE_COUNTRY];        /*!< Default tone zone for channels created from the SIP driver */
 static unsigned int default_transports;            /*!< Default Transports (enum sip_transport) that are acceptable */
 static unsigned int default_primary_transport;     /*!< Default primary Transport (enum sip_transport) for outbound connections to devices */
 /*@}*/
@@ -5215,6 +5218,7 @@
 	ref_proxy(dialog, obproxy_get(dialog, peer));
 	dialog->callgroup = peer->callgroup;
 	dialog->pickupgroup = peer->pickupgroup;
+	ast_copy_string(dialog->zone, peer->zone, sizeof(dialog->zone));
 	dialog->allowtransfer = peer->allowtransfer;
 	dialog->jointnoncodeccapability = dialog->noncodeccapability;
 	dialog->rtptimeout = peer->rtptimeout;
@@ -6733,6 +6737,20 @@
 		}
 		res = -1;
 		break;
+	case AST_CONTROL_INCOMPLETE:
+		if (ast->_state != AST_STATE_UP) {
+			if (ast_test_flag(&p->flags[1], SIP_PAGE2_ALLOWOVERLAP)) {
+				transmit_response_reliable(p, "484 Address Incomplete", &p->initreq);
+			} else {
+				transmit_response_reliable(p, "404 Not Found", &p->initreq);
+			}
+			p->invitestate = INV_COMPLETED;
+			sip_alreadygone(p);
+			ast_softhangup_nolock(ast, AST_SOFTHANGUP_DEV);
+			break;
+		}
+		res = 0;
+		break;
 	case AST_CONTROL_PROCEEDING:
 		if ((ast->_state != AST_STATE_UP) &&
 		    !ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
@@ -6988,6 +7006,11 @@
 	}
 	if (!ast_strlen_zero(i->language)) {
 		ast_string_field_set(tmp, language, i->language);
+	}
+	if (!ast_strlen_zero(i->zone)) {
+		if (!(tmp->zone = ast_get_indication_zone(i->zone))) {
+			ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", i->zone);
+		} 
 	}
 	i->owner = tmp;
 	ast_module_ref(ast_module_info->self);
@@ -7521,6 +7544,7 @@
 	p->session_modify = TRUE;
 	p->stimer = NULL;
 	p->prefs = default_prefs;		/* Set default codecs for this call */
+	ast_copy_string(p->zone, default_zone, sizeof(p->zone));
 	p->maxforwards = sip_cfg.default_max_forwards;
 
 	if (intended_method != SIP_OPTIONS) {	/* Peerpoke has it's own system */
@@ -14377,9 +14401,7 @@
 {
 	struct sip_peer *peer = userdata;
 
-	ao2_lock(peer);
 	sip_send_mwi_to_peer(peer, 0);
-	ao2_unlock(peer);
 }
 
 static void network_change_event_subscribe(void)
@@ -15895,6 +15917,7 @@
 		ast_format_cap_copy(p->caps, peer->caps);
 		ast_format_cap_copy(p->jointcaps, peer->caps);
 		p->prefs = peer->prefs;
+		ast_copy_string(p->zone, peer->zone, sizeof(p->zone));
  		if (peer->maxforwards > 0) {
 			p->maxforwards = peer->maxforwards;
 		}
@@ -17384,6 +17407,7 @@
 		ast_cli(fd, "  Context      : %s\n", peer->context);
 		ast_cli(fd, "  Subscr.Cont. : %s\n", S_OR(peer->subscribecontext, "<Not set>") );
 		ast_cli(fd, "  Language     : %s\n", peer->language);
+		ast_cli(fd, "  Tonezone     : %s\n", peer->zone[0] != '\0' ? peer->zone : "<Not set>");
 		if (!ast_strlen_zero(peer->accountcode))
 			ast_cli(fd, "  Accountcode  : %s\n", peer->accountcode);
 		ast_cli(fd, "  AMA flags    : %s\n", ast_cdr_flags2str(peer->amaflags));
@@ -17498,6 +17522,7 @@
 		astman_append(s, "MD5SecretExist: %s\r\n", ast_strlen_zero(peer->md5secret)?"N":"Y");
 		astman_append(s, "Context: %s\r\n", peer->context);
 		astman_append(s, "Language: %s\r\n", peer->language);
+		astman_append(s, "ToneZone: %s\r\n", peer->zone[0] != '\0' ? peer->zone : "<Not set>");
 		if (!ast_strlen_zero(peer->accountcode))
 			astman_append(s, "Accountcode: %s\r\n", peer->accountcode);
 		astman_append(s, "AMAflags: %s\r\n", ast_cdr_flags2str(peer->amaflags));
@@ -17665,6 +17690,7 @@
 		if (!ast_strlen_zero(user->accountcode))
 			ast_cli(a->fd, "  Accountcode  : %s\n", user->accountcode);
 		ast_cli(a->fd, "  AMA flags    : %s\n", ast_cdr_flags2str(user->amaflags));
+		ast_cli(a->fd, "  Tonezone     : %s\n", user->zone[0] != '\0' ? user->zone : "<Not set>");
 		ast_cli(a->fd, "  Transfer mode: %s\n", transfermode2str(user->allowtransfer));
 		ast_cli(a->fd, "  MaxCallBR    : %d kbps\n", user->maxcallbitrate);
 		ast_cli(a->fd, "  CallingPres  : %s\n", ast_describe_caller_presentation(user->callingpres));
@@ -18138,6 +18164,7 @@
 	ast_cli(a->fd, "  Use ClientCode:         %s\n", AST_CLI_YESNO(ast_test_flag(&global_flags[0], SIP_USECLIENTCODE)));
 	ast_cli(a->fd, "  Progress inband:        %s\n", (ast_test_flag(&global_flags[0], SIP_PROG_INBAND) == SIP_PROG_INBAND_NEVER) ? "Never" : (AST_CLI_YESNO(ast_test_flag(&global_flags[0], SIP_PROG_INBAND) != SIP_PROG_INBAND_NO)));
 	ast_cli(a->fd, "  Language:               %s\n", default_language);
+	ast_cli(a->fd, "  Tone zone:              %s\n", default_zone[0] != '\0' ? default_zone : "<Not set>");
 	ast_cli(a->fd, "  MOH Interpret:          %s\n", default_mohinterpret);
 	ast_cli(a->fd, "  MOH Suggest:            %s\n", default_mohsuggest);
 	ast_cli(a->fd, "  Voice Mail Extension:   %s\n", default_vmexten);
@@ -21222,6 +21249,15 @@
 					if (owner)
 						ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
 					break;
+				case 484: /* Address Incomplete */
+					if (owner && sipmethod != SIP_BYE) {
+						if (ast_test_flag(&p->flags[1], SIP_PAGE2_ALLOWOVERLAP)) {
+							ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
+						} else {
+							ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(404));
+						}
+					}
+					break;
 				default:
 					/* Send hangup */	
 					if (owner && sipmethod != SIP_BYE)
@@ -24937,9 +24973,7 @@
 			ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
 			transmit_response(p, "200 OK", req);
 			if (p->relatedpeer) {	/* Send first notification */
-				ao2_lock(p->relatedpeer); /* was WRLOCK */
 				sip_send_mwi_to_peer(p->relatedpeer, 0);
-				ao2_unlock(p->relatedpeer);
 			}
 		} else if (p->subscribed != CALL_COMPLETION) {
 
@@ -25677,14 +25711,18 @@
 		}
 		ast_app_inboxcount(mailbox_str->str, &newmsgs, &oldmsgs);
 	}
+	ao2_lock(peer);
 
 	if (peer->mwipvt) {
 		/* Base message on subscription */
 		p = dialog_ref(peer->mwipvt, "sip_send_mwi_to_peer: Setting dialog ptr p from peer->mwipvt-- should this be done?");
 	} else {
 		/* Build temporary dialog for this message */
-		if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY, NULL)))
+		if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY, NULL))) {
+			ao2_unlock(peer);
 			return -1;
+		}
+
 		/* If we don't set the socket type to 0, then create_addr_from_peer will fail immediately if the peer
 		 * uses any transport other than UDP. We set the type to 0 here and then let create_addr_from_peer copy
 		 * the peer's socket information to the sip_pvt we just allocated
@@ -25712,11 +25750,17 @@
 		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 	}
 
+	/* We have multiple threads (mwi events and monitor retransmits) working with this PVT and as we modify the sip history if that's turned on,
+	   we really need to have a lock on it */
+	sip_pvt_lock(p);
+
 	/* Send MWI */
 	ast_set_flag(&p->flags[0], SIP_OUTGOING);
 	/* the following will decrement the refcount on p as it finishes */
 	transmit_notify_with_mwi(p, newmsgs, oldmsgs, peer->vmexten);
+	sip_pvt_unlock(p);
 	dialog_unref(p, "unref dialog ptr p just before it goes out of scope at the end of sip_send_mwi_to_peer.");
+	ao2_unlock(peer);
 	return 0;
 }
 
@@ -27134,6 +27178,7 @@
 	peer->pickupgroup = 0;
 	peer->maxms = default_qualify;
 	peer->prefs = default_prefs;
+	ast_string_field_set(peer, zone, default_zone);
 	peer->stimer.st_mode_oper = global_st_mode;	/* Session-Timers */
 	peer->stimer.st_ref = global_st_refresher;
 	peer->stimer.st_min_se = global_min_se;
@@ -27264,6 +27309,9 @@
 	if (peer) {
 		/* Already in the list, remove it and it will be added back (or FREE'd)  */
 		found++;
+		/* we've unlinked the peer from the peers container but not unlinked from the peers_by_ip container yet
+		  this leads to a wrong refcounter and the peer object is never destroyed */
+		ao2_t_unlink(peers_by_ip, peer, "ao2_unlink peer from peers_by_ip table");
 		if (!(peer->the_mark))
 			firstpass = 0;
 	} else {
@@ -27524,6 +27572,14 @@
 						deprecation_warning = 0;
 					}
 					peer->deprecated_username = 1;
+				}
+			} else if (!strcasecmp(v->name, "tonezone")) {
+				struct ast_tone_zone *new_zone;
+				if (!(new_zone = ast_get_indication_zone(v->value))) {
+					ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone in device [%s] at line %d. Check indications.conf for available country codes.\n", v->value, peer->name, v->lineno);
+				} else {
+					ast_tone_zone_unref(new_zone);
+					ast_string_field_set(peer, zone, v->value);
 				}
 			} else if (!strcasecmp(v->name, "language")) {
 				ast_string_field_set(peer, language, v->value);
@@ -28159,6 +28215,7 @@
 	default_fromdomain[0] = '\0';
 	default_fromdomainport = 0;
 	default_qualify = DEFAULT_QUALIFY;
+	default_zone[0] = '\0';
 	default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE;
 	ast_copy_string(default_mohinterpret, DEFAULT_MOHINTERPRET, sizeof(default_mohinterpret));
 	ast_copy_string(default_mohsuggest, DEFAULT_MOHSUGGEST, sizeof(default_mohsuggest));
@@ -28368,6 +28425,14 @@
 			ast_copy_string(default_mohinterpret, v->value, sizeof(default_mohinterpret));
 		} else if (!strcasecmp(v->name, "mohsuggest")) {
 			ast_copy_string(default_mohsuggest, v->value, sizeof(default_mohsuggest));
+		} else if (!strcasecmp(v->name, "tonezone")) {
+			struct ast_tone_zone *new_zone;
+			if (!(new_zone = ast_get_indication_zone(v->value))) {
+				ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone in [general] at line %d. Check indications.conf for available country codes.\n", v->value, v->lineno);
+			} else {
+				ast_tone_zone_unref(new_zone);
+				ast_copy_string(default_zone, v->value, sizeof(default_zone));
+			}
 		} else if (!strcasecmp(v->name, "language")) {
 			ast_copy_string(default_language, v->value, sizeof(default_language));
 		} else if (!strcasecmp(v->name, "regcontext")) {

Modified: team/irroot/distrotech-customers-trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_skinny.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_skinny.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_skinny.c Mon Sep 12 15:28:11 2011
@@ -4640,6 +4640,8 @@
 		return "CC Not Possible";
 	case AST_CONTROL_SRCCHANGE:
 		return "Media Source Change";
+	case AST_CONTROL_INCOMPLETE:
+		return "Incomplete";
 	case -1:
 		return "Stop tone";
 	default:
@@ -4743,6 +4745,8 @@
 	case AST_CONTROL_BUSY:
 		setsubstate(sub, SUBSTATE_BUSY);
 		return (d->earlyrtp ? -1 : 0); /* Tell asterisk to provide inband signalling if rtp started */
+	case AST_CONTROL_INCOMPLETE:
+		/* Support for incomplete not supported for chan_skinny; treat as congestion */
 	case AST_CONTROL_CONGESTION:
 		setsubstate(sub, SUBSTATE_CONGESTION);
 		return (d->earlyrtp ? -1 : 0); /* Tell asterisk to provide inband signalling if rtp started */

Modified: team/irroot/distrotech-customers-trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_unistim.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_unistim.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_unistim.c Mon Sep 12 15:28:11 2011
@@ -4215,6 +4215,10 @@
 			break;
 		}
 		return -1;
+	case AST_CONTROL_INCOMPLETE:
+		/* Overlapped dialing is not currently supported for UNIStim.  Treat an indication
+		 * of incomplete as congestion
+		 */
 	case AST_CONTROL_CONGESTION:
 		if (ast->_state != AST_STATE_UP) {
 			sub->alreadygone = 1;

Modified: team/irroot/distrotech-customers-trunk/channels/chan_usbradio.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_usbradio.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_usbradio.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_usbradio.c Mon Sep 12 15:28:11 2011
@@ -2120,7 +2120,9 @@
 		case AST_CONTROL_RINGING:
 			res = cond;
 			break;
-
+		case AST_CONTROL_INCOMPLETE:
+			res = AST_CONTROL_CONGESTION;
+			break;
 		case -1:
 #ifndef	NEW_ASTERISK
 			o->cursound = -1;

Modified: team/irroot/distrotech-customers-trunk/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/sig_ss7.c?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/sig_ss7.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/sig_ss7.c Mon Sep 12 15:28:11 2011
@@ -1569,6 +1569,14 @@
 		/* don't continue in ast_indicate */
 		res = 0;
 		break;
+	case AST_CONTROL_INCOMPLETE:
+		/* If the channel is connected, wait for additional input */
+		if (p->call_level == SIG_SS7_CALL_LEVEL_CONNECT) {
+			res = 0;
+			break;
+		}
+		chan->hangupcause = AST_CAUSE_INVALID_NUMBER_FORMAT;
+		break;
 	case AST_CONTROL_CONGESTION:
 		chan->hangupcause = AST_CAUSE_CONGESTION;
 		break;

Modified: team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h?view=diff&rev=335492&r1=335491&r2=335492
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h (original)
+++ team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h Mon Sep 12 15:28:11 2011
@@ -32,6 +32,7 @@
 #include "asterisk/channel.h"
 #include "asterisk/app.h"
 #include "asterisk/astobj.h"
+#include "asterisk/indications.h"
 
 #ifndef FALSE
 #define FALSE    0
@@ -1032,6 +1033,7 @@
 	struct t38properties t38;             /*!< T38 settings */
 	struct ast_sockaddr udptlredirip;     /*!< Where our T.38 UDPTL should be going if not to us */
 	struct ast_udptl *udptl;              /*!< T.38 UDPTL session */
+	char zone[MAX_TONEZONE_COUNTRY];      /*!< Default tone zone for channels created by this dialog */
 	int callingpres;                      /*!< Calling presentation */
 	int expiry;                         /*!< How long we take to expire */
 	int sessionversion;                 /*!< SDP Session Version */
@@ -1201,6 +1203,7 @@
 		AST_STRING_FIELD(mwi_from);     /*!< Name to place in From header for outgoing NOTIFY requests */
 		AST_STRING_FIELD(engine);       /*!<  RTP Engine to use */
 		AST_STRING_FIELD(unsolicited_mailbox);  /*!< Mailbox to store received unsolicited MWI NOTIFY messages information in */
+		AST_STRING_FIELD(zone);         /*!< Tonezone for this device */
 		);
 	struct sip_socket socket;       /*!< Socket used for this peer */
 	enum sip_transport default_outbound_transport;   /*!< Peer Registration may change the default outbound transport.




More information about the asterisk-commits mailing list