From e4c0dbd73d917e5112d149d5ae832f2214b40f38 Mon Sep 17 00:00:00 2001 From: Super User Date: Sat, 7 Jun 2008 12:00:54 +0200 Subject: [PATCH] work --- chan_lcr.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/chan_lcr.c b/chan_lcr.c index 5c68e47..2006d7a 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -1023,7 +1023,7 @@ static void lcr_in_facility(struct chan_call *call, int message_type, union para } /* - * got dtmf from bchannel + * got dtmf from bchannel (locked state) */ void lcr_in_dtmf(struct chan_call *call, int val) { @@ -1035,7 +1035,7 @@ void lcr_in_dtmf(struct chan_call *call, int val) if (!call->pbx_started) return; - CDEBUG(call, call->ast, "Frowarding DTMF digit '%c' to Asterisk.\n", val); + CDEBUG(call, call->ast, "Forwarding DTMF digit '%c' to Asterisk.\n", val); /* send digit to asterisk */ memset(&fr, 0, sizeof(fr)); @@ -1610,13 +1610,6 @@ struct ast_channel *lcr_request(const char *type, int format, void *data, int *c strncpy(call->dialstring, dial, sizeof(call->dialstring)-1); apply_opt(call, (char *)opt); - /* if hdlc is forced by option, we change transcap to data */ - if (call->hdlc - && ast->transfercapability != INFO_BC_DATAUNRESTRICTED - && ast->transfercapability != INFO_BC_DATARESTRICTED - && ast->transfercapability != INFO_BC_VIDEO) - ast->transfercapability = INFO_BC_DATAUNRESTRICTED; - ast_mutex_unlock(&chan_lock); return ast; } @@ -1651,7 +1644,13 @@ static int lcr_call(struct ast_channel *ast, char *dest, int timeout) || ast->transfercapability == INFO_BC_DATARESTRICTED || ast->transfercapability == INFO_BC_VIDEO) call->hdlc = 1; - + /* if hdlc is forced by option, we change transcap to data */ + if (call->hdlc + && ast->transfercapability != INFO_BC_DATAUNRESTRICTED + && ast->transfercapability != INFO_BC_DATARESTRICTED + && ast->transfercapability != INFO_BC_VIDEO) + ast->transfercapability = INFO_BC_DATAUNRESTRICTED; + ast_mutex_unlock(&chan_lock); return 0; } -- 2.13.6