--- asterisk-1.8.15.0.o/main/pbx.c 2012-07-10 15:33:53.000000000 +0200 +++ asterisk-1.8.15.0/main/pbx.c 2012-10-30 17:21:11.793027046 +0200 @@ -6878,23 +6878,26 @@ manager_show_dialplan_helper(s, m, idtext, context, exten, &counters, NULL); - if (context && !counters.context_existence) { + if (!ast_strlen_zero(context) && !counters.context_existence) { char errorbuf[BUFSIZ]; snprintf(errorbuf, sizeof(errorbuf), "Did not find context %s", context); astman_send_error(s, m, errorbuf); return 0; } - if (exten && !counters.extension_existence) { + if (!ast_strlen_zero(exten) && !counters.extension_existence) { char errorbuf[BUFSIZ]; - if (context) + if (!ast_strlen_zero(context)) snprintf(errorbuf, sizeof(errorbuf), "Did not find extension %s@%s", exten, context); else snprintf(errorbuf, sizeof(errorbuf), "Did not find extension %s in any context", exten); astman_send_error(s, m, errorbuf); return 0; } + if (counters.total_items == 0) { + manager_dpsendack(s, m); + } astman_append(s, "Event: ShowDialPlanComplete\r\n" "EventList: Complete\r\n"