summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-10-07 21:04:10 +0000
committerMark Spencer <markster@digium.com>2004-10-07 21:04:10 +0000
commit3ec18090b9e4cf9229db121966587190487e635a (patch)
tree458da572e52502eb25b380d7fbf04dabff9ead98 /channels
parented62f449a99e97522dcf60cd9f3b378a35f9f681 (diff)
Fix callerid on IAX2 (received)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_iax2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 3f5ed7152..8a7a58836 100755
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -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);