<div dir="ltr">Hi, everyone.<div><br></div><div>I recently noticed that Freeswitch continues sending NOTIFY messages even after receiving a 481 from my proxy after not being able to deliver the messages to the UA.  This seems to happen when the UA disconnects from the Internet briefly and registers again before the previous subscription expires. <br><br>Below is the code I found in sofia.c that seems to handle the 481 response.<br><br>if (status == 481 && sip && !sip->sip_retry_after && sip->sip_call_id && (!sofia_private || !sofia_private->is_call)) {<br>        char *sql;<br><br>        sql = switch_mprintf("delete from sip_subscriptions where call_id='%q'", sip->sip_call_id->i_id);<br>        switch_assert(sql != NULL);<br>        sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);<br>        nua_handle_destroy(nh);<br>}<br><br><br>Assuming that the variable sofia_private->is_call evaluates to true when NOTIFY messages are sent during a call, it seems to curtail the removal of the SUBSCRIPTION even after receiving a 481 from the proxy.<br><br>Is there a drawback to removing a subscription on a 481 response during a call?  Would it make sense to simply remove the check if there is a call in place? Is checking ofia_private->is_call there for another purpose?<br><div><br></div><div>Thanks,</div><div>Joe Barrero</div></div></div>