q931: If we're the network, channelID in ALERTING/CALL_PROC/CONNECT is mandatory

The user may suggest a given channel in the SETUP, but it's not legal
for the network to return a non-mandatory ChannelID.

See Q.931 Section 5.1.2 (B-channel selection - Originating):

The selected B-channel is indicated in the Channel identification information
element coded as "channel is indicated, no acceptable alternative" in the first
message returned by the network in response to the SETUP message (i.e. a SETUP
ACKNOWLEDGE or CALL PROCEEDING message)

In an earlier commit I had only fixed SETUP ACK, but missed that this is
a more general problem that needs addressing in whatever is the first
message containing a channelID yate sends in response to the SETUP.
This commit is contained in:
Harald Welte 2022-10-17 21:19:26 +02:00
parent 071d635fc6
commit 1bad0f5194
1 changed files with 6 additions and 0 deletions

View File

@ -1471,6 +1471,8 @@ bool ISDNQ931Call::sendAlerting(SignallingMessage* sigMsg)
return sendReleaseComplete("congestion");
}
}
if (q931()->network())
m_data.m_channelMandatory = true;
m_data.processChannelID(msg,true,&q931()->parserData());
m_channelIDSent = true;
}
@ -1491,6 +1493,8 @@ bool ISDNQ931Call::sendCallProceeding(SignallingMessage* sigMsg)
m_rspBearerCaps = false;
}
if (!m_channelIDSent) {
if (q931()->network())
m_data.m_channelMandatory = true;
m_data.processChannelID(msg,true);
m_channelIDSent = true;
}
@ -1519,6 +1523,8 @@ bool ISDNQ931Call::sendConnect(SignallingMessage* sigMsg)
m_data.m_channelByNumber = true;
m_data.m_channelSelect = lookup(m_circuit->code(),Q931Parser::s_dict_channelIDSelect_BRI);
}
if (q931()->network())
m_data.m_channelMandatory = true;
m_data.processChannelID(msg,true,&q931()->parserData());
m_channelIDSent = true;
}