[asterisk-commits] tilghman: branch group/codec_bits r113872 - in /team/group/codec_bits: ./ cha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 9 13:32:34 CDT 2008


Author: tilghman
Date: Wed Apr  9 13:32:33 2008
New Revision: 113872

URL: http://svn.digium.com/view/asterisk?view=rev&rev=113872
Log:
Merged revisions 113834,113836,113838,113840 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r113834 | qwell | 2008-04-09 12:41:09 -0500 (Wed, 09 Apr 2008) | 7 lines

Move all messages wrapped in skinnydebug from debug to verbose.

(closes issue #12224)
Reported by: DEA
Patches:
      chan_skinny-debug-log.txt uploaded by DEA (license 3)

........
r113836 | mmichelson | 2008-04-09 12:48:33 -0500 (Wed, 09 Apr 2008) | 14 lines

There was a subtle logical difference between 1.4 and trunk with regards to how timeouts
were handled. In 1.4, if the absolute timeout were reached on a call, no matter what
the return value of ast_spawn_extension was, the pbx would attempt to go to the 'T'
extension or hangup otherwise. The rearrangement of this function in trunk made this check
only happen in the case that ast_spawn_extension returned 0. If ast_spawn_extension returned
1, then the fact that the timeout expired resulted in a no-op, and would cause an infinite
loop to occur in __ast_pbx_run. This change fixes this problem. Now timeouts will
behave as they did in 1.4

(closes issue #11550)
Reported by: pj
Tested by: putnopvut


........
r113838 | qwell | 2008-04-09 12:56:07 -0500 (Wed, 09 Apr 2008) | 2 lines

Fix a small file handle "leak" pointed out by jjshoe on #asterisk.

........
r113840 | file | 2008-04-09 13:05:40 -0500 (Wed, 09 Apr 2008) | 4 lines

Enable enough RTP bridging to allow P2P to work.
(closes issue #11901)
Reported by: pj

........

Modified:
    team/group/codec_bits/   (props changed)
    team/group/codec_bits/channels/chan_h323.c
    team/group/codec_bits/channels/chan_skinny.c
    team/group/codec_bits/contrib/scripts/astcli
    team/group/codec_bits/main/pbx.c

Propchange: team/group/codec_bits/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/codec_bits/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Apr  9 13:32:33 2008
@@ -1,1 +1,1 @@
-/trunk:1-113794
+/trunk:1-113871

Modified: team/group/codec_bits/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/channels/chan_h323.c?view=diff&rev=113872&r1=113871&r2=113872
==============================================================================
--- team/group/codec_bits/channels/chan_h323.c (original)
+++ team/group/codec_bits/channels/chan_h323.c Wed Apr  9 13:32:33 2008
@@ -254,10 +254,7 @@
 	.write = oh323_write,
 	.indicate = oh323_indicate,
 	.fixup = oh323_fixup,
-	/* disable, for now */
-#if 0
 	.bridge = ast_rtp_bridge,
-#endif
 };
 
 static const char* redirectingreason2str(int redirectingreason)
@@ -3092,10 +3089,12 @@
 		return AST_RTP_GET_FAILED;
 
 	ast_mutex_lock(&pvt->lock);
-	if (pvt->rtp && pvt->options.bridge) {
-		*rtp = pvt->rtp;
+	*rtp = pvt->rtp;
+#if 0
+	if (pvt->options.bridge) {
 		res = AST_RTP_TRY_NATIVE;
 	}
+#endif
 	ast_mutex_unlock(&pvt->lock);
 
 	return res;

Modified: team/group/codec_bits/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/channels/chan_skinny.c?view=diff&rev=113872&r1=113871&r2=113872
==============================================================================
--- team/group/codec_bits/channels/chan_skinny.c (original)
+++ team/group/codec_bits/channels/chan_skinny.c Wed Apr  9 13:32:33 2008
@@ -1883,7 +1883,7 @@
 		return;
 
 	if (skinnydebug)
-			ast_debug(1, "Setting Callinfo to %s(%s) from %s(%s) on %s(%d)\n", fromname, fromnum, toname, tonum, s->device->name, instance);
+			ast_verb(1, "Setting Callinfo to %s(%s) from %s(%s) on %s(%d)\n", fromname, fromnum, toname, tonum, s->device->name, instance);
 
 	if (fromname) {
 		ast_copy_string(req->data.callinfo.callingPartyName, fromname, sizeof(req->data.callinfo.callingPartyName));
@@ -1983,7 +1983,7 @@
 	struct skinny_req *req;
 
 	if (skinnydebug)
-		ast_debug(1, "Setting ringer mode to '%d'.\n", mode);
+		ast_verb(1, "Setting ringer mode to '%d'.\n", mode);
 
 	if (!(req = req_alloc(sizeof(struct set_ringer_message), SET_RINGER_MESSAGE)))
 		return;
@@ -2015,14 +2015,14 @@
 		req->data.clearpromptstatus.callReference = reference;
 
 		if (skinnydebug)
-			ast_debug(1, "Clearing Display\n");
+			ast_verb(1, "Clearing Display\n");
 	} else {
 		if (!(req = req_alloc(sizeof(struct displaytext_message), DISPLAYTEXT_MESSAGE)))
 			return;
 
 		ast_copy_string(req->data.displaytext.text, text, sizeof(req->data.displaytext.text));
 		if (skinnydebug)
-			ast_debug(1, "Displaying message '%s'\n", req->data.displaytext.text);
+			ast_verb(1, "Displaying message '%s'\n", req->data.displaytext.text);
 	}
 
 	transmit_response(s, req);
@@ -2039,7 +2039,7 @@
 	req->data.displaynotify.displayTimeout = htolel(t);
 
 	if (skinnydebug)
-		ast_debug(1, "Displaying notify '%s'\n", text);
+		ast_verb(1, "Displaying notify '%s'\n", text);
 
 	transmit_response(s, req);
 }
@@ -2056,7 +2056,7 @@
 		req->data.clearpromptstatus.callReference = htolel(callid);
 
 		if (skinnydebug)
-			ast_debug(1, "Clearing Prompt\n");
+			ast_verb(1, "Clearing Prompt\n");
 	} else {
 		if (!(req = req_alloc(sizeof(struct display_prompt_status_message), DISPLAY_PROMPT_STATUS_MESSAGE)))
 			return;
@@ -2067,7 +2067,7 @@
 		req->data.displaypromptstatus.callReference = htolel(callid);
 
 		if (skinnydebug)
-			ast_debug(1, "Displaying Prompt Status '%s'\n", text);
+			ast_verb(1, "Displaying Prompt Status '%s'\n", text);
 	}
 
 	transmit_response(s, req);
@@ -2250,10 +2250,10 @@
 	for (l = d->lines; l; l = l->next) {
 		if (has_voicemail(l)) {
 			if (skinnydebug)
-				ast_debug(1, "Checking for voicemail Skinny %s@%s\n", l->name, d->name);
+				ast_verb(1, "Checking for voicemail Skinny %s@%s\n", l->name, d->name);
 			ast_app_inboxcount(l->mailbox, &new, &old);
 			if (skinnydebug)
-				ast_debug(1, "Skinny %s@%s has voicemail!\n", l->name, d->name);
+				ast_verb(1, "Skinny %s@%s has voicemail!\n", l->name, d->name);
 			transmit_lamp_indication(s, STIMULUS_VOICEMAIL, l->instance, l->mwiblink?SKINNY_LAMP_BLINK:SKINNY_LAMP_ON);
 			device_lamp++;
 		} else {
@@ -2289,7 +2289,7 @@
 	enum ast_rtp_get_result res = AST_RTP_TRY_NATIVE;
 
 	if (skinnydebug)
-		ast_debug(1, "skinny_get_rtp_peer() Channel = %s\n", c->name);
+		ast_verb(1, "skinny_get_rtp_peer() Channel = %s\n", c->name);
 
 
 	if (!(sub = c->tech_pvt))
@@ -2309,7 +2309,7 @@
 	if (!l->canreinvite || l->nat){
 		res = AST_RTP_TRY_PARTIAL;
 		if (skinnydebug)
-			ast_debug(1, "skinny_get_rtp_peer() Using AST_RTP_TRY_PARTIAL \n");
+			ast_verb(1, "skinny_get_rtp_peer() Using AST_RTP_TRY_PARTIAL \n");
 	}
 
 	ast_mutex_unlock(&sub->lock);
@@ -2356,7 +2356,7 @@
 		transmit_response(s, req);
 
 		if (skinnydebug)
-			ast_debug(1, "Peerip = %s:%d\n", ast_inet_ntoa(them.sin_addr), ntohs(them.sin_port));
+			ast_verb(1, "Peerip = %s:%d\n", ast_inet_ntoa(them.sin_addr), ntohs(them.sin_port));
 
 		if (!(req = req_alloc(sizeof(struct start_media_transmission_message), START_MEDIA_TRANSMISSION_MESSAGE)))
 			return -1;
@@ -3371,7 +3371,7 @@
 	d = l->parent;
 	s = d->session;
 	if (skinnydebug)
-		ast_debug(1, "skinny_hangup(%s) on %s@%s\n", ast->name, l->name, d->name);
+		ast_verb(1, "skinny_hangup(%s) on %s@%s\n", ast->name, l->name, d->name);
 
 	if (d->registered) {
 		if ((l->type = TYPE_LINE) && (l->hookstate == SKINNY_OFFHOOK)) {
@@ -3416,7 +3416,7 @@
 		start_rtp(sub);
 	}
 	if (skinnydebug)
-		ast_debug(1, "skinny_answer(%s) on %s@%s-%d\n", ast->name, l->name, d->name, sub->callid);
+		ast_verb(1, "skinny_answer(%s) on %s@%s-%d\n", ast->name, l->name, d->name, sub->callid);
 	if (ast->_state != AST_STATE_UP) {
 		ast_setstate(ast, AST_STATE_UP);
 	}
@@ -3842,7 +3842,7 @@
 
 	/* Channel needs to be put on hold */
 	if (skinnydebug)
-		ast_debug(1, "Putting on Hold(%d)\n", l->instance);
+		ast_verb(1, "Putting on Hold(%d)\n", l->instance);
 
 	ast_queue_control_data(sub->owner, AST_CONTROL_HOLD,
 		S_OR(l->mohsuggest, NULL),
@@ -3886,7 +3886,7 @@
 
 	/* Channel is on hold, so we will unhold */
 	if (skinnydebug)
-		ast_debug(1, "Taking off Hold(%d)\n", l->instance);
+		ast_verb(1, "Taking off Hold(%d)\n", l->instance);
 
 	ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
 
@@ -3943,7 +3943,7 @@
 	req->data.regack.secondaryKeepAlive = htolel(keep_alive);
 	transmit_response(s, req);
 	if (skinnydebug)
-		ast_debug(1, "Requesting capabilities\n");
+		ast_verb(1, "Requesting capabilities\n");
 
 	if (!(req = req_alloc(0, CAPABILITIES_REQ_MESSAGE)))
 		return -1;
@@ -3967,7 +3967,7 @@
 		transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 	}
 	if (skinnydebug)
-		ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+		ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 	transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 
 	if (l->cfwdtype & cfwdtype) {
@@ -4063,7 +4063,7 @@
 		}
 	} else {
 		if (skinnydebug)
-			ast_debug(1, "No owner: %s\n", l->name);
+			ast_verb(1, "No owner: %s\n", l->name);
 	}
 	return 1;
 }
@@ -4085,7 +4085,7 @@
 	instance = letohl(req->data.stimulus.stimulusInstance);
 	callreference = letohl(req->data.stimulus.callreference); 
 	if (skinnydebug)
-		ast_debug(1, "callreference in handle_stimulus_message is '%d'\n", callreference);
+		ast_verb(1, "callreference in handle_stimulus_message is '%d'\n", callreference);
 
 	/*  Note that this call should be using the passed in instance and callreference */
 	sub = find_subchannel_by_instance_reference(d, d->lastlineinstance, d->lastcallreference);
@@ -4102,7 +4102,7 @@
 	switch(event) {
 	case STIMULUS_REDIAL:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Redial(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Redial(%d/%d)\n", instance, callreference);
 
 		if (ast_strlen_zero(l->lastnumberdialed)) {
 			ast_log(LOG_WARNING, "Attempted redial, but no previously dialed number found.\n");
@@ -4123,7 +4123,7 @@
 				transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 			}
 			if (skinnydebug)
-				ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+				ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 			transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 			transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 			transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_RINGOUT);
@@ -4143,7 +4143,7 @@
 		struct skinny_speeddial *sd;
 
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: SpeedDial(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: SpeedDial(%d/%d)\n", instance, callreference);
 		if (!(sd = find_speeddial_by_instance(d, instance, 0))) {
 			return 0;
 		}
@@ -4164,7 +4164,7 @@
 				transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 			}
 			if (skinnydebug)
-				ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+				ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 			transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 			transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 			transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_RINGOUT);
@@ -4187,7 +4187,7 @@
 		break;
 	case STIMULUS_HOLD:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Hold(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Hold(%d/%d)\n", instance, callreference);
 
 		if (!sub)
 			break;
@@ -4200,17 +4200,17 @@
 		break;
 	case STIMULUS_TRANSFER:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Transfer(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Transfer(%d/%d)\n", instance, callreference);
 		/* XXX figure out how to transfer */
 		break;
 	case STIMULUS_CONFERENCE:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Conference(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Conference(%d/%d)\n", instance, callreference);
 		/* XXX determine the best way to pull off a conference.  Meetme? */
 		break;
 	case STIMULUS_VOICEMAIL:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Voicemail(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Voicemail(%d/%d)\n", instance, callreference);
 
 		if (!sub || !sub->owner) {
 			c = skinny_new(l, AST_STATE_DOWN);
@@ -4233,7 +4233,7 @@
 			}
 
 			if (skinnydebug)
-				ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+				ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 
 			transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 			transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
@@ -4256,12 +4256,12 @@
 		break;
 	case STIMULUS_CALLPARK:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Park Call(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Park Call(%d/%d)\n", instance, callreference);
 		/* XXX Park the call */
 		break;
 	case STIMULUS_DND:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: DND (%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: DND (%d/%d)\n", instance, callreference);
 
 		/* Do not disturb */
 		if (l->dnd != 0){
@@ -4278,7 +4278,7 @@
 		break;
 	case STIMULUS_FORWARDALL:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Forward All(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Forward All(%d/%d)\n", instance, callreference);
 
 		if (!sub || !sub->owner) {
 			c = skinny_new(l, AST_STATE_DOWN);
@@ -4295,7 +4295,7 @@
 		break;
 	case STIMULUS_FORWARDBUSY:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Forward Busy (%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Forward Busy (%d/%d)\n", instance, callreference);
 
 		if (!sub || !sub->owner) {
 			c = skinny_new(l, AST_STATE_DOWN);
@@ -4312,7 +4312,7 @@
 		break;
 	case STIMULUS_FORWARDNOANSWER:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Forward No Answer (%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Forward No Answer (%d/%d)\n", instance, callreference);
 
 #if 0 /* Not sure how to handle this yet */
 		if (!sub || !sub->owner) {
@@ -4332,11 +4332,11 @@
 	case STIMULUS_DISPLAY:
 		/* Not sure what this is */
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Display(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Display(%d/%d)\n", instance, callreference);
 		break;
 	case STIMULUS_LINE:
 		if (skinnydebug)
-			ast_debug(1, "Received Stimulus: Line(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Stimulus: Line(%d/%d)\n", instance, callreference);
 
 		l = find_line_by_instance(d, instance);
 
@@ -4372,7 +4372,7 @@
 					sub = c->tech_pvt;
 					transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 					if (skinnydebug)
-						ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+						ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 					transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 					transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 					transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_OFFHOOK);
@@ -4390,7 +4390,7 @@
 		break;
 	default:
 		if (skinnydebug)
-			ast_debug(1, "RECEIVED UNKNOWN STIMULUS:  %d(%d/%d)\n", event, instance, callreference);
+			ast_verb(1, "RECEIVED UNKNOWN STIMULUS:  %d(%d/%d)\n", event, instance, callreference);
 		break;
 	}
 	ast_device_state_changed("Skinny/%s@%s", l->name, d->name);
@@ -4451,7 +4451,7 @@
 				sub = c->tech_pvt;
 				transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 				if (skinnydebug)
-					ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+					ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 				transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 				transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 				transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_OFFHOOK);
@@ -4502,7 +4502,7 @@
 	sub->cxmode = SKINNY_CX_RECVONLY;
 	transmit_callstate(s, l->instance, l->hookstate, sub->callid);
 	if (skinnydebug)
-		ast_debug(1, "Skinny %s@%s went on hook\n", l->name, d->name);
+		ast_verb(1, "Skinny %s@%s went on hook\n", l->name, d->name);
 	if (l->transfer && (sub->owner && sub->next && sub->next->owner) && ((!sub->outgoing) || (sub->next && !sub->next->outgoing))) {
 		/* We're allowed to transfer, we have two active calls and
 		   we made at least one of the calls.  Let's try and transfer */
@@ -4796,7 +4796,7 @@
 	req->data.buttontemplate.totalButtonCount = htolel(buttonCount);
 
 	if (skinnydebug)
-		ast_debug(1, "Sending %d template to %s\n",
+		ast_verb(1, "Sending %d template to %s\n",
 					d->type,
 					d->name);
 	transmit_response(s, req);
@@ -4832,7 +4832,7 @@
 {
 	/* no response necessary */
 	if (skinnydebug)
-		ast_debug(1, "Received Alarm Message: %s\n", req->data.alarm.displayMessage);
+		ast_verb(1, "Received Alarm Message: %s\n", req->data.alarm.displayMessage);
 
 	return 1;
 }
@@ -4880,15 +4880,14 @@
 	}
 
 	if (skinnydebug)
-		ast_debug(1, "ipaddr = %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
+		ast_verb(1, "ipaddr = %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
 
 	if (!(req = req_alloc(sizeof(struct start_media_transmission_message), START_MEDIA_TRANSMISSION_MESSAGE)))
 		return -1;
 
 	fmt = ast_codec_pref_getsize(&l->prefs, ast_best_codec(l->capability));
 
-	if (skinnydebug)
-		ast_debug(1, "Setting payloadType to '%s' (%d ms)\n", ast_codec2bitstring(fmt.bits, &str), fmt.cur_ms);
+	ast_debug(1, "Setting payloadType to '%s' (%d ms)\n", ast_codec2bitstring(fmt.bits, &str), fmt.cur_ms);
 
 	req->data.startmedia.conferenceId = htolel(sub->callid);
 	req->data.startmedia.passThruPartyId = htolel(sub->callid);
@@ -4914,7 +4913,7 @@
 	pthread_t t;
 
 	if (skinnydebug)
-		ast_debug(1, "Received Enbloc Call: %s\n", req->data.enbloccallmessage.calledParty);
+		ast_verb(1, "Received Enbloc Call: %s\n", req->data.enbloccallmessage.calledParty);
 
 	sub = find_subchannel_by_instance_reference(d, d->lastlineinstance, d->lastcallreference);
 
@@ -4937,7 +4936,7 @@
 		sub = c->tech_pvt;
 		transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 		if (skinnydebug)
-			ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+			ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 		transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 		transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 
@@ -5015,7 +5014,7 @@
 
 	if (!l) {
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: %d(%d/%d)\n", event, instance, callreference);
+			ast_verb(1, "Received Softkey Event: %d(%d/%d)\n", event, instance, callreference);
 		return 0;
 	}
 
@@ -5024,11 +5023,11 @@
 	switch(event) {
 	case SOFTKEY_NONE:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: None(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: None(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_REDIAL:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Redial(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Redial(%d/%d)\n", instance, callreference);
 
 		if (ast_strlen_zero(l->lastnumberdialed)) {
 			ast_log(LOG_WARNING, "Attempted redial, but no previously dialed number found.\n");
@@ -5054,7 +5053,7 @@
 				transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
 			}
 			if (skinnydebug)
-				ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+				ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 			transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 			transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 			transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_RINGOUT);
@@ -5071,7 +5070,7 @@
 		break;
 	case SOFTKEY_NEWCALL:  /* Actually the DIAL softkey */
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: New Call(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: New Call(%d/%d)\n", instance, callreference);
 
 		if (!sub || !sub->owner) {
 			c = skinny_new(l, AST_STATE_DOWN);
@@ -5095,7 +5094,7 @@
 			}
 
 			if (skinnydebug)
-				ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+				ast_verb(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
 			transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
 			transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
 			transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_OFFHOOK);
@@ -5109,7 +5108,7 @@
 		break;
 	case SOFTKEY_HOLD:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Hold(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Hold(%d/%d)\n", instance, callreference);
 
 		if (sub) {
 			if (sub->onhold) {
@@ -5122,12 +5121,12 @@
 		break;
 	case SOFTKEY_TRNSFER:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Transfer(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Transfer(%d/%d)\n", instance, callreference);
 		/* XXX figure out how to transfer */
 		break;
 	case SOFTKEY_DND:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: DND(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: DND(%d/%d)\n", instance, callreference);
 
 		/* Do not disturb */
 		if (l->dnd != 0){
@@ -5144,7 +5143,7 @@
 		break;
 	case SOFTKEY_CFWDALL:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Forward All(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Forward All(%d/%d)\n", instance, callreference);
 
 		if (!sub || !sub->owner) {
 			c = skinny_new(l, AST_STATE_DOWN);
@@ -5161,7 +5160,7 @@
 		break;
 	case SOFTKEY_CFWDBUSY:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Forward Busy (%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Forward Busy (%d/%d)\n", instance, callreference);
 
 		if (!sub || !sub->owner) {
 			c = skinny_new(l, AST_STATE_DOWN);
@@ -5178,7 +5177,7 @@
 		break;
 	case SOFTKEY_CFWDNOANSWER:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Forward No Answer (%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Forward No Answer (%d/%d)\n", instance, callreference);
 
 #if 0 /* Not sure how to handle this yet */
 		if (!sub || !sub->owner) {
@@ -5197,11 +5196,11 @@
 		break;
 	case SOFTKEY_BKSPC:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Backspace(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Backspace(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_ENDCALL:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: End Call(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: End Call(%d/%d)\n", instance, callreference);
 
 		if (l->hookstate == SKINNY_ONHOOK) {
 			/* Something else already put us back on hook */
@@ -5212,7 +5211,7 @@
 			l->hookstate = SKINNY_ONHOOK;
 			transmit_callstate(s, l->instance, l->hookstate, sub->callid);
 			if (skinnydebug)
-				ast_debug(1, "Skinny %s@%s went on hook\n", l->name, d->name);
+				ast_verb(1, "Skinny %s@%s went on hook\n", l->name, d->name);
 			if (l->transfer && (sub->owner && sub->next && sub->next->owner) && ((!sub->outgoing) || (sub->next && !sub->next->outgoing))) {
 				/* We're allowed to transfer, we have two active calls and
 				   we made at least one of the calls.  Let's try and transfer */
@@ -5246,11 +5245,11 @@
 		break;
 	case SOFTKEY_RESUME:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Resume(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Resume(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_ANSWER:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Answer(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Answer(%d/%d)\n", instance, callreference);
 
 		transmit_ringer_mode(s,SKINNY_RING_OFF);
 		transmit_lamp_indication(s, STIMULUS_LINE, l->instance, SKINNY_LAMP_ON);
@@ -5270,38 +5269,38 @@
 		break;
 	case SOFTKEY_INFO:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Info(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Info(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_CONFRN:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Conference(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Conference(%d/%d)\n", instance, callreference);
 		/* XXX determine the best way to pull off a conference.  Meetme? */
 		break;
 	case SOFTKEY_PARK:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Park Call(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Park Call(%d/%d)\n", instance, callreference);
 		/* XXX Park the call */
 		break;
 	case SOFTKEY_JOIN:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Join(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Join(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_MEETME:
 		/* XXX How is this different from CONFRN? */
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Meetme(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Meetme(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_PICKUP:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Pickup(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Pickup(%d/%d)\n", instance, callreference);
 		break;
 	case SOFTKEY_GPICKUP:
 		if (skinnydebug)
-			ast_debug(1, "Received Softkey Event: Group Pickup(%d/%d)\n", instance, callreference);
+			ast_verb(1, "Received Softkey Event: Group Pickup(%d/%d)\n", instance, callreference);
 		break;
 	default:
 		if (skinnydebug)
-			ast_debug(1, "Received unknown Softkey Event: %d(%d/%d)\n", event, instance, callreference);
+			ast_verb(1, "Received unknown Softkey Event: %d(%d/%d)\n", event, instance, callreference);
 		break;
 	}
 	ast_device_state_changed("Skinny/%s@%s", l->name, d->name);
@@ -5357,7 +5356,7 @@
 		break;
 	case REGISTER_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Device %s is attempting to register\n", req->data.reg.name);
+			ast_verb(1, "Device %s is attempting to register\n", req->data.reg.name);
 
 		res = handle_register_message(req, s);
 		break;
@@ -5372,7 +5371,7 @@
 		int callReference;
 
 		if (skinnydebug)
-			ast_debug(1, "Collected digit: [%d]\n", letohl(req->data.keypad.button));
+			ast_verb(1, "Collected digit: [%d]\n", letohl(req->data.keypad.button));
 
 		lineInstance = letohl(req->data.keypad.lineInstance);
 		callReference = letohl(req->data.keypad.callReference);
@@ -5421,42 +5420,42 @@
 		break;
 	case CAPABILITIES_RES_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received CapabilitiesRes\n");
+			ast_verb(1, "Received CapabilitiesRes\n");
 
 		res = handle_capabilities_res_message(req, s);
 		break;
 	case SPEED_DIAL_STAT_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received SpeedDialStatRequest\n");
+			ast_verb(1, "Received SpeedDialStatRequest\n");
 
 		res = handle_speed_dial_stat_req_message(req, s);
 		break;
 	case LINE_STATE_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received LineStatRequest\n");
+			ast_verb(1, "Received LineStatRequest\n");
 		res = handle_line_state_req_message(req, s);
 		break;
 	case TIME_DATE_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received Time/Date Request\n");
+			ast_verb(1, "Received Time/Date Request\n");
 
 		res = handle_time_date_req_message(req, s);
 		break;
 	case BUTTON_TEMPLATE_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Buttontemplate requested\n");
+			ast_verb(1, "Buttontemplate requested\n");
 
 		res = handle_button_template_req_message(req, s);
 		break;
 	case VERSION_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Version Request\n");
+			ast_verb(1, "Version Request\n");
 
 		res = handle_version_req_message(req, s);
 		break;
 	case SERVER_REQUEST_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received Server Request\n");
+			ast_verb(1, "Received Server Request\n");
 
 		res = handle_server_request_message(req, s);
 		break;
@@ -5465,13 +5464,13 @@
 		break;
 	case OPEN_RECEIVE_CHANNEL_ACK_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received Open Receive Channel Ack\n");
+			ast_verb(1, "Received Open Receive Channel Ack\n");
 
 		res = handle_open_receive_channel_ack_message(req, s);
 		break;
 	case SOFT_KEY_SET_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received SoftKeySetReq\n");
+			ast_verb(1, "Received SoftKeySetReq\n");
 
 		res = handle_soft_key_set_req_message(req, s);
 		break;
@@ -5480,13 +5479,13 @@
 		break;
 	case UNREGISTER_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received Unregister Request\n");
+			ast_verb(1, "Received Unregister Request\n");
 
 		res = handle_unregister_message(req, s);
 		break;
 	case SOFT_KEY_TEMPLATE_REQ_MESSAGE:
 		if (skinnydebug)
-			ast_debug(1, "Received SoftKey Template Request\n");
+			ast_verb(1, "Received SoftKey Template Request\n");
 
 		res = handle_soft_key_template_req_message(req, s);
 		break;
@@ -5498,7 +5497,7 @@
 		break;
 	default:
 		if (skinnydebug)
-			ast_debug(1, "RECEIVED UNKNOWN MESSAGE TYPE:  %x\n", letohl(req->e));
+			ast_verb(1, "RECEIVED UNKNOWN MESSAGE TYPE:  %x\n", letohl(req->e));
 		break;
 	}
 	if (res >= 0 && req)
@@ -5554,7 +5553,7 @@
 		}
  	} else if (res == 0) {
 		if (skinnydebug)
-			ast_debug(1, "Skinny Client was lost, unregistering\n");
+			ast_verb(1, "Skinny Client was lost, unregistering\n");
 		skinny_unregister(NULL, s);
 		return -1;
 	}
@@ -5567,7 +5566,7 @@
 			ast_log(LOG_WARNING, "read() returned error: %s\n", strerror(errno));
 
 			if (skinnydebug)
-				ast_debug(1, "Skinny Client was lost, unregistering\n");
+				ast_verb(1, "Skinny Client was lost, unregistering\n");
 	      
 			skinny_unregister(NULL,s);
 			ast_mutex_unlock(&s->lock);
@@ -5578,7 +5577,7 @@
 			
 			if (res == 0) {
 				if (skinnydebug)
-					ast_debug(1, "Skinny Client was lost, unregistering\n");
+					ast_verb(1, "Skinny Client was lost, unregistering\n");
 				skinny_unregister(NULL, s);
 			}
 		     
@@ -5707,7 +5706,7 @@
 		}
 	}
 	if (skinnydebug)
-		ast_debug(1, "killing accept thread\n");
+		ast_verb(1, "killing accept thread\n");
 	close(as);
 	return 0;
 }

Modified: team/group/codec_bits/contrib/scripts/astcli
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/contrib/scripts/astcli?view=diff&rev=113872&r1=113871&r2=113872
==============================================================================
--- team/group/codec_bits/contrib/scripts/astcli (original)
+++ team/group/codec_bits/contrib/scripts/astcli Wed Apr  9 13:32:33 2008
@@ -80,6 +80,7 @@
 		(undef,$host) = split(/[,=]/, $_) if $_ =~ /host(name)?[,=]/i;
 		(undef,$port) = split(/[,=]/, $_) if $_ =~ /port(num|no)?[,=]/i;
 	}
+	close ($fh);
 }
 
 sub usage {

Modified: team/group/codec_bits/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/main/pbx.c?view=diff&rev=113872&r1=113871&r2=113872
==============================================================================
--- team/group/codec_bits/main/pbx.c (original)
+++ team/group/codec_bits/main/pbx.c Wed Apr  9 13:32:33 2008
@@ -3592,8 +3592,12 @@
 				if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
 					c->_softhangup = 0;
 					continue;
-				} else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT) {
-					/* atimeout, nothing bad */
+				} else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT && ast_exists_extension(c, c->context, "T", 1, c->cid.cid_num)) {
+					set_ext_pri(c, "T", 1); 
+					/* If the AbsoluteTimeout is not reset to 0, we'll get an infinite loop */
+					c->whentohangup = 0;
+					c->_softhangup &= ~AST_SOFTHANGUP_TIMEOUT;
+					continue;
 				} else {
 					if (c->cdr)
 						ast_cdr_update(c);




More information about the asterisk-commits mailing list