From 861ddcf723ced891816ccd80647ed53264031fd5 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Thu, 25 Aug 2005 12:54:04 +0000 Subject: [PATCH] Use variable CONNECTEDNUMBER on Answer(). --- chan_capi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chan_capi.c b/chan_capi.c index 44d3bff..95fc21e 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -873,6 +873,7 @@ static int capi_send_answer(struct ast_channel *c, int *bprot, _cstruct b3conf) _cmsg CMSG; char buf[AST_CAPI_MAX_STRING]; char *dnid; + char *connectednumber; if ((i->isdnmode == AST_CAPI_ISDNMODE_PTP) && ((strlen(i->incomingmsn) < strlen(i->dnid)) && @@ -881,6 +882,9 @@ static int capi_send_answer(struct ast_channel *c, int *bprot, _cstruct b3conf) } else { dnid = i->dnid; } + if ((connectednumber = pbx_builtin_getvar_helper(c, "CONNECTEDNUMBER"))) { + dnid = connectednumber; + } memset(&CMSG, 0, sizeof(CMSG));