--- chan_iax2.c.dist 2011-09-12 23:25:42.000000000 +1000 +++ chan_iax2.c 2011-12-13 20:12:58.000000000 +1100 @@ -5737,8 +5737,10 @@ 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;