We're trying to use the latest OPAL (trunk). The old version worked fine, but the new doesn't work as expected: it fails on socket read, so it calls OpalManager::OnMediaFailed in OpalRTPSession::ReadRawPDU.
14-07-21 17:08:41,349 (MCUTest.TransferCallTest) ERROR Media Patch:8696 rtp_session.cxx(2359) RTP Session 1, Control read error (10054): C runtime error 10054
14-07-21 17:08:41,349 (MCUTest.TransferCallTest) WARN Media Patch:8696 manager.cxx(1385) OpalMan Session 1 receive media failed, releasing [RcNetworkCall: call custom call 1, remote party sip:6270@192.168.202.63]-EP<sip>[06fc1478-4e0d-1910-99b3-902b341f772d]
14-07-21 17:08:41,350 (MCUTest.TransferCallTest) DEBUG Media Patch:8696 patch.cxx(745) Patch Thread ended because source read failed
Also there are a lot of
rtp_session.cxx(1019) RTP Session 1, ignoring SSRC 6228 (0x1854)
and
rtp_session.cxx(1019) RTP Session 1, ignoring SSRC 61795507 (0x3aeecb3)
messages.
See the attached log file.
I've double checked: the issue is in rev. 32281 (PTLIB: Fixed correct interpretation of errno values to to PChannel::Errors, in particular getting PChannel::Unavailable when have ECONNREFUSED when have to get error via recvmsg() function).
UPD: Windows 7 x64.
Previous version (that works) returns PChannel::Unavailable (it's OK I think because I see ICMP destination unreachable packet in the Wireshark).
Previous version uses lastErrorNumber[group] to check the error for the (ECONNRESET, ECONNREFUSED, EHOSTUNREACH, ENETUNREACH) codes.
The latest PTLIB updates lastErrorNumber[group] with os_errno() which doesn't return one of them.
But lastErrorNumber[group] already contains correct value before the os_errno() call, because PSocket::ConvertOSError calls PChannel::ConvertOSError which correctly updates lastErrorNumber from the ::GetLastError() call.
If I change line
to
then OPAL works as expected here.
This is the same code as in Lacaille, so I am not sure why it was not a problem there too. Unfortunately, your change would break Linux. I have checked in a fix which should work on both.