From 159d57187854191b887f8392682ff8c2e0369b10 Mon Sep 17 00:00:00 2001 From: Gerald Begumisa Date: Thu, 27 Sep 2007 17:40:00 +0000 Subject: Added a boolean VoIP plugin configuration option, RtpReportDtmf, to control whether to report or not to report RTP events git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@497 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkaudio/audiocaptureplugins/voip/VoIp.cpp | 39 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp') diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp index 6f3b81f..4790c7c 100644 --- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp +++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp @@ -1641,31 +1641,34 @@ bool TrySipInvite(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader } } - if(rtpmapAttribute) + if(DLLCONFIG.m_rtpReportDtmf) { - CStdString rtpPayloadType, nextToken; - char *nextStep = NULL; - - while(rtpmapAttribute && rtpmapAttribute < sipEnd) + if(rtpmapAttribute) { - GrabTokenSkipLeadingWhitespaces(rtpmapAttribute, sipEnd, rtpPayloadType); - nextToken.Format("%s ", rtpPayloadType); - nextStep = memFindAfter((char*)nextToken.c_str(), rtpmapAttribute, sipEnd); + CStdString rtpPayloadType, nextToken; + char *nextStep = NULL; - /* We need our "nextStep" to contain at least the length - * of the string "telephone-event", 15 characters */ - if(nextStep && ((sipEnd - nextStep) >= 15)) + while(rtpmapAttribute && rtpmapAttribute < sipEnd) { - if(ACE_OS::strncasecmp(nextStep, "telephone-event", 15) == 0) + GrabTokenSkipLeadingWhitespaces(rtpmapAttribute, sipEnd, rtpPayloadType); + nextToken.Format("%s ", rtpPayloadType); + nextStep = memFindAfter((char*)nextToken.c_str(), rtpmapAttribute, sipEnd); + + /* We need our "nextStep" to contain at least the length + * of the string "telephone-event", 15 characters */ + if(nextStep && ((sipEnd - nextStep) >= 15)) { - /* Our DTMF packets are indicated using - * the payload type rtpPayloadType */ - info->m_telephoneEventPayloadType = rtpPayloadType; - break; + if(ACE_OS::strncasecmp(nextStep, "telephone-event", 15) == 0) + { + /* Our DTMF packets are indicated using + * the payload type rtpPayloadType */ + info->m_telephoneEventPayloadType = rtpPayloadType; + break; + } } - } - rtpmapAttribute = memFindAfter("\na=rtpmap:", rtpmapAttribute, sipEnd); + rtpmapAttribute = memFindAfter("\na=rtpmap:", rtpmapAttribute, sipEnd); + } } } -- cgit v1.2.3