mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 11:13:09 +00:00
Only accept first callerid number (bug #2395)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3,9 +3,9 @@
|
|||||||
*
|
*
|
||||||
* CallerID Generation support
|
* CallerID Generation support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2001, Linux Support Services, Inc.
|
* Copyright (C) 2001-2004, Digium, Inc.
|
||||||
*
|
*
|
||||||
* Mark Spencer <markster@linux-support.net>
|
* Mark Spencer <markster@digium.com>
|
||||||
*
|
*
|
||||||
* This program is free software, distributed under the terms of
|
* This program is free software, distributed under the terms of
|
||||||
* the GNU General Public License.
|
* the GNU General Public License.
|
||||||
@@ -261,9 +261,11 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, int
|
|||||||
ast_log(LOG_NOTICE, "Truncating long caller ID number from %d bytes to 32\n", cid->rawdata[x]);
|
ast_log(LOG_NOTICE, "Truncating long caller ID number from %d bytes to 32\n", cid->rawdata[x]);
|
||||||
res = 32;
|
res = 32;
|
||||||
}
|
}
|
||||||
|
if (ast_strlen_zero(cid->number)) {
|
||||||
memcpy(cid->number, cid->rawdata + x + 1, res);
|
memcpy(cid->number, cid->rawdata + x + 1, res);
|
||||||
/* Null terminate */
|
/* Null terminate */
|
||||||
cid->number[res] = '\0';
|
cid->number[res] = '\0';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 7: /* Name */
|
case 7: /* Name */
|
||||||
case 8: /* Name */
|
case 8: /* Name */
|
||||||
|
Reference in New Issue
Block a user