Fixed handling of call collision

An establishment is received from AN (access network), while
establishment request was sent to AN. The call is answered.
This commit is contained in:
Andreas Eversberg 2023-01-03 11:23:21 +01:00
parent 994c974074
commit 6a812616a4
1 changed files with 9 additions and 2 deletions

View File

@ -1542,8 +1542,15 @@ static void v5_receive(pstn_t *pstn, uint8_t *data, int len)
break; break;
case PSTN_EVENT_EST_IND: case PSTN_EVENT_EST_IND:
/* in case of collision, just treat as ACK and proceed outgoing call */ /* in case of collision, just treat as ACK and proceed outgoing call */
if (pstn->state != PSTN_STATE_EST_LE if (pstn->state == PSTN_STATE_EST_LE) {
&& pstn->state != PSTN_STATE_NULL) { PDEBUG(DTEL, DEBUG_INFO, " -> Handle establish collision, send ACK.\n");
/* send ack message to V5 */
v5_est_ack_req(pstn);
/* treat as establish acknowledgement from PSTN interface */
v5_est_ack_ind(pstn, data, len);
break;
}
if (pstn->state != PSTN_STATE_NULL) {
PDEBUG(DTEL, DEBUG_NOTICE, "Received %s message in state %s, ignoring!\n", pstn_event_name(event), pstn_state_name(pstn->state)); PDEBUG(DTEL, DEBUG_NOTICE, "Received %s message in state %s, ignoring!\n", pstn_event_name(event), pstn_state_name(pstn->state));
break; break;
} }