add dtmf method to mod_opal
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13002 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d84c68b909
commit
8694fd32f6
|
@ -49,6 +49,7 @@ static const char ModuleName[] = "opal";
|
|||
|
||||
|
||||
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 @@ static switch_state_handler_table_t opalfs_event_handlers = {
|
|||
/*.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 @@ void FSConnection::OnEstablished()
|
|||
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 @@ static switch_status_t on_hangup(switch_core_session_t *session)
|
|||
}
|
||||
|
||||
|
||||
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;
|
||||
|
|
|
@ -187,6 +187,7 @@ class FSConnection:public OpalLocalConnection {
|
|||
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 @@ class FSConnection:public OpalLocalConnection {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue