summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/VoIp.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2009-07-24 06:10:29 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2009-07-24 06:10:29 +0000
commit4807fe2c6198b39aff5c1ff1144c465b97575cb8 (patch)
tree6d28c490a4ed771d5f50e9e557c972ce6fd0f173 /orkaudio/audiocaptureplugins/voip/VoIp.cpp
parent1ed6f23ad180e37cb3b6564f6a613197f05508e5 (diff)
Added new configuration parameter, SipTreat200OkAsInvite, which causes SIP 200 OK packets to be treates as INVITEs.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@631 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
index 285b620..2ca681c 100644
--- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp
+++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
@@ -1910,6 +1910,11 @@ bool TrySip200Ok(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader,
{
bool result = false;
+ if(DLLCONFIG.m_sipTreat200OkAsInvite == true)
+ {
+ return false;
+ }
+
int sipLength = ntohs(udpHeader->len) - sizeof(UdpHeaderStruct);
char* sipEnd = (char*)udpPayload + sipLength;
if(sipLength < SIP_RESPONSE_200_OK_SIZE || sipEnd > (char*)packetEnd)
@@ -2072,6 +2077,11 @@ bool TrySipInvite(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader
{
sipMethod = SIP_METHOD_ACK;
}
+ else if((DLLCONFIG.m_sipTreat200OkAsInvite == true) && (memcmp(SIP_RESPONSE_200_OK, (void*)udpPayload, SIP_RESPONSE_200_OK_SIZE) == 0))
+ {
+ sipMethod = SIP_METHOD_200_OK;
+ LOG4CXX_DEBUG(s_sipExtractionLog, "TrySipInvite: packet matches 200 OK and SipTreat200OkAsInvite is enabled");
+ }
else
{
drop = true;