additional checking related to issue 17186
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258855 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
849740c4e7
commit
84c3d61f65
|
@ -1882,10 +1882,10 @@ int onNewCallCreated(ooCallData *call)
|
|||
}
|
||||
ast_mutex_lock(&p->lock);
|
||||
|
||||
if (p->callerid_name) {
|
||||
if (!ast_strlen_zero(p->callerid_name)) {
|
||||
ooCallSetCallerId(call, p->callerid_name);
|
||||
}
|
||||
if (p->callerid_num) {
|
||||
if (!ast_strlen_zero(p->callerid_num)) {
|
||||
i = 0;
|
||||
while (*(p->callerid_num + i) != '\0') {
|
||||
if(!isdigit(*(p->callerid_num+i))) { break; }
|
||||
|
@ -1894,7 +1894,7 @@ int onNewCallCreated(ooCallData *call)
|
|||
if(*(p->callerid_num+i) == '\0')
|
||||
ooCallSetCallingPartyNumber(call, p->callerid_num);
|
||||
else {
|
||||
if(!p->callerid_name)
|
||||
if(ast_strlen_zero(p->callerid_name))
|
||||
ooCallSetCallerId(call, p->callerid_num);
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue