From 96af9f5fe701d6669d1d2a833e30c774c34c247a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 28 Jan 2008 21:45:48 +0000 Subject: [PATCH] doh wrong place git-svn-id: http://svn.openzap.org/svn/openzap/trunk@375 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/mod_openzap/mod_openzap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/openzap/mod_openzap/mod_openzap.c b/libs/openzap/mod_openzap/mod_openzap.c index c595e086b1..8f74c12902 100644 --- a/libs/openzap/mod_openzap/mod_openzap.c +++ b/libs/openzap/mod_openzap/mod_openzap.c @@ -1232,6 +1232,12 @@ static ZIO_SIGNAL_CB_FUNCTION(on_isdn_signal) switch(sigmsg->event_id) { case ZAP_SIGEVENT_START: { + zap_tone_type_t tt = ZAP_TONE_DTMF; + + if (zap_channel_command(sigmsg->channel, ZAP_COMMAND_ENABLE_DTMF_DETECT, &tt) != ZAP_SUCCESS) { + zap_log(ZAP_LOG_ERROR, "TONE ERROR\n"); + } + return zap_channel_from_event(sigmsg, &session); } break; @@ -1248,12 +1254,6 @@ static ZIO_SIGNAL_CB_FUNCTION(on_isdn_signal) case ZAP_SIGEVENT_UP: { if ((session = zap_channel_get_session(sigmsg->channel, 0))) { - zap_tone_type_t tt = ZAP_TONE_DTMF; - - if (zap_channel_command(sigmsg->channel, ZAP_COMMAND_ENABLE_DTMF_DETECT, &tt) != ZAP_SUCCESS) { - zap_log(ZAP_LOG_ERROR, "TONE ERROR\n"); - } - channel = switch_core_session_get_channel(session); switch_channel_mark_answered(channel); switch_core_session_rwunlock(session);