Fix chan_iax2 to not report an RDNIS number if it is blank.

Some ISDN switches complain or block the call if the RDNIS number is
empty.

* Made chan_iax2 not save a RDNIS number into the ast_channel if the
string is blank.  This is what other channel drivers do.

(closes issue ASTERISK-17152)
Reported by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@348735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2011-12-20 23:08:21 +00:00
parent 4a5ed19cd7
commit fc96f6eb9d

View File

@@ -5737,8 +5737,10 @@ static struct ast_channel *ast_iax2_new(int callno, int state, format_t capabili
tmp->caller.ani.number.str = ast_strdup(i->cid_num);
}
tmp->dialed.number.str = ast_strdup(i->dnid);
tmp->redirecting.from.number.valid = 1;
tmp->redirecting.from.number.str = ast_strdup(i->rdnis);
if (!ast_strlen_zero(i->rdnis)) {
tmp->redirecting.from.number.valid = 1;
tmp->redirecting.from.number.str = ast_strdup(i->rdnis);
}
tmp->caller.id.name.presentation = i->calling_pres;
tmp->caller.id.number.presentation = i->calling_pres;
tmp->caller.id.number.plan = i->calling_ton;