summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/VoIp.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2007-05-30 15:41:39 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2007-05-30 15:41:39 +0000
commit87856bf5f56d2597209b7ed768f5096559e0587b (patch)
tree45defb5250e26cf766cf078ccfa7547febe70d26 /orkaudio/audiocaptureplugins/voip/VoIp.cpp
parenteff2a681b32a1947c44f80e6936e416a9c47c555 (diff)
Fix for correct Skinny on-hold handling. Now, only one recording is created when an endpoint goes on hold then returns.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@441 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
index 1c9cddb..c008bfc 100644
--- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp
+++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
@@ -1377,6 +1377,7 @@ void HandleSkinnyMessage(SkinnyHeaderStruct* skinnyHeader, IpHeaderStruct* ipHea
SkOpenReceiveChannelAckStruct* openReceiveAck;
SkLineStatStruct* lineStat;
SkCcm5CallInfoStruct* ccm5CallInfo;
+ SkSoftKeyEventMessageStruct* softKeyEvent;
char szEndpointIp[16];
struct in_addr endpointIp = ipHeader->ip_dest; // most of the interesting skinny messages are CCM -> phone
@@ -1491,6 +1492,43 @@ void HandleSkinnyMessage(SkinnyHeaderStruct* skinnyHeader, IpHeaderStruct* ipHea
}
break;
+ case SkSoftKeyEventMessage:
+ softKeyEvent = (SkSoftKeyEventMessageStruct*)skinnyHeader;
+ if(SkinnyValidateSoftKeyEvent(softKeyEvent))
+ {
+ useful = true;
+ logMsg.Format(" eventString:%s eventNumber:%d line_instance:%lu call_identifier:%lu",
+ SoftKeyEvent::SoftKeyEventToString(softKeyEvent->soft_key_event),
+ softKeyEvent->soft_key_event,
+ softKeyEvent->line_instance,
+ softKeyEvent->call_identifier);
+
+ endpointIp = ipHeader->ip_src; // this skinny message is phone -> CCM
+
+ switch(softKeyEvent->soft_key_event)
+ {
+ case SoftKeyEvent::SkSoftKeyHold:
+ RtpSessionsSingleton::instance()->ReportSkinnySoftKeyHold(softKeyEvent, ipHeader);
+ break;
+ case SoftKeyEvent::SkSoftKeyResume:
+ RtpSessionsSingleton::instance()->ReportSkinnySoftKeyResume(softKeyEvent, ipHeader);
+ break;
+ default:
+ CStdString logSoftKey;
+
+ logSoftKey.Format("Ignoring unsupported event %s (%d)",
+ SoftKeyEvent::SoftKeyEventToString(softKeyEvent->soft_key_event),
+ softKeyEvent->soft_key_event);
+ LOG4CXX_INFO(s_skinnyPacketLog, logSoftKey);
+ break;
+ }
+ }
+ else
+ {
+ useful = false;
+ LOG4CXX_WARN(s_skinnyPacketLog, "Invalid SoftKeyEventMessage.");
+ }
+ break;
default:
useful = false;
}