[Opalvoip-user] Incorrect(?) bandwidth negotiations behavior
Brought to you by:
csoutheren,
rjongbloed
From: Toan V. <TV...@fu...> - 2013-05-15 19:46:57
|
Hi all, I'm dialing from Openphone into a Tandberg 1000 with H323. H.264 and H.261 are both enabled. The Tandberg orders H.261 over H.264, whereas Openphone orders H.264 over H.261. I've edited Openphone to have a higher terminal type ( > 50, specifically e_GatewayAndMC, and also sometimes with e_GatekeeperWithDataMP). It is definitely the master from the logs, which would lead me to believe that the two connections would be H.264 because Openphone is master. However, Openphone transmits H.264 while the Tandberg transmits H.261! I checked h323.cxx's H323Connection::GetMediaFormats(), which includes a chunk of code which hints at master/slave conflict resolution: if ( IsH245Master() && ( (localCapabilities.GetSize() > 0 && localCapabilities[0].GetCapabilityDirection() == H323Capability::e_ReceiveAndTransmit) || (remoteCapabilities.GetSize() > 0 && remoteCapabilities[0].GetCapabilityDirection() == H323Capability::e_ReceiveAndTransmit) )) { /* If symmetry is required and we are the master we re-order their formats to OUR order. This avoids a masterSlaveConflict (assuming other end is working correctly) and some unecessaary open logical channel round trips. Techniically, we should be a bit more sophisticated in determining symmtery requirement, but 99.9% of the time of the first, if the entry is symmetric, they all are. */ PStringArray order; OpalMediaFormatList local = localCapabilities.GetMediaFormats(); for (OpalMediaFormatList::iterator it = local.begin(); it != local.end(); ++it) order.AppendString(it->GetName()); list.Reorder(order); PTRACE(2, "H323\tRe-ordered media formats due to symmetry rules on " << *this); } However, it doesn't seem like this condition is ever true, so the stuff inside never gets executed. Specifically, the part that checks for whether or not the capabilities are e_ReceiveAndTransmit. It seems like both local and remote capabilities are only e_Receive. Am I right that this chunk takes care of master slave conflicts and if so, why isn't it doing that? Thanks, -Toan Software Engineering Intern |