Module: sems
Branch: master
Commit: 9ce684fa88b590fd97a4476c8b59f0aaaa18d74d
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=9ce684fa88b590fd97a4476c8b59f0aaaa18d74d

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Sun Jan 12 21:39:06 2014 +0100

sbc:dsm: support for noAudio event

---

 apps/sbc/call_control/dsm/SBCDSMInstance.cpp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/apps/sbc/call_control/dsm/SBCDSMInstance.cpp 
b/apps/sbc/call_control/dsm/SBCDSMInstance.cpp
index 3fa629d..e95dca1 100644
--- a/apps/sbc/call_control/dsm/SBCDSMInstance.cpp
+++ b/apps/sbc/call_control/dsm/SBCDSMInstance.cpp
@@ -336,6 +336,23 @@ CCChainProcessing SBCDSMInstance::onEvent(SBCCallLeg* 
call, AmEvent* event) {
     map<string, string> params;
     params["id"] = int2str(sep_ev->event_id);
     engine.runEvent(call, this, DSMCondition::PlaylistSeparator, &params);
+
+    if (params[DSM_SBC_PARAM_STOP_PROCESSING]==DSM_TRUE)
+      return StopProcessing;
+    return ContinueProcessing;
+  }
+
+  AmAudioEvent* audio_event = dynamic_cast<AmAudioEvent*>(event);
+  if(audio_event &&
+     ((audio_event->event_id == AmAudioEvent::cleared) ||
+      (audio_event->event_id == AmAudioEvent::noAudio))){
+    map<string, string> params;
+    params["type"] = audio_event->event_id == 
AmAudioEvent::cleared?"cleared":"noAudio";
+    engine.runEvent(call, this, DSMCondition::NoAudio, &params);
+
+    if (params[DSM_SBC_PARAM_STOP_PROCESSING]==DSM_TRUE)
+      return StopProcessing;
+    return ContinueProcessing;
   }
 
   // todo: process JsonRPCEvents (? see DSMCall::process)

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to