From 18c90ba1823ab5138c2e5e0f2da4aa8ee108d633 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 24 Mar 2009 16:31:08 +0000 Subject: [PATCH] functions to enable and disable DTMF detection This work was kindly sponsored by Teltech Systems Inc. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1326 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/dsm/DSMCoreModule.cpp | 11 +++++++++++ apps/dsm/DSMCoreModule.h | 2 ++ apps/dsm/doc/dsm_syntax.txt | 2 ++ 3 files changed, 15 insertions(+) diff --git a/apps/dsm/DSMCoreModule.cpp b/apps/dsm/DSMCoreModule.cpp index 6f0b8256..5a39a58a 100644 --- a/apps/dsm/DSMCoreModule.cpp +++ b/apps/dsm/DSMCoreModule.cpp @@ -70,6 +70,8 @@ DSMAction* DSMCoreModule::getAction(const string& from_str) { DEF_CMD("disconnectMedia", SCDisconnectMediaAction); DEF_CMD("mute", SCMuteAction); DEF_CMD("unmute", SCUnmuteAction); + DEF_CMD("enableDTMFDetection", SCEnableDTMFDetection); + DEF_CMD("disableDTMFDetection", SCDisableDTMFDetection); DEF_CMD("set", SCSetAction); DEF_CMD("append", SCAppendAction); @@ -238,6 +240,15 @@ EXEC_ACTION_START(SCUnmuteAction) { sc_sess->unmute(); } EXEC_ACTION_END; + +EXEC_ACTION_START(SCEnableDTMFDetection) { + sess->setDtmfDetectionEnabled(true); +} EXEC_ACTION_END; + +EXEC_ACTION_START(SCDisableDTMFDetection) { + sess->setDtmfDetectionEnabled(false); +} EXEC_ACTION_END; + EXEC_ACTION_START(SCStopAction) { if (resolveVars(arg, sess, sc_sess, event_params) == "true") { DBG("sending bye\n"); diff --git a/apps/dsm/DSMCoreModule.h b/apps/dsm/DSMCoreModule.h index 56c17294..3c5d4748 100644 --- a/apps/dsm/DSMCoreModule.h +++ b/apps/dsm/DSMCoreModule.h @@ -62,6 +62,8 @@ DEF_ACTION_1P(SCConnectMediaAction); DEF_ACTION_1P(SCDisconnectMediaAction); DEF_ACTION_1P(SCMuteAction); DEF_ACTION_1P(SCUnmuteAction); +DEF_ACTION_1P(SCEnableDTMFDetection); +DEF_ACTION_1P(SCDisableDTMFDetection); DEF_ACTION_1P(SCSetPromptsAction); DEF_ACTION_1P(SCAddSeparatorAction); diff --git a/apps/dsm/doc/dsm_syntax.txt b/apps/dsm/doc/dsm_syntax.txt index 59f928f7..9d9707a0 100644 --- a/apps/dsm/doc/dsm_syntax.txt +++ b/apps/dsm/doc/dsm_syntax.txt @@ -59,6 +59,8 @@ actions: unmute() set RTP stream to unmuted (send and receive RTP packets) + enableDTMFDetection() + disableDTMFDetection() B2B.connectCallee(remote_party, remote_uri) connect second leg of B2B session (see AmB2BSession)