[asterisk-commits] mjordan: branch mjordan/AST_17288 r334572 - in /team/mjordan/AST_17288/1.8: c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 6 17:38:58 CDT 2011


Author: mjordan
Date: Tue Sep  6 17:38:53 2011
New Revision: 334572

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334572
Log:
Fixed issues found by rmudgett and oej

Modified:
    team/mjordan/AST_17288/1.8/channels/chan_dahdi.c
    team/mjordan/AST_17288/1.8/channels/chan_h323.c
    team/mjordan/AST_17288/1.8/channels/chan_sip.c
    team/mjordan/AST_17288/1.8/channels/chan_usbradio.c
    team/mjordan/AST_17288/1.8/channels/sig_pri.c
    team/mjordan/AST_17288/1.8/main/channel.c
    team/mjordan/AST_17288/1.8/main/features.c

Modified: team/mjordan/AST_17288/1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/channels/chan_dahdi.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/channels/chan_dahdi.c (original)
+++ team/mjordan/AST_17288/1.8/channels/chan_dahdi.c Tue Sep  6 17:38:53 2011
@@ -9316,17 +9316,17 @@
 			}
 			break;
 		case AST_CONTROL_INCOMPLETE:
-			ast_debug(1,"Received AST_CONTROL_INCOMPLETE on %s\n",chan->name);
+			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/mjordan/AST_17288/1.8/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/channels/chan_h323.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/channels/chan_h323.c (original)
+++ team/mjordan/AST_17288/1.8/channels/chan_h323.c Tue Sep  6 17:38:53 2011
@@ -903,6 +903,7 @@
 			ast_softhangup_nolock(c, AST_SOFTHANGUP_DEV);
 			res = 0;
 		}
