Index: main/channel.c =================================================================== --- main/channel.c (revision 169329) +++ main/channel.c (working copy) @@ -3679,6 +3679,9 @@ } if (!strchr(enders, d)) s[pos++] = d; + if (strchr(enders, d) && pos == 0) { + s[pos++] = d; + } if (strchr(enders, d) || (pos >= len)) { s[pos]='\0'; return 0; Index: main/app.c =================================================================== --- main/app.c (revision 169329) +++ main/app.c (working copy) @@ -152,6 +152,10 @@ to = c->pbx ? c->pbx->dtimeoutms : 2000; } res = ast_readstring(c, s, maxlen, to, fto, "#"); + if (strchr(s, '#')) { + s[0]='\0'; + return res; + } if (!ast_strlen_zero(s)) return res; }