From 620e580ed671ca6bc34e2e6df64ac680dff7c371 Mon Sep 17 00:00:00 2001
From: Steve Murphy <murf@digium.com>
Date: Thu, 15 Nov 2007 01:42:12 +0000
Subject: [PATCH] Had trouble playing with parking; spent a long time trying to
 reason out MATCHMORE mode. made these updates and xfers on zaptel lines seem
 to work ok now

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/pbx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/main/pbx.c b/main/pbx.c
index 700c4f5170..fd914ef4e8 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -1586,11 +1586,14 @@ struct ast_exten *pbx_find_extension(struct ast_channel *chan,
 		return NULL;
 	}
 
-	if (!eroot && action == E_CANMATCH && score.canmatch_exten) {
+	if (!eroot && (action == E_CANMATCH || action == E_MATCHMORE) && score.canmatch_exten) {
 		q->status = STATUS_SUCCESS;
 		return score.canmatch_exten;
 	}
 
+	if (action == E_MATCHMORE && eroot)
+		return NULL;  /* according to the code, complete matches are null matches in MATCHMORE mode */
+
 	if (eroot) {
 		/* found entry, now look for the right priority */
 		if (q->status < STATUS_NO_PRIORITY)
-- 
GitLab