From a0719fe5b29a1e11351f76ee6ee53f5b9038ca36 Mon Sep 17 00:00:00 2001 From: Henri Herscher Date: Thu, 20 Apr 2006 15:18:13 +0000 Subject: Session timeout is now 5 minutes when signalling detected. Metadata now correctly detected for Skinny "forward" call type. git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@219 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkaudio/audiocaptureplugins/voip/PacketHeaderDefs.h | 1 + orkaudio/audiocaptureplugins/voip/RtpSession.cpp | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/orkaudio/audiocaptureplugins/voip/PacketHeaderDefs.h b/orkaudio/audiocaptureplugins/voip/PacketHeaderDefs.h index fcc8621..4eec34d 100644 --- a/orkaudio/audiocaptureplugins/voip/PacketHeaderDefs.h +++ b/orkaudio/audiocaptureplugins/voip/PacketHeaderDefs.h @@ -146,6 +146,7 @@ typedef struct #define SKINNY_CALL_TYPE_INBOUND 1 #define SKINNY_CALL_TYPE_OUTBOUND 2 +#define SKINNY_CALL_TYPE_FORWARD 3 typedef enum { diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp index fcf39e3..c050806 100644 --- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp +++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp @@ -14,6 +14,7 @@ #define _WINSOCKAPI_ // prevents the inclusion of winsock.h #define RTP_SESSION_TIMEOUT 10 +#define RTP_WITH_SIGNALLING_SESSION_TIMEOUT (5*60) #include "Utils.h" #include "RtpSession.h" @@ -525,6 +526,7 @@ void RtpSessions::ReportSkinnyCallInfo(SkCallInfoStruct* callInfo, IpHeaderStruc 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; @@ -534,6 +536,9 @@ void RtpSessions::ReportSkinnyCallInfo(SkCallInfoStruct* callInfo, IpHeaderStruc session->m_remoteParty = callInfo->calledParty; session->m_direction = CaptureEvent::DirOut; break; + default: + session->m_localParty = callInfo->calledParty; + session->m_remoteParty = callInfo->callingParty; } if(m_log->isInfoEnabled()) @@ -834,7 +839,16 @@ void RtpSessions::Hoover(time_t now) for(pair = m_byIpAndPort.begin(); pair != m_byIpAndPort.end(); pair++) { RtpSessionRef session = pair->second; - if((now - session->m_lastUpdated) > RTP_SESSION_TIMEOUT) + int timeoutSeconds = 0; + if(session->m_protocol == RtpSession::ProtRawRtp) + { + timeoutSeconds = RTP_SESSION_TIMEOUT; + } + else + { + timeoutSeconds = RTP_WITH_SIGNALLING_SESSION_TIMEOUT; + } + if((now - session->m_lastUpdated) > timeoutSeconds) { toDismiss.push_back(session); } -- cgit v1.2.3