From a7c80aeeaf5ebb2607fca4aadb37541f69710d05 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 2 Aug 2010 16:06:46 -0500 Subject: [PATCH] fix bind-meta-up change from last week --- src/switch_ivr_async.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index bb645def50..4fe5732f82 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -2423,15 +2423,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_bind_dtmf_meta_session(switch_core_se } } - str[0] = meta; + if (meta != '*' && meta != '#') { + str[0] = meta; - if (atoi(str) == (int)key) { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid key %u, same as META CHAR\n", key); - return SWITCH_STATUS_FALSE; + if (atoi(str) == (int)key) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid key %u, same as META CHAR\n", key); + return SWITCH_STATUS_FALSE; + } } - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Using META KEY %c\n", meta); - if (key > 9) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid key %u\n", key); @@ -2453,7 +2453,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_bind_dtmf_meta_session(switch_core_se md->sr[SWITCH_DTMF_RECV].map[key].flags |= SMF_HOLD_BLEG; md->sr[SWITCH_DTMF_RECV].map[key].bind_flags = bind_flags; - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Bound A-Leg: %d %s\n", key, app); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Bound A-Leg: %c%d %s\n", meta, key, app); } if ((bind_flags & SBF_DIAL_BLEG)) { md->sr[SWITCH_DTMF_SEND].meta = meta; @@ -2461,15 +2461,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_bind_dtmf_meta_session(switch_core_se md->sr[SWITCH_DTMF_SEND].map[key].app = switch_core_session_strdup(session, app); md->sr[SWITCH_DTMF_SEND].map[key].flags |= SMF_HOLD_BLEG; md->sr[SWITCH_DTMF_SEND].map[key].bind_flags = bind_flags; - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Bound B-Leg: %d %s\n", key, app); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Bound B-Leg: %c%d %s\n", meta, key, app); } } else { if ((bind_flags & SBF_DIAL_ALEG)) { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "UnBound A-Leg: %d\n", key); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "UnBound A-Leg: %c%d\n", meta, key); md->sr[SWITCH_DTMF_SEND].map[key].app = NULL; } else { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "UnBound: B-Leg %d\n", key); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "UnBound: B-Leg %c%d\n", meta, key); md->sr[SWITCH_DTMF_SEND].map[key].app = NULL; } }