[svn-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r201823 - /team/jpeeler/asteri...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 18 17:33:55 CDT 2009


Author: jpeeler
Date: Thu Jun 18 17:33:51 2009
New Revision: 201823

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201823
Log:
trivial and perhaps final changes

Modified:
    team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.h

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=201823&r1=201822&r2=201823
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Thu Jun 18 17:33:51 2009
@@ -7789,7 +7789,7 @@
 				i->dsp_features = features;
 #if defined(HAVE_SS7)
 				/* We cannot do progress detection until receives PROGRESS message */
-				if (i->outgoing && (i->sig == SIG_SS7)){
+				if (i->outgoing && (i->sig == SIG_SS7)) {
 					/* Remember requested DSP features, don't treat
 					   talking as ANSWER */
 					i->dsp_features = features & ~DSP_PROGRESS_TALK;
@@ -10368,8 +10368,7 @@
 				int x,y;
 				int myswitchtype = 0;
 				offset = 0;
-				if (((chan_sig == SIG_PRI) || (chan_sig == SIG_BRI) || (chan_sig == SIG_BRI_PTMP))
-						&& ioctl(tmp->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &offset)) {
+				if (ioctl(tmp->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &offset)) {
 					ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, p.spanno, strerror(errno));
 					destroy_dahdi_pvt(&tmp);
 					return NULL;

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c?view=diff&rev=201823&r1=201822&r2=201823
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c Thu Jun 18 17:33:51 2009
@@ -1032,10 +1032,10 @@
 
 	if (!p->subs[ANALOG_SUB_REAL].owner && !p->subs[ANALOG_SUB_CALLWAIT].owner && !p->subs[ANALOG_SUB_THREEWAY].owner) {
 		p->owner = NULL;
-#if 0
+#if 1
 		p->ringt = 0;
 #endif
-#if 0 /* Since we set it in _call */
+#if 1 /* disabled? Since we set it in _call */
 		p->cidrings = 1;
 #endif
 		p->outgoing = 0;
@@ -1086,9 +1086,7 @@
 	analog_stop_callwait(p);
 	ast->tech_pvt = NULL;
 
-	if (option_verbose > 2) {
-		ast_verbose(VERBOSE_PREFIX_3 "Hanging up on '%s'\n", ast->name);
-	}
+	ast_verb(3, "Hanging up on '%s'\n", ast->name);
 
 	return 0;
 }
@@ -1107,7 +1105,7 @@
 	case ANALOG_SIG_FXSLS:
 	case ANALOG_SIG_FXSGS:
 	case ANALOG_SIG_FXSKS:
-#if 0
+#if 1
 		p->ringt = 0;
 #endif
 		/* Fall through */
@@ -1556,8 +1554,7 @@
 			}
 			goto quit;
 		} else {
-			if (option_verbose > 2)
-				ast_verbose(VERBOSE_PREFIX_2 "Unknown extension '%s' in context '%s' requested\n", exten, chan->context);
+			ast_verb(3, "Unknown extension '%s' in context '%s' requested\n", exten, chan->context);
 			sleep(2);
 			res = analog_play_tone(p, index, ANALOG_TONE_INFO);
 			if (res < 0)
@@ -1607,8 +1604,7 @@
 					if (getforward) {
 						/* Record this as the forwarding extension */
 						ast_copy_string(p->call_forward, exten, sizeof(p->call_forward)); 
-						if (option_verbose > 2)
-							ast_verbose(VERBOSE_PREFIX_3 "Setting call forward to '%s' on channel %d\n", p->call_forward, p->channel);
+						ast_verb(3, "Setting call forward to '%s' on channel %d\n", p->call_forward, p->channel);
 						res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
 						if (res)
 							break;
@@ -1653,8 +1649,7 @@
 				ast_hangup(chan);
 				goto quit;
 			} else if (p->callwaiting && !strcmp(exten, "*70")) {
-				if (option_verbose > 2) 
-					ast_verbose(VERBOSE_PREFIX_3 "Disabling call waiting on %s\n", chan->name);
+				ast_verb(3, "Disabling call waiting on %s\n", chan->name);
 				/* Disable call waiting if enabled */
 				p->callwaiting = 0;
 				res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
@@ -1694,8 +1689,7 @@
 					goto quit;
 				}
 			} else if (!p->hidecallerid && !strcmp(exten, "*67")) {
-				if (option_verbose > 2) 
-					ast_verbose(VERBOSE_PREFIX_3 "Disabling Caller*ID on %s\n", chan->name);
+				ast_verb(3, "Disabling Caller*ID on %s\n", chan->name);
 				/* Disable Caller*ID if enabled */
 				p->hidecallerid = 1;
 				if (chan->cid.cid_num)
@@ -1722,13 +1716,10 @@
 				break;
 			} else if (!strcmp(exten, "*78")) {
 				/* Do not disturb */
-				if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Enabled DND on channel %d\n", p->channel);
-#if 0
+				ast_verb(3, "Enabled DND on channel %d\n", p->channel);
 				manager_event(EVENT_FLAG_SYSTEM, "DNDState",
-					      "Channel: %s/%d\r\n"
-					      "Status: enabled\r\n", dahdi_chan_name, p->channel);
-#endif
+					      "Channel: DAHDI/%d\r\n"
+					      "Status: enabled\r\n", p->channel);
 				res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
 				p->dnd = 1;
 				getforward = 0;
@@ -1736,13 +1727,10 @@
 				len = 0;
 			} else if (!strcmp(exten, "*79")) {
 				/* Do not disturb */
-				if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Disabled DND on channel %d\n", p->channel);
-#if 0
+				ast_verb(3, "Disabled DND on channel %d\n", p->channel);
 				manager_event(EVENT_FLAG_SYSTEM, "DNDState",
-					      "Channel: %s/%d\r\n"
-					      "Status: disabled\r\n", dahdi_chan_name, p->channel);
-#endif
+					      "Channel: DAHDI/%d\r\n"
+					      "Status: disabled\r\n", p->channel);
 				res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
 				p->dnd = 0;
 				getforward = 0;
@@ -1754,8 +1742,7 @@
 				memset(exten, 0, sizeof(exten));
 				len = 0;
 			} else if (p->cancallforward && !strcmp(exten, "*73")) {
-				if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Cancelling call forwarding on channel %d\n", p->channel);
+				ast_verb(3, "Cancelling call forwarding on channel %d\n", p->channel);
 				res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
 				memset(p->call_forward, 0, sizeof(p->call_forward));
 				getforward = 0;
@@ -1767,12 +1754,10 @@
 				/* This is a three way call, the main call being a real channel,
 					and we're parking the first call. */
 				ast_masq_park_call(ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner), chan, 0, NULL);
