Keep hook-flash timer when CC-DISC-REQ or DTMF is received

The timer must be kept, so that call gets released when it times out.
This commit is contained in:
Andreas Eversberg 2023-03-05 12:12:47 +01:00
parent 90913f6570
commit 7daaa65487
1 changed files with 12 additions and 6 deletions

View File

@ -623,10 +623,10 @@ void recv_dtmf(void *priv, char digit, dtmf_meas_t __attribute__((unused)) *meas
pulse_off(pstn);
/* stop tone */
tone_off(pstn);
/* stop timer */
timer_off(pstn);
/* if we are receiving digits en block */
if (pstn->call[PSTN_CALL_ACTIVE]->state == CALL_STATE_ENBLOCK) {
/* stop timer */
timer_off(pstn);
if (digit == '#') {
PDEBUG(DTEL, DEBUG_DEBUG, "Digit '#' received, number is complete, send setup\n");
/* setup (en block) */
@ -1206,8 +1206,11 @@ void cc_message(osmo_cc_endpoint_t *ep, uint32_t callref, osmo_cc_msg_t *msg)
release_call(pstn, hold, isdn_cause);
break;
}
/* keep hookflash timer running */
if (pstn->timer_ident != TIMER_IDENT_HOOKFLASH) {
/* stop timer */
timer_off(pstn);
}
/* release ringing call (or call that rings because it is on hold) */
if (pstn_call->state == CALL_STATE_ALERTING_SUB
|| pstn_call->state == CALL_STATE_HOLD) {
@ -1239,8 +1242,11 @@ void cc_message(osmo_cc_endpoint_t *ep, uint32_t callref, osmo_cc_msg_t *msg)
release_call(pstn, hold, isdn_cause);
break;
}
/* keep hookflash timer running */
if (pstn->timer_ident != TIMER_IDENT_HOOKFLASH) {
/* stop timer */
timer_off(pstn);
}
/* negotiate audio */
rc = osmo_cc_helper_audio_negotiate(msg, &pstn_call->cc_session, &pstn_call->codec);
if (rc < 0) {