summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/VoIp.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2007-09-27 17:40:00 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2007-09-27 17:40:00 +0000
commit159d57187854191b887f8392682ff8c2e0369b10 (patch)
tree14d590e697fbea7f753abab71237c225ef45a9d4 /orkaudio/audiocaptureplugins/voip/VoIp.cpp
parent16955533cf9a8aa5d9a7ed30a51fe000a05fa1aa (diff)
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
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp39
1 files changed, 21 insertions, 18 deletions
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);
+ }
}
}