-				if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Parking call to '%s'\n", chan->name);
+				ast_verb(3, "Parking call to '%s'\n", chan->name);
 				break;
 			} else if (!ast_strlen_zero(p->lastcid_num) && !strcmp(exten, "*60")) {
-				if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Blacklisting number %s\n", p->lastcid_num);
+				ast_verb(3, "Blacklisting number %s\n", p->lastcid_num);
 				res = ast_db_put("blacklist", p->lastcid_num, "1");
 				if (!res) {
 					res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
@@ -1780,8 +1765,7 @@
 					len = 0;
 				}
 			} else if (p->hidecallerid && !strcmp(exten, "*82")) {
-				if (option_verbose > 2) 
-					ast_verbose(VERBOSE_PREFIX_3 "Enabling Caller*ID on %s\n", chan->name);
+				ast_verb(3, "Enabling Caller*ID on %s\n", chan->name);
 				/* Enable Caller*ID if enabled */
 				p->hidecallerid = 0;
 				if (chan->cid.cid_num)
@@ -1800,7 +1784,7 @@
 				memset(exten, 0, sizeof(exten));
 				timeout = analog_firstdigittimeout;
 			} else if (!strcmp(exten, "*0")) {
-#ifdef XXX
+#if 0 /*jpeeler */
 				struct ast_channel *nbridge = p->subs[ANALOG_SUB_THREEWAY].owner;
 				struct dahdi_pvt *pbridge = NULL;
 				  /* set up the private struct of the bridged one, if any */
@@ -2170,7 +2154,7 @@
 
 		ast_setstate(chan, AST_STATE_RING);
 		chan->rings = 1;
-#if 0
+#if 1
 		p->ringt = p->ringt_base;
 #endif
 		res = ast_pbx_run(chan);
@@ -2240,8 +2224,7 @@
 	switch (res) {
 #ifdef ANALOG_EVENT_EC_DISABLED
 	case ANALOG_EVENT_EC_DISABLED:
-		if (option_verbose > 2) 
-			ast_verbose(VERBOSE_PREFIX_3 "Channel %d echo canceler disabled due to CED detection\n", p->channel);
+		ast_verb(3, "Channel %d echo canceler disabled due to CED detection\n", p->channel);
 		p->echocanon = 0;
 		break;
 #endif
@@ -2309,8 +2292,7 @@
 				if (p->subs[ANALOG_SUB_CALLWAIT].owner) {
 					/* There's a call waiting call, so ring the phone, but make it unowned in the mean time */
 					analog_swap_subs(p, ANALOG_SUB_CALLWAIT, ANALOG_SUB_REAL);
-					if (option_verbose > 2) 
-						ast_verbose(VERBOSE_PREFIX_3 "Channel %d still has (callwait) call, ringing phone\n", p->channel);
+					ast_verb(3, "Channel %d still has (callwait) call, ringing phone\n", p->channel);
 					analog_unalloc_sub(p, ANALOG_SUB_CALLWAIT);
 					analog_stop_callwait(p);
 					p->owner = NULL;
@@ -2487,7 +2469,7 @@
 		case ANALOG_SIG_FXSLS:
 		case ANALOG_SIG_FXSGS:
 		case ANALOG_SIG_FXSKS:
-#if 0
+#if 1
 			if (ast->_state == AST_STATE_RING) {
 				p->ringt = p->ringt_base;
 			}
@@ -2533,7 +2515,7 @@
 		case ANALOG_SIG_FXSLS:
 		case ANALOG_SIG_FXSGS:
 		case ANALOG_SIG_FXSKS:
-#if 0
+#if 1
 			if (ast->_state == AST_STATE_RING) {
 				p->ringt = p->ringt_base;
 			}
@@ -2679,8 +2661,7 @@
 						if (p->subs[ANALOG_SUB_THREEWAY].owner->cdr)
 							cdr3way = 1;
  						
-						if (option_verbose > 2)	
-							ast_verbose(VERBOSE_PREFIX_3 "Started three way call on channel %d\n", p->channel);
+						ast_verb(3, "Started three way call on channel %d\n", p->channel);
 						/* Start music on hold if appropriate */
 						if (ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner)) {
 							ast_queue_control_data(p->subs[ANALOG_SUB_THREEWAY].owner, AST_CONTROL_HOLD,
@@ -2702,8 +2683,7 @@
 						p->owner = p->subs[ANALOG_SUB_REAL].owner;
 					}
 					/* Drop the last call and stop the conference */
-					if (option_verbose > 2)
-						ast_verbose(VERBOSE_PREFIX_3 "Dropping three-way call on %s\n", p->subs[ANALOG_SUB_THREEWAY].owner->name);
+					ast_verb(3, "Dropping three-way call on %s\n", p->subs[ANALOG_SUB_THREEWAY].owner->name);
 					ast_softhangup_nolock(p->subs[ANALOG_SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 					p->subs[ANALOG_SUB_REAL].inthreeway = 0;
 					p->subs[ANALOG_SUB_THREEWAY].inthreeway = 0;
@@ -2723,8 +2703,7 @@
 						if (p->subs[ANALOG_SUB_THREEWAY].owner->cdr)
 							cdr3way = 1;
 
-						if (option_verbose > 2)
-							ast_verbose(VERBOSE_PREFIX_3 "Building conference on call on %s and %s\n", p->subs[ANALOG_SUB_THREEWAY].owner->name, p->subs[ANALOG_SUB_REAL].owner->name);
+						ast_verb(3, "Building conference on call on %s and %s\n", p->subs[ANALOG_SUB_THREEWAY].owner->name, p->subs[ANALOG_SUB_REAL].owner->name);
 						/* Put them in the threeway, and flip */
 						p->subs[ANALOG_SUB_THREEWAY].inthreeway = 1;
 						p->subs[ANALOG_SUB_REAL].inthreeway = 1;
@@ -2741,8 +2720,7 @@
 							analog_play_tone(p, ANALOG_SUB_THREEWAY, ANALOG_TONE_RINGTONE);
 						}
 					} else {
-						if (option_verbose > 2)
-							ast_verbose(VERBOSE_PREFIX_3 "Dumping incomplete call on on %s\n", p->subs[ANALOG_SUB_THREEWAY].owner->name);
+						ast_verb(3, "Dumping incomplete call on on %s\n", p->subs[ANALOG_SUB_THREEWAY].owner->name);
 						analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
 						ast_softhangup_nolock(p->subs[ANALOG_SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 						p->owner = p->subs[ANALOG_SUB_REAL].owner;
@@ -2937,8 +2915,7 @@
 		case ANALOG_EVENT_ONHOOK:
 			analog_set_echocanceller(p, 0);
 			if (p->owner) {
-				if (option_verbose > 2) 
-					ast_verbose(VERBOSE_PREFIX_3 "Channel %s still has call, ringing phone\n", p->owner->name);
+				ast_verb(3, "Channel %s still has call, ringing phone\n", p->owner->name);
 				analog_ring(p);
 				analog_stop_callwait(p);
 			} else
@@ -2961,8 +2938,7 @@
 		case ANALOG_EVENT_WINKFLASH:
 			gettimeofday(&p->flashtime, NULL);
 			if (p->owner) {
-				if (option_verbose > 2) 
-					ast_verbose(VERBOSE_PREFIX_3 "Channel %d flashed to other channel %s\n", p->channel, p->owner->name);
+				ast_verb(3, "Channel %d flashed to other channel %s\n", p->channel, p->owner->name);
 				if (p->owner->_state != AST_STATE_UP) {
 					/* Answer if necessary */
 					usedindex = analog_get_index(p->owner, p, 0);
@@ -3056,7 +3032,7 @@
 		case ANALOG_SIG_FXSLS:
 		case ANALOG_SIG_FXSGS:
 		case ANALOG_SIG_FXSKS:
-#if 0
+#if 1
 				i->ringt = i->ringt_base;
 #endif
 				/* Fall through */

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h?view=diff&rev=201823&r1=201822&r2=201823
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h Thu Jun 18 17:33:51 2009
@@ -277,13 +277,13 @@
 	void *ss_astchan;
 
 	/* All variables after this are definitely going to be audited */
-	unsigned int inalarm:1; //
-	unsigned int unknown_alarm:1;//
+	unsigned int inalarm:1;
+	unsigned int unknown_alarm:1;
 
 	int callwaitcas;
 
-#if 0
-	int ringt; //
+#if 1
+	int ringt;
 	int ringt_base;
 #endif
 };

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c?view=diff&rev=201823&r1=201822&r2=201823
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c Thu Jun 18 17:33:51 2009
@@ -143,7 +143,7 @@
 		return -1;
 }
 
-static struct ast_channel * sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, int startpbx, int ulaw, int transfercapability, char *exten)
+static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, int startpbx, int ulaw, int transfercapability, char *exten)
 {
 	struct ast_channel *c;
 
@@ -160,7 +160,7 @@
 	return c;
 }
 
-struct ast_channel * sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law)
+struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law)
 {
 	ast_log(LOG_DEBUG, "%s %d\n", __FUNCTION__, p->channel);
 
@@ -538,8 +538,7 @@
 		return NULL;
 	}
 
-	if (option_verbose > 2) 
-		ast_verbose( VERBOSE_PREFIX_3 "Starting simple switch on '%s'\n", chan->name);
+	ast_verb(3, "Starting simple switch on '%s'\n", chan->name);
 
 	/* Now loop looking for an extension */
 	ast_copy_string(exten, p->exten, sizeof(exten));
@@ -1293,14 +1292,12 @@
 						struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, };
 
 						if (e->proceeding.cause > -1) {
-							if (option_verbose > 2)
-								ast_verbose(VERBOSE_PREFIX_3 "PROGRESS with cause code %d received\n", e->proceeding.cause);
+							ast_verb(3, "PROGRESS with cause code %d received\n", e->proceeding.cause);
 
 							/* Work around broken, out of spec USER_BUSY cause in a progress message */
 							if (e->proceeding.cause == AST_CAUSE_USER_BUSY) {
 								if (pri->pvts[chanpos]->owner) {
-									if (option_verbose > 2)
-										ast_verbose(VERBOSE_PREFIX_3 "PROGRESS with 'user busy' received, signaling AST_CONTROL_BUSY instead of AST_CONTROL_PROGRESS\n");
+									ast_verb(3, "PROGRESS with 'user busy' received, signaling AST_CONTROL_BUSY instead of AST_CONTROL_PROGRESS\n");
 
 									pri->pvts[chanpos]->owner->hangupcause = e->proceeding.cause;
 									f.subclass = AST_CONTROL_BUSY;
@@ -1832,8 +1829,7 @@
 	if (p->pri->facilityenable)
 		pri_facility_enable(p->pri->pri);
 
-	if (option_verbose > 2)
-		ast_verbose(VERBOSE_PREFIX_3 "Requested transfer capability: 0x%.2x - %s\n", ast->transfercapability, ast_transfercapability2str(ast->transfercapability));
+	ast_verb(3, "Requested transfer capability: 0x%.2x - %s\n", ast->transfercapability, ast_transfercapability2str(ast->transfercapability));
 	dp_strip = 0;
  	pridialplan = p->pri->dialplan - 1;
  	if (pridialplan == -2 || pridialplan == -3) { /* compute dynamically */
@@ -2079,7 +2075,7 @@
 		break;
 	case AST_CONTROL_PROGRESS:
 		ast_log(LOG_DEBUG,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
-		p->digital = 0;	/* Digital-only calls isn't allows any inband progress messages */
+		p->digital = 0;	/* Digital-only calls isn't allowing any inband progress messages */
 		if (!p->progress && p->pri && !p->outgoing) {
 			if (p->pri->pri) {		
 				if (!pri_grab(p, p->pri)) {

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.h?view=diff&rev=201823&r1=201822&r2=201823
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.h (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.h Thu Jun 18 17:33:51 2009
@@ -239,9 +239,9 @@
 
 void pri_event_noalarm(struct sig_pri_pri *pri, int index, int before_start_pri);
 
-struct ast_channel * sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law);
-
-struct sig_pri_chan * sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo);
+struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law);
+
+struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo);
 
 int pri_is_up(struct sig_pri_pri *pri);
 




More information about the svn-commits mailing list