[svn-commits] wedhorn: trunk r379678 - in /trunk: ./ channels/chan_skinny.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jan 21 01:26:08 CST 2013


Author: wedhorn
Date: Mon Jan 21 01:26:04 2013
New Revision: 379678

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379678
Log:
Fix device call logging issues in skinny

Skinny device call logging (ie missed, place and received calls) has issues 
because the incorrect sequence of callstates is/can be sent to the device.
This patch removes some extra callstate updates driven by forces external
to skinny and ensures the needed intermediary callstate messages are sent.

(closes issue ASTERISK-20964)
Reported by: wedhorn
Tested by: snuffy, myself
Patches: 
    ast11-skinny-calllog01.diff uploaded by wedhorn (license 5019)
........

Merged revisions 379677 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/chan_skinny.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=379678&r1=379677&r2=379678
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Jan 21 01:26:04 2013
@@ -3125,25 +3125,6 @@
 	SKINNY_DEBUG(DEBUG_SUB, 3, "Sub %d - Updating\n", sub->callid);
 
 	send_callinfo(sub);
-	if (ast_channel_state(sub->owner) == AST_STATE_UP) {
-		transmit_callstate(d, l->instance, sub->callid, SKINNY_CONNECTED);
-		transmit_displaypromptstatus(d, "Connected", 0, l->instance, sub->callid);
-	} else {
-		if (sub->calldirection == SKINNY_INCOMING) {
-			transmit_callstate(d, l->instance, sub->callid, SKINNY_RINGIN);
-			transmit_displaypromptstatus(d, "Ring-In", 0, l->instance, sub->callid);
-		} else {
-			if (!sub->ringing) {
-				transmit_callstate(d, l->instance, sub->callid, SKINNY_RINGOUT);
-				transmit_displaypromptstatus(d, "Ring-Out", 0, l->instance, sub->callid);
-				sub->ringing = 1;
-			} else {
-				transmit_callstate(d, l->instance, sub->callid, SKINNY_PROGRESS);
-				transmit_displaypromptstatus(d, "Call Progress", 0, l->instance, sub->callid);
-				sub->progress = 1;
-			}
-		}
-	}
 }
 
 static void mwi_event_cb(const struct ast_event *event, void *userdata)
@@ -5265,6 +5246,9 @@
 			ast_log(LOG_WARNING, "Cannot set substate to SUBSTATE_RINGOUT from %s (on call-%d)\n", substate2str(sub->substate), sub->callid);
 			return;
 		}
+		if (sub->substate != SUBSTATE_PROGRESS) {
+			transmit_callstate(d, l->instance, sub->callid, SKINNY_PROGRESS);
+		}
 
 		if (!d->earlyrtp) {
 			transmit_start_tone(d, SKINNY_ALERT, l->instance, sub->callid);
@@ -5308,6 +5292,9 @@
 		sub->substate = SUBSTATE_CALLWAIT;
 		break;
 	case SUBSTATE_CONNECTED:
+		if (sub->substate == SUBSTATE_RINGIN) {
+			transmit_callstate(d, l->instance, sub->callid, SKINNY_OFFHOOK);
+		}
 		if (sub->substate == SUBSTATE_HOLD) {
 			ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
 			transmit_connect(d, sub);




More information about the svn-commits mailing list