Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Un-Subscribing on 481


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
joe at expert.net
Guest





PostPosted: Thu Mar 11, 2021 11:44 pm    Post subject: [Freeswitch-users] Un-Subscribing on 481 Reply with quote

Hi, everyone.

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.

Below is the code I found in sofia.c that seems to handle the 481 response.

if (status == 481 && sip && !sip->sip_retry_after && sip->sip_call_id && (!sofia_private || !sofia_private->is_call)) {
        char *sql;

        sql = switch_mprintf("delete from sip_subscriptions where call_id='%q'", sip->sip_call_id->i_id);
        switch_assert(sql != NULL);
        sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
        nua_handle_destroy(nh);
}


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.

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?


Thanks,
Joe Barrero
Back to top
brian at freeswitch.com
Guest





PostPosted: Fri Mar 12, 2021 1:28 pm    Post subject: [Freeswitch-users] Un-Subscribing on 481 Reply with quote

Please file issues here https://github.com/signalwire/freeswitch/issues

/b


On Thu, Mar 11, 2021 at 10:46 PM Joseph Barrero <joe@expert.net (joe@expert.net)> wrote:

Quote:
Hi, everyone.

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.

Below is the code I found in sofia.c that seems to handle the 481 response.

if (status == 481 && sip && !sip->sip_retry_after && sip->sip_call_id && (!sofia_private || !sofia_private->is_call)) {
        char *sql;

        sql = switch_mprintf("delete from sip_subscriptions where call_id='%q'", sip->sip_call_id->i_id);
        switch_assert(sql != NULL);
        sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
        nua_handle_destroy(nh);
}


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.

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?


Thanks,
Joe Barrero


_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com



--



Brian West | Co-founder and Developer
Need Commercial support? email sales@freeswitch.com (sales@freeswitch.com)
FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
Email: brian@freeswitch.com (brian@freeswitch.com)
Mobile: 918-424-9378
Website: https://www.FreeSWITCH.com
[/url] [url=https://twitter.com/freeswitch]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services