[SR-Users] Replace old registration record with new one while keeping single AOR per contact

Aqs Younas aqsyounas at gmail.com
Thu Feb 9 10:14:37 CET 2017


Daniel,

Yes, I have tried the unregister function but it only removes contacts if
db_mode=3 for usrloc. Whereas i have db_mode=2 in my configuration.

Also tried MI command without any success.

root at debian:/usr/local/kamailio/sbin# ./kamctl ul show
Domain:: location table=1024 records=1 max_slot=1
        AOR:: 1040 at 192.168.1.10
                Contact:: sip:1040 at 192.168.1.8:45573;
rinstance=5494290a28b07472;transport=tcp Q=
                        Expires:: 3366
                        Callid:: J2MpU81af1hZ7bj2eLBAHQ..
                        Cseq:: 2
                        User-agent:: Z 3.9.32144 r32121
                        State:: CS_SYNC
                        Flags:: 0
                        Cflag:: 0
                        Socket:: tcp:192.168.1.10:5060
                        Methods:: 5087
                        Ruid:: uloc-5891af42-b58-3
                        Reg-Id:: 0
                        Last-Keepalive:: 1485943492
                        Last-Modified:: 1485943492

./kamctl fifo ul_rm_contact location 1040 at 191.168.1.10
sip:1040 at 192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp
*404 AOR not found*

It is showing AOR not available but it is available.

root at debian:/usr/local/kamailio/sbin# ./kamctl ul show
Domain:: location table=1024 records=1 max_slot=1
        AOR:: 1040 at 192.168.1.10
                Contact:: sip:1040 at 192.168.1.8:45573;
rinstance=5494290a28b07472;transport=tcp Q=
                        Expires:: 3064
                        Callid:: J2MpU81af1hZ7bj2eLBAHQ..
                        Cseq:: 2
                        User-agent:: Z 3.9.32144 r32121
                        State:: CS_SYNC
                        Flags:: 0
                        Cflag:: 0
                        Socket:: tcp:192.168.1.10:5060
                        Methods:: 5087
                        Ruid:: uloc-5891af42-b58-3
                        Reg-Id:: 0
                        Last-Keepalive:: 1485943492
                        Last-Modified:: 1485943492

Any thought what i am doing wrong here.
Thank You.

On 8 February 2017 at 12:22, Daniel-Constantin Mierla <miconda at gmail.com>
wrote:

> Hello,
>
> you can try to combine reg_fetch_contacts() with unregister(), so you can
> choose which contact is removed.
>
> Cheers,
> Daniel
>
> On 29/01/2017 21:11, Aqs Younas wrote:
>
> Thank You for your time. I figured it out later.
> Another question can i remove a specific contact from kamailio with
> db_mode=2 whereas max contacts per AOR set to 2 or replace only a specific
> contact in this case?
>
>
> On Mon, Jan 30, 2017 at 12:59 AM Federico Cabiddu <
> federico.cabiddu at gmail.com> wrote:
>
>> Hi,
>> you can use the flag "0x04" when calling save(): http://www.kamailio.or
>> g/docs/modules/4.4.x/modules/registrar.html#registrar.f.save
>>
>> Regards,
>>
>> Federico
>>
>>
>> On 28 Jan 2017 20:13, "Aqs Younas" <aqsyounas at gmail.com> wrote:
>>
>> Greetings list,
>> I want to keep single AOR per contact. If new regitration comes i want to
>> replace the old record with new.
>> Suppose User Alice registers from device A and after certain time it try
>> to register from device B. I want Registration from device B to replace A.
>> Any pointer is mush appreciated.
>>
>> Cheers,
>> Aqs
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170209/4fdc603c/attachment.html>


More information about the sr-users mailing list