diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index f3d3bb205b..bc98f7fc2d 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -312,6 +312,8 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now) if (gateway_ptr->ib_vars) { switch_event_destroy(&gateway_ptr->ib_vars); } + } else { + last = gateway_ptr; } } else { last = gateway_ptr;