]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix bind-meta-up change from last week
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 2 Aug 2010 21:06:46 +0000 (16:06 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 2 Aug 2010 21:06:46 +0000 (16:06 -0500)
src/switch_ivr_async.c

index bb645def50d0ec7941acd88e78f88e27b2f4ad3e..4fe5732f82ff7f63d7dbb7da4377894b7b4d6bda 100644 (file)
@@ -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;
                }
        }