- 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;
tmp->caller.id.name.presentation = i->calling_pres;
tmp->caller.id.number.presentation = i->calling_pres;
tmp->caller.id.number.plan = i->calling_ton;