From 127751f3c1aa05b65b170694eb34c603cad46205 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 15 Mar 2009 10:15:23 +0100 Subject: [PATCH] Fixed dtmf detection of A-D. (thanx to Ralf) modified: README modified: chan_lcr.c --- README | 1 + chan_lcr.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README b/README index 7a0b1f0..f806638 100644 --- a/README +++ b/README @@ -475,3 +475,4 @@ Changes after Version 1.4 release - Added PID file (thanx to Joerg) - Added Callweaver support. (thanx to Kristijan) - Bugfix on timeout rules. (thanx to Benjamin) +- Fixed dtmf detection of A-D. (thanx to Ralf) diff --git a/chan_lcr.c b/chan_lcr.c index 9f29338..b3c42cc 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -957,7 +957,7 @@ static void lcr_in_connect(struct chan_call *call, int message_type, union param memcpy(&call->connectinfo, ¶m->connectinfo, sizeof(struct connect_info)); /* queue event to asterisk */ if (call->ast && call->pbx_started) - strncat(call->queue_string, "A", sizeof(call->queue_string)-1); + strncat(call->queue_string, "N", sizeof(call->queue_string)-1); } /* @@ -1574,7 +1574,7 @@ static int queue_send(void) ast_queue_control(ast, AST_CONTROL_RINGING); ast_setstate(ast, AST_STATE_RINGING); break; - case 'A': + case 'N': CDEBUG(call, ast, "Sending queued ANSWER to Asterisk.\n"); ast_queue_control(ast, AST_CONTROL_ANSWER); break; @@ -1582,10 +1582,10 @@ static int queue_send(void) CDEBUG(call, ast, "Sending queued HANGUP to Asterisk.\n"); ast_queue_hangup(ast); break; - case '1': case '2': case '3': case 'a': - case '4': case '5': case '6': case 'b': - case '7': case '8': case '9': case 'c': - case '*': case '0': case '#': case 'd': + case '1': case '2': case '3': case 'A': + case '4': case '5': case '6': case 'B': + case '7': case '8': case '9': case 'C': + case '*': case '0': case '#': case 'D': CDEBUG(call, ast, "Sending queued digit '%c' to Asterisk.\n", *p); /* send digit to asterisk */ memset(&fr, 0, sizeof(fr)); @@ -1609,7 +1609,7 @@ static int queue_send(void) break; default: - CDEBUG(call, ast, "Ignoring queued digit 0x%02d.\n", *p); + CDEBUG(call, ast, "Ignoring queued digit 0x%02x.\n", *p); } p++; } @@ -2680,7 +2680,7 @@ int load_module(void) if (read_options() == 0) { CERROR(NULL, NULL, "%s", options_error); - #ifdef LCR_FOR_ASTERISK || ASTERISK_1_6 + #ifdef LCR_FOR_ASTERISK return AST_MODULE_LOAD_DECLINE; #endif -- 2.13.6