From 13519f72e728c371baff4bfd4b62500bb8ed57b9 Mon Sep 17 00:00:00 2001
From: "Kevin P. Fleming" <kpfleming@digium.com>
Date: Thu, 29 Sep 2005 03:25:25 +0000
Subject: [PATCH] support both regular and Feature Group D dialing syntax on
 EM_WINK trunks (issue #5323)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_zap.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 84c2e43a27..a1642dafc1 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -5280,6 +5280,18 @@ static void *ss_thread(void *data)
 				res = my_getsigstr(chan, dtmfbuf + 1, "#", 3000);
 				if ((res < 1) && (p->dsp)) ast_dsp_digitreset(p->dsp);
 				break;
+			case SIG_EMWINK:
+				/* if we received a '*', we are actually receiving Feature Group D
+				   dial syntax, so use that mode; otherwise, fall through to normal
+				   mode
+				*/
+				if (res == '*') {
+					res = my_getsigstr(chan, dtmfbuf + 1, "*", 3000);
+					if (res > 0)
+						res = my_getsigstr(chan, dtmfbuf + strlen(dtmfbuf), "*", 3000);
+					if ((res < 1) && (p->dsp)) ast_dsp_digitreset(p->dsp);
+					break;
+				}
 			default:
 				/* If we got the first digit, get the rest */
 				len = 1;
-- 
GitLab