diff options
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r-- | orkaudio/audiocaptureplugins/voip/RtpSession.cpp | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp index 2d0ceea..397874f 100644 --- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp +++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp @@ -801,6 +801,28 @@ void RtpSessions::ReportSipBye(SipByeInfo bye) } } +void RtpSessions::UpdateSessionWithCallInfo(SkCallInfoStruct* callInfo, RtpSessionRef& session) +{ + switch(callInfo->callType) + { + case SKINNY_CALL_TYPE_INBOUND: + case SKINNY_CALL_TYPE_FORWARD: + session->m_localParty = callInfo->calledParty; + session->m_remoteParty = callInfo->callingParty; + session->m_direction = CaptureEvent::DirIn; + break; + case SKINNY_CALL_TYPE_OUTBOUND: + session->m_localParty = callInfo->callingParty; + session->m_remoteParty = callInfo->calledParty; + session->m_direction = CaptureEvent::DirOut; + break; + default: + session->m_localParty = callInfo->calledParty; + session->m_remoteParty = callInfo->callingParty; + } +} + + void RtpSessions::ReportSkinnyCallInfo(SkCallInfoStruct* callInfo, IpHeaderStruct* ipHeader) { CStdString callId = GenerateSkinnyCallId(ipHeader->ip_dest, callInfo->callId); @@ -813,6 +835,10 @@ void RtpSessions::ReportSkinnyCallInfo(SkCallInfoStruct* callInfo, IpHeaderStruc // just update timestamp RtpSessionRef existingSession = pair->second; existingSession->m_skinnyLastCallInfoTime = ACE_OS::gettimeofday(); + if(DLLCONFIG.m_skinnyAllowCallInfoUpdate) + { + UpdateSessionWithCallInfo(callInfo, existingSession); + } return; } @@ -822,23 +848,7 @@ void RtpSessions::ReportSkinnyCallInfo(SkCallInfoStruct* callInfo, IpHeaderStruc session->m_callId = callId; session->m_endPointIp = ipHeader->ip_dest; // CallInfo message always goes from CM to endpoint session->m_protocol = RtpSession::ProtSkinny; - switch(callInfo->callType) - { - case SKINNY_CALL_TYPE_INBOUND: - case SKINNY_CALL_TYPE_FORWARD: - session->m_localParty = callInfo->calledParty; - session->m_remoteParty = callInfo->callingParty; - session->m_direction = CaptureEvent::DirIn; - break; - case SKINNY_CALL_TYPE_OUTBOUND: - session->m_localParty = callInfo->callingParty; - session->m_remoteParty = callInfo->calledParty; - session->m_direction = CaptureEvent::DirOut; - break; - default: - session->m_localParty = callInfo->calledParty; - session->m_remoteParty = callInfo->callingParty; - } + UpdateSessionWithCallInfo(callInfo, session); if(m_log->isInfoEnabled()) { |