From e7da2a3aedf883a74bf4ff14bbbb6ad6a1455dc6 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Wed, 6 Oct 2010 14:07:44 +0000 Subject: [PATCH] Connected number shopuld reflect the type of number and numbering plan of called party number. This is still possible to change it using CALLEDTON variable --- chan_capi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chan_capi.c b/chan_capi.c index 57de4d1..c189e85 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -1740,8 +1740,10 @@ static int capi_send_answer(struct ast_channel *c, _cstruct b3conf) } if (strlen(dnid)) { + const char *p = pbx_builtin_getvar_helper(c, "CALLEDTON"); + buf[0] = strlen(dnid) + 2; - buf[1] = 0x01; + buf[1] = (p != 0) ? (((unsigned char)atoi(p)) & ~0x80) : 0x01; buf[2] = 0x80; strncpy(&buf[3], dnid, sizeof(buf) - 4); } else {