[svn-commits] branch oej/aum-trunk - r7788 in /team/oej/aum-trunk: ./ apps/ channels/ contr...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jan 4 13:39:19 CST 2006


Author: oej
Date: Wed Jan  4 13:39:15 2006
New Revision: 7788

URL: http://svn.digium.com/view/asterisk?rev=7788&view=rev
Log:
Staying up to date...

Merged revisions 7783-7786 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r7783 | oej | 2006-01-04 14:07:34 +0100 (Wed, 04 Jan 2006) | 2 lines

Issue #5824: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon!

........
r7784 | oej | 2006-01-04 14:49:25 +0100 (Wed, 04 Jan 2006) | 2 lines

Whitespace and formatting changes. /Housekeeping

........
r7785 | oej | 2006-01-04 14:56:11 +0100 (Wed, 04 Jan 2006) | 2 lines

Small typo fix

........
r7786 | mattf | 2006-01-04 15:46:41 +0100 (Wed, 04 Jan 2006) | 2 lines

Fixes for bug #6125

........

Modified:
    team/oej/aum-trunk/   (props changed)
    team/oej/aum-trunk/apps/app_disa.c
    team/oej/aum-trunk/channels/chan_sip.c
    team/oej/aum-trunk/channels/chan_zap.c
    team/oej/aum-trunk/contrib/scripts/managerproxy.pl

Propchange: team/oej/aum-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan  4 13:39:15 2006
@@ -1,1 +1,1 @@
-/trunk:1-7780
+/trunk:1-7787

