X-Git-Url: http://git.asterisk.org/gitweb/?p=asterisk%2Fasterisk.git;a=blobdiff_plain;f=channels%2Fchan_iax2.c;h=546f2070b60703e2d399cf584599120dbdfb43bf;hp=6a4d196957741cc64b0f60dac0ba9a8f574c3b5a;hb=e58d4e40938f3e4630e2dfd5814e01ea610d2597;hpb=684fd125978a1cd7576c4b4ec37ef55afe7b8946;ds=sidebyside diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 6a4d196..546f207 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -5835,8 +5835,10 @@ static struct ast_channel *ast_iax2_new(int callno, int state, iax2_format capab 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;