[SR-Users] Wrong location entries when using usrloc with Mongo

Daniel-Constantin Mierla miconda at gmail.com
Fri Jan 30 15:27:52 CET 2015


I checked quickly the code and mongo c api, it looks ok. Can you see a
debug message with content like:

... delete filter document: ...

when running with debug=3? If yes, can you send it over to check if is
correct?

Cheers,
Daniel

On Fri, Jan 30, 2015 at 10:45 AM, Daniel-Constantin Mierla <
miconda at gmail.com> wrote:

> Hello,
>
> it seems that the fileds inside the object are deleted, not the entire
> object. The match was done on username and ruid for deletion, both of them
> are missing.
>
> I will look at the mongo api to see if something was set wrong there for
> the delete command.
>
> Cheers,
> Daniel
>
>
> On Fri, Jan 30, 2015 at 9:54 AM, Mickael Marrache <
> mickaelmarrache at gmail.com> wrote:
>
>> I forgot to precise that I allow only one contact per AOR.
>>
>>
>>
>> modparam("registrar", "max_contacts", 1)
>>
>> save("location", "0x04")
>>
>>
>>
>> *From:* Mickael Marrache [mailto:mickaelmarrache at gmail.com]
>> *Sent:* Friday, January 30, 2015 10:51 AM
>> *To:* sr-users at lists.sip-router.org
>> *Subject:* Wrong location entries when using usrloc with Mongo
>>
>>
>>
>> Hi,
>>
>>
>>
>> I start with no location nor in Mongo, nor in memory. My UA registers
>> successfully and I can see the location entry in Mongo. Then, I close my
>> UA which unregisters (by setting Expires header to 0). Then, I open the app
>> again and a new registration is made.
>>
>>
>>
>> The entry after first registration. Looks okay.
>>
>>
>>
>> { "_id" : ObjectId("54cb38f684e58133783f2b42"), "username" : "A",
>> "contact" : "sip:A at 192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp",
>> "expires" : ISODate("2015-01-30T08:55:34Z"), "q" : -1, "callid" :
>> "297EC55073A07BF78F0C05822A6CCDFB47E48705", "cseq" : 8809, "flags" : 0,
>> "cflags" : 0, "user_agent" : "Acrobits Softphone Business/3.1", "received"
>> : "sip:XXXXXXXXXXX:54217;transport=tcp", "path" : "<
>> sip:XXXXXXXXXX;lr;received=sip:XXXXXXXXXXX:54217%3Btransport%3Dtcp>",
>> "socket" : "udp:XXXXXXXXX:5060", "methods" : 4751, "last_modified" :
>> ISODate("2015-01-30T07:55:34Z"), "ruid" : "uloc-54cb38df-3378-2",
>> "instance" : null, "reg_id" : 0 }
>>
>>
>>
>> The same entry after un register (Expires 0). Note that the username
>> field is missing. In any case, I expected the entry to be deleted.
>>
>>
>>
>> { "_id" : ObjectId("54cb38f684e58133783f2b42"), "expires" :
>> ISODate("2015-01-30T08:56:51Z"), "q" : -1, "cseq" : 8811, "flags" : 0,
>> "cflags" : 0, "user_agent" : "Acrobits Softphone Business/3.1", "received"
>> : "sip: XXXXXXXXX:54217;transport=tcp", "path" : "<sip:
>> XXXXXXXXX;lr;received=sip: XXXXXXXXX:54217%3Btransport%3Dtcp>", "socket" :
>> "udp: XXXXXXXXX:5060", "methods" : 4751, "last_modified" :
>> ISODate("2015-01-30T07:56:51Z"), "callid" :
>> "297EC55073A07BF78F0C05822A6CCDFB47E48705", "instance" : null, "reg_id" :
>> 0, "contact" : "sip:A at 192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp"
>> }
>>
>>
>>
>> The entries after second registration. The new entry looks okay. But, the
>> old entry is still here.
>>
>>
>>
>> { "_id" : ObjectId("54cb38f684e58133783f2b42"), "expires" :
>> ISODate("2015-01-30T08:56:51Z"), "q" : -1, "cseq" : 8811, "flags" : 0,
>> "cflags" : 0, "user_agent" : "Acrobits Softphone Business/3.1", "received"
>> : "sip: XXXXXXXXX:54217;transport=tcp", "path" : "<sip:
>> XXXXXXXXX;lr;received=sip: XXXXXXXXX:54217%3Btransport%3Dtcp>", "socket" :
>> "udp: XXXXXXXXX:5060", "methods" : 4751, "last_modified" :
>> ISODate("2015-01-30T07:56:51Z"), "callid" :
>> "297EC55073A07BF78F0C05822A6CCDFB47E48705", "instance" : null, "reg_id" :
>> 0, "contact" : "sip:A at 192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp"
>> }
>>
>>
>>
>> { "_id" : ObjectId("54cb3a7884e581337a25b895"), "username" : "A",
>> "contact" : "sip:A at 192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp",
>> "expires" : ISODate("2015-01-30T09:02:00Z"), "q" : -1, "callid" :
>> "297EC55073A07BF78F0C05822A6CCDFB47E48705", "cseq" : 8813, "flags" : 0,
>> "cflags" : 0, "user_agent" : "Acrobits Softphone Business/3.1", "received"
>> : "sip: XXXXXXXXX:54217;transport=tcp", "path" : "<sip:
>> XXXXXXXXX;lr;received=sip: XXXXXXXXX:54217%3Btransport%3Dtcp>", "socket" :
>> "udp: XXXXXXXXX:5060", "methods" : 4751, "last_modified" :
>> ISODate("2015-01-30T08:02:00Z"), "ruid" : "uloc-54cb38df-337a-1",
>> "instance" : null, "reg_id" : 0 }
>>
>>
>>
>> The issue is the entry is not deleted after un registering.
>>
>>
>>
>> I precise that registrations are dispatched over multiple registrars with
>> all accesses the same Mongo cluster.
>>
>>
>>
>> Thanks,
>>
>> Mickael
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/micond
> <http://www.linkedin.com/in/miconda>
>



-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/micond
<http://www.linkedin.com/in/miconda>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150130/bfe061e4/attachment.html>


More information about the sr-users mailing list