[Freeswitch-svn] [commit] r12484 - freeswitch/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
anthm at freeswitch.org
Fri Mar 6 09:45:32 PST 2009
Author: anthm
Date: Fri Mar 6 11:45:32 2009
New Revision: 12484
Log:
FSCORE-263
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Fri Mar 6 11:45:32 2009
@@ -932,11 +932,19 @@
{
private_object_t *tech_pvt;
char message[128] = "";
+ sofia_dtmf_t dtmf_type;
tech_pvt = (private_object_t *) switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL);
- switch (tech_pvt->dtmf_type) {
+ dtmf_type = tech_pvt->dtmf_type;
+
+ /* We only can send INFO when we have no media */
+ if (!tech_pvt->rtp_session || !switch_channel_media_ready(tech_pvt->channel) || switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE)) {
+ dtmf_type = DTMF_INFO;
+ }
+
+ switch (dtmf_type) {
case DTMF_2833:
return switch_rtp_queue_rfc2833(tech_pvt->rtp_session, dtmf);
@@ -947,6 +955,7 @@
switch_mutex_unlock(tech_pvt->sofia_mutex);
break;
default:
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled DTMF type!\n");
break;
}
More information about the Freeswitch-svn
mailing list