diff --git a/src/channels/chan_voicemngr.c b/src/channels/chan_voicemngr.c
index 81f5184acd03a8ca08354ae896a92deac402a638..470de25b6c5ffdcf0ca145a8d5df9841e4883366 100644
--- a/src/channels/chan_voicemngr.c
+++ b/src/channels/chan_voicemngr.c
@@ -499,8 +499,8 @@ static const DTMF_CHARNAME_MAP dtmf_to_charname[] =
 	{EVENT_DTMFB, "DTMFB", 'B', 13},
 	{EVENT_DTMFC, "DTMFC", 'C', 14},
 	{EVENT_DTMFD, "DTMFD", 'D', 15},
-	{EVENT_DTMFH, "DTMFH", 0x23, 11}, //#
-	{EVENT_DTMFS, "DTMFS", 0x2A, 10}, //*
+	{EVENT_DTMFH, "DTMFH", '#', 11},
+	{EVENT_DTMFS, "DTMFS", '*', 10},
 	{EVENT_LAST,  "", '-', -1}
 };
 
@@ -2545,13 +2545,11 @@ static int handle_dialtone_timeout(const void *data)
 void handle_dtmf_calling(struct chan_voicemngr_subchannel *sub)
 {
 	struct chan_voicemngr_pvt *p = sub->parent;
-	char termination_digit;
+	char termination_digit = channel_config[p->line_id].terminationdigit;
 	int dtmfbuf_len = strlen(p->dtmfbuf);
 	char dtmf_last_char = p->dtmfbuf[(dtmfbuf_len - 1)];
 	char dtmf_one_before_last_char = p->dtmfbuf[(dtmfbuf_len > 1 ? dtmfbuf_len - 2 : 0)];
         
-	termination_digit = channel_config[p->line_id].terminationdigit?channel_config[p->line_id].terminationdigit:0x23;
-
 	if (ast_exists_extension(NULL, p->context_direct, p->dtmfbuf, 1, p->cid_num) && !ast_matchmore_extension(NULL, p->context_direct, p->dtmfbuf, 1, p->cid_num))
 	{
 		//We have a full match in the "direct" context, so have asterisk place a call immediately
@@ -2560,8 +2558,8 @@ void handle_dtmf_calling(struct chan_voicemngr_subchannel *sub)
 	}
 
 
-	else if (ast_exists_extension(NULL, p->context, p->dtmfbuf, 1, p->cid_num) && dtmf_last_char == termination_digit
-                && dtmf_one_before_last_char != 0x2A) {
+	else if (termination_digit && dtmf_last_char == termination_digit && dtmf_one_before_last_char != '*'
+		&& ast_exists_extension(NULL, p->context, p->dtmfbuf, 1, p->cid_num)) {
 
                 ast_log(LOG_NOTICE, "Termination key %c is pressed during dialing\n",termination_digit);
                 int match = feature_access_code_match(p->dtmfbuf);