mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix callerid on IAX2 (received)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3665,15 +3665,15 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies
|
||||
/* If they have callerid, override the given caller id. Always store the ANI */
|
||||
if (!ast_strlen_zero(iaxs[callno]->cid_num) || !ast_strlen_zero(iaxs[callno]->cid_name)) {
|
||||
if (user->hascallerid) {
|
||||
iaxs[callno]->calling_tns = 0;
|
||||
iaxs[callno]->calling_ton = 0;
|
||||
strncpy(iaxs[callno]->cid_num, user->cid_num, sizeof(iaxs[callno]->cid_num)-1);
|
||||
strncpy(iaxs[callno]->cid_name, user->cid_name, sizeof(iaxs[callno]->cid_name)-1);
|
||||
iaxs[callno]->calling_pres = 0;
|
||||
} else {
|
||||
iaxs[callno]->calling_pres = AST_PRES_NUMBER_NOT_AVAILABLE;
|
||||
}
|
||||
iaxs[callno]->calling_tns = 0;
|
||||
iaxs[callno]->calling_ton = 0;
|
||||
strncpy(iaxs[callno]->ani, user->cid_num, sizeof(iaxs[callno]->ani)-1);
|
||||
} else {
|
||||
iaxs[callno]->calling_pres = AST_PRES_NUMBER_NOT_AVAILABLE;
|
||||
}
|
||||
if (!ast_strlen_zero(user->accountcode))
|
||||
strncpy(iaxs[callno]->accountcode, user->accountcode, sizeof(iaxs[callno]->accountcode)-1);
|
||||
|
Reference in New Issue
Block a user