]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update fix to FSCORE-85
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 12 Jan 2008 03:40:25 +0000 (03:40 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 12 Jan 2008 03:40:25 +0000 (03:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7183 d0543943-73ff-0310-b7d9-9358b9ac24b2

conf/autoload_configs/ivr.conf.xml
src/switch_ivr_menu.c

index 4639cbb2d0265e420a2e11341ca5e33f466e5b5f..dc7424d280af11758c1155a4a35ee31babfad13b 100644 (file)
@@ -9,7 +9,7 @@
       <entry action="menu-exit" digits="*"/>
       <entry action="menu-play-sound" digits="1" params="soundfiles/features.wav"/>
       <entry action="menu-sub" digits="2" param="demo2"/>
-      <entry action="menu-exec-api" digits="3" param="bridge sofia/$${domain}/888@conference.freeswtich.org"/>
+      <entry action="menu-exec-app" digits="3" param="bridge sofia/$${domain}/888@conference.freeswtich.org"/>
       <entry action="menu-call-transfer" digits="4" param="888"/>
       <entry action="menu-sub" digits="8" param="menu8"/>
     </menu>
index 51d2ec94e91cabdd9e727a4bc068ea1523ee2f52..060971cd9411e1ae88ce425fe91df489af5cce5e 100644 (file)
@@ -489,8 +489,6 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t *
        if (xml_ctx != NULL && name != NULL && xml_ctx->pool != NULL && switch_ivr_menu_stack_xml_find(xml_ctx, name) == NULL) {
                switch_ivr_menu_xml_map_t *map = switch_core_alloc(xml_ctx->pool, sizeof(switch_ivr_menu_xml_map_t));
 
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "switch_ivr_menu_stack_xml_add binding '%s'\n", name);
-               // and we have memory
                if (map != NULL) {
                        map->name = switch_core_strdup(xml_ctx->pool, name);
                        map->action = action;
@@ -507,6 +505,10 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t *
                } else {
                        status = SWITCH_STATUS_MEMERR;
                }
+
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "switch_ivr_menu_stack_xml_add binding '%s'\n", name);
+       } else {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to add binding %s\n", name);
        }
 
        return status;
@@ -533,7 +535,7 @@ static struct iam_s {
 static switch_bool_t is_valid_action(const char *action)
 {
        int i;
-       
+
        if (!switch_strlen_zero(action)) {
                for(i = 0;;i++) {
                        if (!iam[i].name) {
@@ -575,10 +577,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_x
        }
        // build the standard/default xml menu handler mappings
        if (status == SWITCH_STATUS_SUCCESS && xml_menu_ctx != NULL && *xml_menu_ctx != NULL) {
-               int iam_qty = (sizeof(iam) / sizeof(iam[0]));
                int i;
 
-               for (i = 0; i < iam_qty && status == SWITCH_STATUS_SUCCESS; i++) {
+               for (i = 0; iam[i].name && status == SWITCH_STATUS_SUCCESS; i++) {
                        status = switch_ivr_menu_stack_xml_add(*xml_menu_ctx, iam[i].name, iam[i].action, NULL);
                }
        }