[asterisk-commits] wedhorn: branch 11 r379677 - /branches/11/channels/chan_skinny.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 21 00:27:27 CST 2013
Author: wedhorn
Date: Mon Jan 21 00:27:24 2013
New Revision: 379677
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379677
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)
Modified:
branches/11/channels/chan_skinny.c
Modified: branches/11/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_skinny.c?view=diff&rev=379677&r1=379676&r2=379677
==============================================================================
--- branches/11/channels/chan_skinny.c (original)
+++ branches/11/channels/chan_skinny.c Mon Jan 21 00:27:24 2013
@@ -3108,25 +3108,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)
@@ -5235,6 +5216,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);
@@ -5278,6 +5262,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 asterisk-commits
mailing list