Modified: team/oej/aum-trunk/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/aum-trunk/apps/app_disa.c?rev=7788&r1=7787&r2=7788&view=diff
==============================================================================
--- team/oej/aum-trunk/apps/app_disa.c (original)
+++ team/oej/aum-trunk/apps/app_disa.c Wed Jan  4 13:39:15 2006
@@ -146,12 +146,12 @@
 	}
 	
 	if (ast_set_write_format(chan,AST_FORMAT_ULAW)) {
-		ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n",chan->name);
+		ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n", chan->name);
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
 	if (ast_set_read_format(chan,AST_FORMAT_ULAW)) {
-		ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n",chan->name);
+		ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n", chan->name);
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
@@ -198,8 +198,7 @@
 	for (;;) {
 		  /* if outa time, give em reorder */
 		if (ast_tvdiff_ms(ast_tvnow(), lastdigittime) > 
-		    ((k&2) ? digittimeout : firstdigittimeout))
-		{
+		    ((k&2) ? digittimeout : firstdigittimeout)) {
 			ast_log(LOG_DEBUG,"DISA %s entry timeout on chan %s\n",
 				((k&1) ? "extension" : "password"),chan->name);
 			break;
@@ -210,14 +209,12 @@
 		}
 			
 		f = ast_read(chan);
-		if (f == NULL) 
-		{
+		if (f == NULL) {
 			LOCAL_USER_REMOVE(u);
 			return -1;
 		}
 		if ((f->frametype == AST_FRAME_CONTROL) &&
-		    (f->subclass == AST_CONTROL_HANGUP))
-		{
+		    (f->subclass == AST_CONTROL_HANGUP)) {
 			ast_frfree(f);
 			LOCAL_USER_REMOVE(u);
 			return -1;
@@ -226,56 +223,54 @@
 			ast_frfree(f);
 			continue;
 		}
-		  /* if not DTMF, just do it again */
-		if (f->frametype != AST_FRAME_DTMF) 
-		{
+
+		/* if not DTMF, just do it again */
+		if (f->frametype != AST_FRAME_DTMF) {
 			ast_frfree(f);
 			continue;
 		}
 
 		j = f->subclass;  /* save digit */
 		ast_frfree(f);
-		if (i == 0) 
-		{
+		if (i == 0) {
 			k|=2; /* We have the first digit */ 
 			ast_playtones_stop(chan);
 		}
 		lastdigittime = ast_tvnow();
 		  /* got a DTMF tone */
-		if (i < AST_MAX_EXTENSION) /* if still valid number of digits */
-		{
-			if (!(k&1)) /* if in password state */
-			{
-				if (j == '#') /* end of password */
-				{
+		if (i < AST_MAX_EXTENSION) { /* if still valid number of digits */
+			if (!(k&1)) { /* if in password state */
+				if (j == '#') { /* end of password */
 					  /* see if this is an integer */
-					if (sscanf(args.passcode,"%d",&j) < 1)
-					   { /* nope, it must be a filename */
+					if (sscanf(args.passcode,"%d",&j) < 1) { /* nope, it must be a filename */
 						fp = fopen(args.passcode,"r");
-						if (!fp)
-						   {
+						if (!fp) {
 							ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
 							LOCAL_USER_REMOVE(u);
 							return -1;
-						   }
+						}
 						pwline[0] = 0;
-						while(fgets(pwline,sizeof(pwline) - 1,fp))
-						   {
-							if (!pwline[0]) continue;
+						while(fgets(pwline,sizeof(pwline) - 1,fp)) {
+							if (!pwline[0])
+								continue;
 							if (pwline[strlen(pwline) - 1] == '\n') 
 								pwline[strlen(pwline) - 1] = 0;
-							if (!pwline[0]) continue;
-							  /* skip comments */
-							if (pwline[0] == '#') continue;
-							if (pwline[0] == ';') continue;
+							if (!pwline[0])
+								continue;
+							 /* skip comments */
+							if (pwline[0] == '#')
+								continue;
+							if (pwline[0] == ';')
+								continue;
 
 							AST_STANDARD_APP_ARGS(args, pwline);
 			
 							ast_log(LOG_DEBUG, "Mailbox: %s\n",args.mailbox);
 
-							  /* password must be in valid format (numeric) */
-							if (sscanf(args.passcode,"%d",&j) < 1) continue;
-							  /* if we got it */
+							/* password must be in valid format (numeric) */
+							if (sscanf(args.passcode,"%d", &j) < 1)
+								continue;
+							 /* if we got it */
 							if (!strcmp(exten,args.passcode)) {
 								if (ast_strlen_zero(args.context))
 									args.context = "disa";
@@ -283,12 +278,11 @@
 									args.mailbox = "";
 								break;
 							}
-						   }
+						}
 						fclose(fp);
-					   }
-					  /* compare the two */
-					if (strcmp(exten,args.passcode))
-					{
+					}
+					/* compare the two */
+					if (strcmp(exten,args.passcode)) {
 						ast_log(LOG_WARNING,"DISA on chan %s got bad password %s\n",chan->name,exten);
 						goto reorder;
 
@@ -302,15 +296,16 @@
 					exten[sizeof(acctcode)] = 0;
 					ast_copy_string(acctcode, exten, sizeof(acctcode));
 					exten[0] = 0;
-					ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n",chan->name);
+					ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n", chan->name);
 					continue;
 				}
 			}
 
 			exten[i++] = j;  /* save digit */
 			exten[i] = 0;
-			if (!(k&1)) continue; /* if getting password, continue doing it */
-			  /* if this exists */
+			if (!(k&1))
+				continue; /* if getting password, continue doing it */
+			/* if this exists */
 
 			if (ast_ignore_pattern(args.context, exten)) {
 				play_dialtone(chan, "");
@@ -321,7 +316,7 @@
 					did_ignore = 0;
 				}
 
-			  /* if can do some more, do it */
+			/* if can do some more, do it */
 			if (!ast_matchmore_extension(chan,args.context,exten,1, chan->cid.cid_num)) {
 				break;
 			}
@@ -341,8 +336,7 @@
 		if (!recheck || ast_exists_extension(chan, args.context, exten, 1, chan->cid.cid_num)) {
 			ast_playtones_stop(chan);
 			/* We're authenticated and have a target extension */
-			if (!ast_strlen_zero(args.cid))
-			{
+			if (!ast_strlen_zero(args.cid)) {
 				ast_callerid_split(args.cid, ourcidname, sizeof(ourcidname), ourcidnum, sizeof(ourcidnum));
 				ast_set_callerid(chan, ourcidnum, ourcidname, ourcidnum);
 			}
@@ -364,8 +358,7 @@
 	ast_indicate(chan,AST_CONTROL_CONGESTION);
 	/* something is invalid, give em reorder for several seconds */
 	time(&rstart);
-	while(time(NULL) < rstart + 10)
-	{
+	while(time(NULL) < rstart + 10) {
 		if (ast_waitfor(chan, -1) < 0)
 			break;
 		f = ast_read(chan);

Modified: team/oej/aum-trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/aum-trunk/channels/chan_sip.c?rev=7788&r1=7787&r2=7788&view=diff
==============================================================================
--- team/oej/aum-trunk/channels/chan_sip.c (original)
+++ team/oej/aum-trunk/channels/chan_sip.c Wed Jan  4 13:39:15 2006
@@ -2280,21 +2280,54 @@
 /* Possible values taken from causes.h */
 
 	switch(cause) {
-		case 603:	/* Declined */
+		case 401:	/* Unauthorized */
+			return AST_CAUSE_CALL_REJECTED;
 		case 403:	/* Not found */
 			return AST_CAUSE_CALL_REJECTED;
 		case 404:	/* Not found */
 			return AST_CAUSE_UNALLOCATED;
+		case 405:	/* Method not allowed */
+			return AST_CAUSE_INTERWORKING;
+		case 407:	/* Proxy authentication required */
+			return AST_CAUSE_CALL_REJECTED;
 		case 408:	/* No reaction */
 			return AST_CAUSE_NO_USER_RESPONSE;
+		case 409:	/* Conflict */
+			return AST_CAUSE_NORMAL_TEMPORARY_FAILURE;
+		case 410:	/* Gone */
+			return AST_CAUSE_UNALLOCATED;
+		case 411:	/* Length required */
+			return AST_CAUSE_INTERWORKING;
+		case 413:	/* Request entity too large */
+			return AST_CAUSE_INTERWORKING;
+		case 414:	/* Request URI too large */
+			return AST_CAUSE_INTERWORKING;
+		case 415:	/* Unsupported media type */
+			return AST_CAUSE_INTERWORKING;
+		case 420:	/* Bad extension */
+			return AST_CAUSE_NO_ROUTE_DESTINATION;
 		case 480:	/* No answer */
 			return AST_CAUSE_FAILURE;
+		case 481:	/* No answer */
+			return AST_CAUSE_INTERWORKING;
+		case 482:	/* Loop detected */
+			return AST_CAUSE_INTERWORKING;
 		case 483:	/* Too many hops */
 			return AST_CAUSE_NO_ANSWER;
+		case 484:	/* Address incomplete */
+			return AST_CAUSE_INVALID_NUMBER_FORMAT;
+		case 485:	/* Ambigous */
+			return AST_CAUSE_UNALLOCATED;
 		case 486:	/* Busy everywhere */
 			return AST_CAUSE_BUSY;
+		case 487:	/* Request terminated */
+			return AST_CAUSE_INTERWORKING;
 		case 488:	/* No codecs approved */
 			return AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
+		case 491:	/* Request pending */
+			return AST_CAUSE_INTERWORKING;
+		case 493:	/* Undecipherable */
+			return AST_CAUSE_INTERWORKING;
 		case 500:	/* Server internal failure */
 			return AST_CAUSE_FAILURE;
 		case 501:	/* Call rejected */
@@ -2303,6 +2336,18 @@
 			return AST_CAUSE_DESTINATION_OUT_OF_ORDER;
 		case 503:	/* Service unavailable */
 			return AST_CAUSE_CONGESTION;
+		case 504:	/* Gateway timeout */
+			return AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE;
+		case 505:	/* SIP version not supported */
+			return AST_CAUSE_INTERWORKING;
+		case 600:	/* Busy everywhere */
+			return AST_CAUSE_USER_BUSY;
+		case 603:	/* Decline */
+			return AST_CAUSE_CALL_REJECTED;
+		case 604:	/* Does not exist anywhere */
+			return AST_CAUSE_UNALLOCATED;
+		case 606:	/* Not acceptable */
+			return AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
 		default:
 			return AST_CAUSE_NORMAL;
 	}

Modified: team/oej/aum-trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/aum-trunk/channels/chan_zap.c?rev=7788&r1=7787&r2=7788&view=diff
==============================================================================
--- team/oej/aum-trunk/channels/chan_zap.c (original)
+++ team/oej/aum-trunk/channels/chan_zap.c Wed Jan  4 13:39:15 2006
@@ -7972,13 +7972,13 @@
 		}
 		if ((dchan >= 0) && (span >= 0)) {
 			if (dchancount > 1)
-				ast_log(LOG_DEBUG, "[Span %d D-Channel %d]%s", span, dchan, s);
+				ast_verbose("[Span %d D-Channel %d]%s", span, dchan, s);
 			else
-				ast_log(LOG_DEBUG, "%s", s);
+				ast_verbose("%s", s);
 		} else
 			ast_log(LOG_ERROR, "PRI debug error: could not find pri associated it with debug message output\n");
 	} else
-		ast_log(LOG_DEBUG, "%s", s);
+		ast_verbose("%s", s);
 
 	ast_mutex_lock(&pridebugfdlock);
 

Modified: team/oej/aum-trunk/contrib/scripts/managerproxy.pl
URL: http://svn.digium.com/view/asterisk/team/oej/aum-trunk/contrib/scripts/managerproxy.pl?rev=7788&r1=7787&r2=7788&view=diff
==============================================================================
--- team/oej/aum-trunk/contrib/scripts/managerproxy.pl (original)
+++ team/oej/aum-trunk/contrib/scripts/managerproxy.pl Wed Jan  4 13:39:15 2006
@@ -2,14 +2,14 @@
 #
 #  Simple Asterisk Manager Proxy, Version 1.01
 #  2004-09-26
-#  Copyright (c) 2004 David C. Troy &lt;dave at popvox.com>
+#  Copyright (c) 2004 David C. Troy <dave at popvox.com>
 #
 #  This code is based on Flash Operator Panel 'op_server.pl'
-#  by Nicolá³ Gudiñ¯¬
+#  by Nicolas Gudino
 #   Copyright (C) 2004.
 #
-#  David C. Troy &lt;dave at popvox.com>
-#  Nicol᳠Gudi񯠼nicolas at house.com.ar>
+#  David C. Troy <dave at popvox.com>
+#  Nicolas Gudino <nicolas at house.com.ar>
 #
 #  This program is free software, distributed under the terms of
 #  the GNU General Public License.



More information about the svn-commits mailing list