summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-08-01 14:46:11 +0000
committerHenri Herscher <henri@oreka.org>2006-08-01 14:46:11 +0000
commit7ff2749a4dd54db0b8967edd831bfd7110fa7a2a (patch)
tree826cf0e49af9df364fdc80d3b7d2555605664c8d /orkaudio/audiocaptureplugins/voip
parent73d206c551c8af905f24336695d457ca3986c6e9 (diff)
Applying changeset 284 from 0.5 to trunk:
Skinny endpoint now always used as Local IP address and Capture Port. git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@321 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip')
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index f3b9d12..a37ccbb 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -219,22 +219,21 @@ void RtpSession::ProcessMetadataSip(RtpPacketInfoRef& rtpPacket)
void RtpSession::ProcessMetadataSkinny(RtpPacketInfoRef& rtpPacket)
{
- // In skinny, we know that ipAndPort are always those of the remote party (other internal phone or gateway).
- // However, what we want as a capture port are IP+Port of the local phone
- char szSourceIp[16];
- ACE_OS::inet_ntop(AF_INET, (void*)&rtpPacket->m_sourceIp, szSourceIp, sizeof(szSourceIp));
- m_capturePort.Format("%s,%u", szSourceIp, rtpPacket->m_sourcePort);
- if(m_capturePort.Equals(m_ipAndPort))
+ // In Skinny we always want the endpoint (phone) to be used as a capture port and as a local IP address
+ char szEndpointIp[16];
+ ACE_OS::inet_ntop(AF_INET, (void*)&m_endPointIp, szEndpointIp, sizeof(szEndpointIp));
+
+ if( ( (unsigned int)m_endPointIp.s_addr) == ((unsigned int)rtpPacket->m_destIp.s_addr) )
{
- char szDestIp[16];
- ACE_OS::inet_ntop(AF_INET, (void*)&rtpPacket->m_destIp, szDestIp, sizeof(szDestIp));
- m_capturePort.Format("%s,%u", szDestIp, rtpPacket->m_destPort);
+ m_capturePort.Format("%s,%u", szEndpointIp, rtpPacket->m_destPort);
m_localIp = rtpPacket->m_destIp;
m_remoteIp = rtpPacket->m_sourceIp;
}
else
{
+ m_capturePort.Format("%s,%u", szEndpointIp, rtpPacket->m_sourcePort);
+
m_localIp = rtpPacket->m_sourceIp;
m_remoteIp = rtpPacket->m_destIp;
}