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

This commit is contained in:
MelwareDE 2010-10-06 14:07:44 +00:00
parent 20d86c8a67
commit e7da2a3aed
1 changed files with 3 additions and 1 deletions

View File

@ -1740,8 +1740,10 @@ static int capi_send_answer(struct ast_channel *c, _cstruct b3conf)
} }
if (strlen(dnid)) { if (strlen(dnid)) {
const char *p = pbx_builtin_getvar_helper(c, "CALLEDTON");
buf[0] = strlen(dnid) + 2; buf[0] = strlen(dnid) + 2;
buf[1] = 0x01; buf[1] = (p != 0) ? (((unsigned char)atoi(p)) & ~0x80) : 0x01;
buf[2] = 0x80; buf[2] = 0x80;
strncpy(&buf[3], dnid, sizeof(buf) - 4); strncpy(&buf[3], dnid, sizeof(buf) - 4);
} else { } else {