git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10446 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-11-18 22:46:40 +00:00
parent 770b94c46d
commit 0cb51fb336
2 changed files with 7 additions and 5 deletions

View File

@ -3290,8 +3290,12 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
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 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
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);
}

View File

@ -1128,9 +1128,6 @@ SWITCH_DECLARE(int) switch_build_uri(char *uri,
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';