+		break;
 	case AST_CONTROL_BUSY:
 		if (c->_state != AST_STATE_UP) {
 			h323_answering_call(token, 1);

Modified: team/mjordan/AST_17288/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/channels/chan_sip.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/channels/chan_sip.c (original)
+++ team/mjordan/AST_17288/1.8/channels/chan_sip.c Tue Sep  6 17:38:53 2011
@@ -6679,7 +6679,11 @@
 		break;
 	case AST_CONTROL_INCOMPLETE:
 		if (ast->_state != AST_STATE_UP) {
-			transmit_response_reliable(p, "484 Address Incomplete", &p->initreq);
+			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);
@@ -20631,7 +20635,11 @@
 					break;
 				case 484: /* Address Incomplete */
 					if (owner && sipmethod != SIP_BYE) {
-						ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
+						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:

Modified: team/mjordan/AST_17288/1.8/channels/chan_usbradio.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/channels/chan_usbradio.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/channels/chan_usbradio.c (original)
+++ team/mjordan/AST_17288/1.8/channels/chan_usbradio.c Tue Sep  6 17:38:53 2011
@@ -2117,10 +2117,11 @@
 		case AST_CONTROL_BUSY:
 		case AST_CONTROL_CONGESTION:
 		case AST_CONTROL_RINGING:
-		case AST_CONTROL_INCOMPLETE:
 			res = cond;
 			break;
-
+		case AST_CONTROL_INCOMPLETE:
+			res = AST_CONTROL_CONGESTION;
+			break;
 		case -1:
 #ifndef	NEW_ASTERISK
 			o->cursound = -1;

Modified: team/mjordan/AST_17288/1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/channels/sig_pri.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/channels/sig_pri.c (original)
+++ team/mjordan/AST_17288/1.8/channels/sig_pri.c Tue Sep  6 17:38:53 2011
@@ -6927,7 +6927,7 @@
 		 * If we do not support overlap dialing and are past the point where we could receive
 		 * additional digits, treat as a hangup
 		 */
-		if (!((p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) && (p->call_level < SIG_PRI_CALL_LEVEL_OVERLAP))) {
+		if (!((p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) && (p->call_level != SIG_PRI_CALL_LEVEL_OVERLAP))) {
 			if (p->priindication_oob || p->no_b_channel) {
 				chan->hangupcause = AST_CAUSE_INVALID_NUMBER_FORMAT;
 				chan->_softhangup |= AST_SOFTHANGUP_DEV;
@@ -6939,20 +6939,18 @@
 				chan->hangupcause = AST_CAUSE_INVALID_NUMBER_FORMAT;
 				p->progress = 1; /* No need to send plain PROGRESS after this. */
 				if (p->pri && p->pri->pri) {
-					if (!pri_grab(p, p->pri)) {
+					pri_grab(p, p->pri);
 #ifdef HAVE_PRI_PROG_W_CAUSE
-						pri_progress_with_cause(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 1, chan->hangupcause);
+					pri_progress_with_cause(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 1, chan->hangupcause);
 #else
-						pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
+					pri_progress(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1);
 #endif
-						pri_rel(p->pri);
-					} else {
-						ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->pri->span);
-					}
+					pri_rel(p->pri);
 				}
 			}
 			break;
 		}
+		break;
 	case AST_CONTROL_CONGESTION:
 		if (p->priindication_oob || p->no_b_channel) {
 			/* There are many cause codes that generate an AST_CONTROL_CONGESTION. */

Modified: team/mjordan/AST_17288/1.8/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/main/channel.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/main/channel.c (original)
+++ team/mjordan/AST_17288/1.8/main/channel.c Tue Sep  6 17:38:53 2011
@@ -4291,9 +4291,9 @@
 	case AST_CONTROL_READ_ACTION:
 	case AST_CONTROL_AOC:
 	case AST_CONTROL_END_OF_Q:
+		break;
+
 	case AST_CONTROL_INCOMPLETE:
-		break;
-
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_BUSY:
 	case AST_CONTROL_RINGING:
@@ -4450,6 +4450,7 @@
 	case AST_CONTROL_BUSY:
 		ts = ast_get_indication_tone(chan->zone, "busy");
 		break;
+	case AST_CONTROL_INCOMPLETE:
 	case AST_CONTROL_CONGESTION:
 		ts = ast_get_indication_tone(chan->zone, "congestion");
 		break;
@@ -4477,7 +4478,6 @@
 	case AST_CONTROL_READ_ACTION:
 	case AST_CONTROL_AOC:
 	case AST_CONTROL_END_OF_Q:
-	case AST_CONTROL_INCOMPLETE:
 		/* Nothing left to do for these. */
 		res = 0;
 		break;
@@ -5348,6 +5348,12 @@
 					timeout = 0;
 					break;
 
+				case AST_CONTROL_INCOMPLETE:
+					ast_cdr_failed(chan->cdr);
+					*outstate = AST_CONTROL_CONGESTION;
+					timeout = 0;
+					break;
+
 				case AST_CONTROL_CONGESTION:
 					ast_cdr_failed(chan->cdr);
 					*outstate = f->subclass.integer;
@@ -5371,7 +5377,6 @@
 				case AST_CONTROL_CONNECTED_LINE:
 				case AST_CONTROL_REDIRECTING:
 				case AST_CONTROL_CC:
-				case AST_CONTROL_INCOMPLETE:
 				case -1:			/* Ignore -- just stopping indications */
 					break;
 

Modified: team/mjordan/AST_17288/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_17288/1.8/main/features.c?view=diff&rev=334572&r1=334571&r2=334572
==============================================================================
--- team/mjordan/AST_17288/1.8/main/features.c (original)
+++ team/mjordan/AST_17288/1.8/main/features.c Tue Sep  6 17:38:53 2011
@@ -2391,7 +2391,6 @@
 			case AST_CONTROL_UNHOLD:/* Caller requested cancel or party C answer timeout. */
 			case AST_CONTROL_BUSY:
 			case AST_CONTROL_CONGESTION:
-			case AST_CONTROL_INCOMPLETE:
 				if (ast_stream_and_wait(transferer, xfersound, "")) {
 					ast_log(LOG_WARNING, "Failed to play transfer sound!\n");
 				}
@@ -3215,7 +3214,7 @@
  *
  * \note
  * outstate can be:
- * 0, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_INCOMPLETE,
+ * 0, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION,
  * AST_CONTROL_ANSWER, or AST_CONTROL_UNHOLD.  If
  * AST_CONTROL_UNHOLD then the caller channel cancelled the
  * transfer or the dialed channel did not answer before the
@@ -3407,10 +3406,7 @@
 					ast_frfree(f);
 					break;
 				} else if (f->subclass.integer == AST_CONTROL_INCOMPLETE) {
-					state = f->subclass.integer;
-					ast_verb(3, "%s dialed incomplete extension %s\n", chan->name, chan->exten);
-					ast_indicate(caller, AST_CONTROL_INCOMPLETE);
-					ast_frfree(f);
+					ast_verb(3, "%s dialed incomplete extension %s; ignoring\n", chan->name, chan->exten);
 					break;
 				} else if (f->subclass.integer == AST_CONTROL_CONGESTION) {
 					state = f->subclass.integer;




More information about the asterisk-commits mailing list