diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c index 52a0259fef592836a8dd8210061d159f32e1cb2a..06c1b1c8b8184b9fd1d3f95b4749b2988591afcb 100644 --- a/res/res_pjsip_outbound_registration.c +++ b/res/res_pjsip_outbound_registration.c @@ -1898,8 +1898,9 @@ static int handle_registration_response(void *data) if (response->retry_after){ waiting_time = response->retry_after; - } else if (response->code == 444 || client_state->attempts >= 2 || client_state->waiting_time_upper_bound) { - /* failover directly when not received any response(444 from pjsip), or received twice with other response, or under recovery-flow(second round) */ + } else if (response->code == 444 || client_state->attempts >= 2 || !tdata || !tdata->dest_info.addr.count || client_state->waiting_time_upper_bound) { + /* failover directly when not received any response(444 from pjsip), or received twice with other response, or under recovery-flow(second round), + or no DNS records are found */ client_state->attempts = 0; retry = sip_registration_failover(response); }