[SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

sagar malam sagarmalam at gmail.com
Sat Sep 12 09:54:57 CEST 2020


On Fri, Sep 11, 2020 at 11:06 PM David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Why not just expire them quickly?
>
This may work but it will increase rate of registrations and put load on
server.

>
> On Fri, 11 Sep 2020 at 17:25, sagar malam <sagarmalam at gmail.com> wrote:
>
>> Hello Juha,
>>
>> baresip app is interesting. I will look at it.
>>
>> I have tried ul_rm_contact but it is not working :
>> curl POST --data
>> '{"jsonrpc":"2.0","method":"ul.rm_contact","params":{"0":"location","1":"
>> 30001 at XXXXX.com <30001 at jeff.sip.teledge.com>","2":"sip:30001 at X.X.X.X:43108;x-nat=yes;pv-ip=10.212.134.167;pb-ip=X.X.X.X;pb-pt=43108;transport=tcp"}}'
>> -H "Content-Type: application/json" -X POST 10.50.7.14:5060/RPC2
>>
>> It is throwing error :
>> {
>>        "jsonrpc":      "2.0",
>>        "error":        {
>>                "code": 404,
>>                "message":      "Contact not found"
>>        }
>>
>>
>> On Fri, Sep 11, 2020 at 8:03 PM Juha Heinanen <jh at tutpro.com> wrote:
>>
>>> sagar malam writes:
>>>
>>>
>>>
>>>
>>>
>>> > I am using the usrloc module to store registrations. I could not find
>>> any
>>>
>>>
>>> > way to remove stale registrations before expires time. Most of the
>>>
>>>
>>> > registrations are mobile app so they wont run in background to save
>>> battery
>>>
>>>
>>> > of phone hence we end up having lots of registrations in usrloc which
>>> were
>>>
>>>
>>> > not removed because app was killed in background by OS without letting
>>> it
>>>
>>>
>>> > send unregister request.
>>>
>>>
>>>
>>>
>>>
>>> There are apps (e.g. baresip) that run as foreground service to avoid
>>>
>>>
>>> being killed and that don't consume lots of battery.
>>>
>>>
>>>
>>>
>>>
>>> > Is there any way to remove stale registrations before expires time from
>>>
>>>
>>> > usrloc ?
>>>
>>>
>>>
>>>
>>>
>>> There is ul.rm_contact rpc command.
>>>
>>>
>>>
>>>
>>>
>>> -- Juha
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>>
>>> Kamailio (SER) - Users Mailing List
>>>
>>>
>>> sr-users at lists.kamailio.org
>>>
>>>
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>
>> --
>> Thanks,
>>
>> Sagar
>>
>>
>> _______________________________________________
>>
>> Kamailio (SER) - Users Mailing List
>>
>> sr-users at lists.kamailio.org
>>
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Thanks,

Sagar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200912/44e23cf2/attachment.htm>


More information about the sr-users mailing list