AMPS/TACS: Fixing release towards mobile station on FVC
We must continuously send release frames until Signaling Tone changes, so we know that the phone has received the release.
This commit is contained in:
@@ -680,7 +680,7 @@ static void amps_release(transaction_t *trans, uint8_t cause)
|
|||||||
trans->callref = 0;
|
trans->callref = 0;
|
||||||
}
|
}
|
||||||
/* change DSP mode to transmit release */
|
/* change DSP mode to transmit release */
|
||||||
if (amps->dsp_mode == DSP_MODE_AUDIO_RX_AUDIO_TX)
|
if (amps->dsp_mode == DSP_MODE_AUDIO_RX_AUDIO_TX || amps->dsp_mode == DSP_MODE_OFF)
|
||||||
amps_set_dsp_mode(amps, DSP_MODE_AUDIO_RX_FRAME_TX, 0);
|
amps_set_dsp_mode(amps, DSP_MODE_AUDIO_RX_FRAME_TX, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,10 +703,12 @@ void amps_rx_signaling_tone(amps_t *amps, int tone, double quality)
|
|||||||
|
|
||||||
switch (trans->state) {
|
switch (trans->state) {
|
||||||
case TRANS_CALL:
|
case TRANS_CALL:
|
||||||
case TRANS_CALL_RELEASE:
|
|
||||||
case TRANS_CALL_RELEASE_SEND:
|
|
||||||
if (!tone)
|
if (!tone)
|
||||||
break;
|
break;
|
||||||
|
/* fall through */
|
||||||
|
case TRANS_CALL_RELEASE:
|
||||||
|
case TRANS_CALL_RELEASE_SEND:
|
||||||
|
/* also loosing singaling tone indicates release confirm (after alerting) */
|
||||||
timer_stop(&trans->timer);
|
timer_stop(&trans->timer);
|
||||||
if (trans->callref)
|
if (trans->callref)
|
||||||
call_up_release(trans->callref, CAUSE_NORMAL);
|
call_up_release(trans->callref, CAUSE_NORMAL);
|
||||||
@@ -1122,7 +1124,18 @@ static amps_t *assign_voice_channel(transaction_t *trans)
|
|||||||
if (vc == amps)
|
if (vc == amps)
|
||||||
PDEBUG(DAMPS, DEBUG_INFO, "Staying on combined control + voice channel %d\n", vc->sender.kanal);
|
PDEBUG(DAMPS, DEBUG_INFO, "Staying on combined control + voice channel %d\n", vc->sender.kanal);
|
||||||
else
|
else
|
||||||
PDEBUG(DAMPS, DEBUG_INFO, "Moving to traffic channel %d\n", vc->sender.kanal);
|
PDEBUG(DAMPS, DEBUG_INFO, "Moving to voice channel %d\n", vc->sender.kanal);
|
||||||
|
|
||||||
|
/* switch channel... */
|
||||||
|
timer_start(&trans->timer, SAT_TO1);
|
||||||
|
/* make channel busy */
|
||||||
|
amps_new_state(vc, STATE_BUSY);
|
||||||
|
/* relink */
|
||||||
|
unlink_transaction(trans);
|
||||||
|
link_transaction(trans, vc);
|
||||||
|
/* flush all other transactions, if any (in case of combined VC + CC) */
|
||||||
|
amps_flush_other_transactions(vc, trans);
|
||||||
|
|
||||||
if (!trans->callref) {
|
if (!trans->callref) {
|
||||||
/* setup call */
|
/* setup call */
|
||||||
PDEBUG(DAMPS, DEBUG_INFO, "Setup call to network.\n");
|
PDEBUG(DAMPS, DEBUG_INFO, "Setup call to network.\n");
|
||||||
@@ -1134,14 +1147,6 @@ static amps_t *assign_voice_channel(transaction_t *trans)
|
|||||||
}
|
}
|
||||||
trans->callref = callref;
|
trans->callref = callref;
|
||||||
}
|
}
|
||||||
timer_start(&trans->timer, SAT_TO1);
|
|
||||||
/* make channel busy */
|
|
||||||
amps_new_state(vc, STATE_BUSY);
|
|
||||||
/* relink */
|
|
||||||
unlink_transaction(trans);
|
|
||||||
link_transaction(trans, vc);
|
|
||||||
/* flush all other transactions, if any (in case of combined VC + CC) */
|
|
||||||
amps_flush_other_transactions(vc, trans);
|
|
||||||
|
|
||||||
return vc;
|
return vc;
|
||||||
}
|
}
|
||||||
@@ -1216,7 +1221,6 @@ transaction_t *amps_tx_frame_fvc(amps_t *amps)
|
|||||||
{
|
{
|
||||||
transaction_t *trans = amps->trans_list;
|
transaction_t *trans = amps->trans_list;
|
||||||
|
|
||||||
again:
|
|
||||||
trans = amps->trans_list;
|
trans = amps->trans_list;
|
||||||
if (!trans)
|
if (!trans)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1227,10 +1231,8 @@ again:
|
|||||||
trans_new_state(trans, TRANS_CALL_RELEASE_SEND);
|
trans_new_state(trans, TRANS_CALL_RELEASE_SEND);
|
||||||
return trans;
|
return trans;
|
||||||
case TRANS_CALL_RELEASE_SEND:
|
case TRANS_CALL_RELEASE_SEND:
|
||||||
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Release call was sent, destroying call\n");
|
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Release call was sent, continue sending release\n");
|
||||||
destroy_transaction(trans);
|
return trans;
|
||||||
amps_go_idle(amps);
|
|
||||||
goto again;
|
|
||||||
case TRANS_CALL_MT_ALERT:
|
case TRANS_CALL_MT_ALERT:
|
||||||
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Sending alerting\n");
|
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Sending alerting\n");
|
||||||
return trans;
|
return trans;
|
||||||
|
Reference in New Issue
Block a user