[Freeswitch-svn] [commit] r10446 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia
FreeSWITCH SVN
anthm at freeswitch.org
Tue Nov 18 14:46:40 PST 2008
Author: anthm
Date: Tue Nov 18 17:46:40 2008
New Revision: 10446
Log:
sigh
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/switch_utils.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Tue Nov 18 17:46:40 2008
@@ -3290,8 +3290,12 @@
int tmp;
/* move signal_ptr where we need it (right past Signal=) */
signal_ptr = signal_ptr + 7;
- tmp = atoi(signal_ptr);
- dtmf.digit = switch_rfc2833_to_char(tmp);
+ if (is_dtmf(*signal_ptr)) {
+ dtmf.digit = *signal_ptr;
+ } else {
+ tmp = atoi(signal_ptr);
+ dtmf.digit = switch_rfc2833_to_char(tmp);
+ }
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Bad signal\n");
goto fail;
@@ -3300,6 +3304,7 @@
if ((signal_ptr = switch_stristr("Duration=", sip->sip_payload->pl_data))) {
int tmp;
signal_ptr += 9;
+
if ((tmp = atoi(signal_ptr)) <= 0) {
tmp = switch_core_default_dtmf_duration(0);
}
Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c (original)
+++ freeswitch/trunk/src/switch_utils.c Tue Nov 18 17:46:40 2008
@@ -1128,9 +1128,6 @@
SWITCH_DECLARE(char) switch_rfc2833_to_char(int event)
{
if (event > -1 && event < (int32_t) sizeof(RFC2833_CHARS)) {
- if (is_dtmf(event)) {
- return (char) event;
- }
return RFC2833_CHARS[event];
}
return '\0';
More information about the Freeswitch-svn
mailing list