<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:FR;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Any news regarding this issue?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I don't think </span><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>{ "expires" : { "$date" : 1422728781000 }, "expires" : { "$date" : 0 } }</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> is a valid query… Is the intent to remove entries where <b>expires =</b> <b>1422728781000 or expires = 0</b>? If yes, I think the logical operator $or should be used for that? Let me know how I can help you to figure out what the issue is.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Mickael<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Mickael Marrache [mailto:mickaelmarrache@gmail.com] <br><b>Sent:</b> Saturday, January 31, 2015 8:32 PM<br><b>To:</b> 'Kamailio (SER) - Users Mailing List'<br><b>Subject:</b> RE: [SR-Users] Wrong location entries when using usrloc with Mongo<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The log entries are all of the form:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter document: { "expires" : { "$date" : 1422728781000 }, "expires" : { "$date" : 0 } }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Mickael<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> sr-users [<a href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>] <b>On Behalf Of </b>Daniel-Constantin Mierla<br><b>Sent:</b> Friday, January 30, 2015 4:28 PM<br><b>To:</b> Kamailio (SER) - Users Mailing List<br><b>Subject:</b> Re: [SR-Users] Wrong location entries when using usrloc with Mongo<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I checked quickly the code and mongo c api, it looks ok. Can you see a debug message with content like:<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>... delete filter document: ...<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>when running with debug=3? If yes, can you send it over to check if is correct?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Cheers,<o:p></o:p></p></div><div><p class=MsoNormal>Daniel<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Jan 30, 2015 at 10:45 AM, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<o:p></o:p></p><div><p class=MsoNormal>Hello,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I will look at the mongo api to see if something was set wrong there for the delete command.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Cheers,<o:p></o:p></p></div><div><p class=MsoNormal>Daniel<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>On Fri, Jan 30, 2015 at 9:54 AM, Mickael Marrache <<a href="mailto:mickaelmarrache@gmail.com" target="_blank">mickaelmarrache@gmail.com</a>> wrote:<o:p></o:p></p></div></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#1F497D'>I forgot to precise that I allow only one contact per AOR.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#1F497D'>modparam("registrar", "max_contacts", 1)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#1F497D'>save("location", "0x04")</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Mickael Marrache [mailto:<a href="mailto:mickaelmarrache@gmail.com" target="_blank">mickaelmarrache@gmail.com</a>] <br><b>Sent:</b> Friday, January 30, 2015 10:51 AM<br><b>To:</b> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><b>Subject:</b> Wrong location entries when using usrloc with Mongo</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I start with no location nor in Mongo, nor in memory. My UA registers successfully and I can see the location entry in Mongo. <span lang=EN-US>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.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>The entry after first registration. Looks okay.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>{ "_id" : ObjectId("54cb38f684e58133783f2b42"), "username" : "A", "contact" : "<a href="sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp">sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp</a>", "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" : "<a href="sip:XXXXXXXXXXX:54217;transport=tcp">sip:XXXXXXXXXXX:54217;transport=tcp</a>", "path" : "<<a href="sip:XXXXXXXXXX;lr;received=sip:XXXXXXXXXXX:54217%3Btransport%3Dtcp">sip:XXXXXXXXXX;lr;received=sip:XXXXXXXXXXX:54217%3Btransport%3Dtcp</a>>", "socket" : "udp:XXXXXXXXX:5060", "methods" : 4751, "last_modified" : ISODate("2015-01-30T07:55:34Z"), "ruid" : "uloc-54cb38df-3378-2", "instance" : null, "reg_id" : 0 }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>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.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>{ "_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" : "<a href="sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp">sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp</a>" }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>The entries after second registration. The new entry looks okay. But, the old entry is still here.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>{ "_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" : "<a href="sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp">sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp</a>" }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>{ "_id" : ObjectId("54cb3a7884e581337a25b895"), "username" : "A", "contact" : "<a href="sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp">sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp</a>", "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 }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>The issue is the entry is not deleted after un registering.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>I precise that registrations are dispatched over multiple registrars with all accesses the same Mongo cluster.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>Thanks,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>Mickael</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><span style='color:#888888'><br><br clear=all><span class=hoenzb><o:p></o:p></span></span></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><span class=hoenzb><span style='color:#888888'>-- </span><o:p></o:p></span></p><div><div><div><p class=MsoNormal><span style='color:#888888'>Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></span><o:p></o:p></p></div><div><p class=MsoNormal><span style='color:#888888'><a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/micond</a><o:p></o:p></span></p></div></div></div></div></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><p class=MsoNormal>Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><o:p></o:p></p></div><div><p class=MsoNormal><a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/micond</a><o:p></o:p></p></div></div></div></div></div></body></html>