[Freeswitch-svn] [commit] r13002 - freeswitch/trunk/src/mod/endpoints/mod_opal
FreeSWITCH SVN
anthm at freeswitch.org
Sat Apr 11 09:29:36 PDT 2009
Author: anthm
Date: Sat Apr 11 11:29:36 2009
New Revision: 13002
Log:
add dtmf method to mod_opal
Modified:
freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.cpp
freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.h
Modified: freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.cpp
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.cpp (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.cpp Sat Apr 11 11:29:36 2009
@@ -49,6 +49,7 @@
static switch_status_t on_hangup(switch_core_session_t *session);
+static switch_status_t on_destroy(switch_core_session_t *session);
static switch_io_routines_t opalfs_io_routines = {
@@ -69,9 +70,8 @@
/*.on_routing */ FSConnection::on_routing,
/*.on_execute */ FSConnection::on_execute,
/*.on_hangup */ on_hangup,
- /*.on_loopback */ FSConnection::on_loopback,
- /*.on_transmit */ FSConnection::on_transmit,
- /*.on_soft_execute */ NULL,
+ /*.on_exchange_media */ FSConnection::on_exchange_media,
+ /*.on_soft_execute */ FSConnection::on_soft_execute,
/*.on_consume_media*/ NULL,
/*.on_hibernate*/ NULL,
/*.on_reset*/ NULL,
@@ -676,6 +676,12 @@
OpalLocalConnection::OnEstablished();
}
+PBoolean FSConnection::SendUserInputTone(char tone, unsigned duration)
+{
+ switch_dtmf_t dtmf = { tone, duration };
+
+ return (switch_channel_queue_dtmf(m_fsChannel, &dtmf) == SWITCH_STATUS_SUCCESS) ? true : false;
+}
OpalMediaFormatList FSConnection::GetMediaFormats() const
{
@@ -887,14 +893,14 @@
}
-switch_status_t FSConnection::on_loopback()
+switch_status_t FSConnection::on_exchange_media()
{
PTRACE(3, "mod_opal\tLoopback on connection " << *this);
return SWITCH_STATUS_SUCCESS;
}
-switch_status_t FSConnection::on_transmit()
+switch_status_t FSConnection::on_soft_execute()
{
PTRACE(3, "mod_opal\tTransmit on connection " << *this);
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_opal/mod_opal.h Sat Apr 11 11:29:36 2009
@@ -187,6 +187,7 @@
virtual OpalMediaStream *CreateMediaStream(const OpalMediaFormat &, unsigned, PBoolean);
virtual PBoolean OnOpenMediaStream(OpalMediaStream & stream);
virtual OpalMediaFormatList GetMediaFormats() const;
+ virtual PBoolean SendUserInputTone(char tone, unsigned duration);
void SetCodecs();
@@ -195,8 +196,8 @@
DECLARE_CALLBACK0(on_execute);
//DECLARE_CALLBACK0(on_hangup);
- DECLARE_CALLBACK0(on_loopback);
- DECLARE_CALLBACK0(on_transmit);
+ DECLARE_CALLBACK0(on_exchange_media);
+ DECLARE_CALLBACK0(on_soft_execute);
DECLARE_CALLBACK1(kill_channel, int, sig);
DECLARE_CALLBACK1(send_dtmf, const switch_dtmf_t *, dtmf);
More information about the Freeswitch-svn
mailing list