Fix callernumber IE to be read only once
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@203 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
6
q931.c
6
q931.c
@@ -911,6 +911,12 @@ static FUNC_RECV(receive_calling_party_number)
|
||||
call->callerplan = ie->data[0] & 0x7f;
|
||||
extbit = (ie->data[0] >> 7) & 0x01;
|
||||
|
||||
/* Somebody's broken PRI stack sent a calling
|
||||
party number IE twice. One with the callernam
|
||||
and one without. */
|
||||
if (strlen(call->callernum))
|
||||
return 0;
|
||||
|
||||
if (extbit) {
|
||||
q931_get_number(call->callernum, sizeof(call->callernum), ie->data + 1, len - 3);
|
||||
call->callerpres = 0; /* PI presentation allowed
|
||||
|
||||
Reference in New Issue
Block a user