Allow dashes in extensions (bug #2835)
[asterisk/asterisk.git] / pbx.c
diff --git a/pbx.c b/pbx.c
index e353845..9f71877 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -557,6 +557,7 @@ static void pbx_destroy(struct ast_pbx *p)
        match=1;\
        pattern++;\
        while(match && *data && *pattern && (*pattern != '/')) {\
+               while (*data == '-' && (*(data+1) != '\0')) data++;\
                switch(toupper(*pattern)) {\
                case '[': \
                {\