After the call is actively cancelled, an ACK will be sent after receiving a...
Brought to you by:
csoutheren,
rjongbloed
In the latest version of opal 3.18, UAC is developed using opal. When UAC initiates the cancel message and receives the 180 or 183 message from UAS again, UAC will send an ACK message. The specific code is due to the wrong logic in the function:
bool sipconnection:: onreceivedresponsetoinvite (siptransaction & transaction, sip_pdu & response)
// See if duplicate response because our ACK was lost or too slow.
if (transaction.IsCompleted())
return true
This is wrong and should be changed to:
// See if duplicate response because our ACK was lost or too slow.
if (transaction.IsCompleted())
return statusCode >= 200; // Don't send ACK if only provisional response;
The modification logic I made yesterday is a little incomplete. You should directly modify the function pboolean sipinvite:: onreceivedresponse (sip_pdu & response), and the code in it:
if (GetConnection()->OnReceivedResponseToINVITE(*this, response)) {
// ACK constructed following 13.2.2.4 or 17.1.1.3
SIPAck ack(*this, response);
if (!ack.Send())
return false;
}
Amend to read:
if (GetConnection()->OnReceivedResponseToINVITE(*this, response)) {
// ACK constructed following 13.2.2.4 or 17.1.1.3
if(response.GetStatusCode() >= 200) {
SIPAck ack(*this, response);
if (!ack.Send())
return false;
}
}
It is obvious that you never need to send an ACK for a temporary response
Why not correct such an obvious mistake