Don't you fix such obvious problems and bugs in time?
Opalmixer uses cache m_ Transcoder->convert (cache.m\u raw, cache.m\u encoded)) this line of code will convert the mixed voice transmission into voice transmission of different media. If opal converts the media, it will not synchronously modify the cache m_ Transcoder, then the old media converter negotiated earlier will be used to convert audio.
I have modified it in the opal 3.18 branch, and the test passed. The void opalaudiostreammixer:: pushone function needs to be modified. The specific modification code is as follows: // modify by byzhou 2022-06-26 if (cache.m_transcoder == NULL || cache.m_transcoder->GetPayloadType(false) != mediaFormat.GetPayloadType()) { if(cache.m_transcoder != NULL) { delete cache.m_transcoder; cache.m_transcoder = NULL; } Original code is: if (cache.m_transcoder == NULL) {
In the normal mode, opal library has no problem in handling media changes. However, if opalmixer is used for mixing in mcu mode, the currently used audio transcoder will be saved in cacheaudio due to the use of the cachedaudio mechanism. When changing to a new media through reinvite or update, the audio transcoder in cachedaudio will not be modified synchronously, Even after the entire protocol layer has been successfully negotiated as a new media, the previous audio transcoder will be used in cachedaudio...
Why not correct such an obvious mistake
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()...
After the call is actively cancelled, an ACK will be sent after receiving a temporary response
Such an obvious error can be found by compiling with C + + 11, that is, why not modify it