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

2015-02-10 Thread Mickael Marrache
:83]: db_free_columns(): freeing RES_NAMES[13] 
at 0x7f5485599548

[31723]: DEBUG: core [db_res.c:83]: db_free_columns(): freeing RES_NAMES[14] 
at 0x7f5485599590

[31723]: DEBUG: core [db_res.c:83]: db_free_columns(): freeing RES_NAMES[15] 
at 0x7f54855995d8

[31723]: DEBUG: core [db_res.c:92]: db_free_columns(): freeing result names 
at 0x7f548559cf08

[31723]: DEBUG: core [db_res.c:97]: db_free_columns(): freeing result types 
at 0x7f54855a0c48

[31723]: DEBUG: core [db_res.c:52]: db_free_rows(): freeing 1 rows

[31723]: DEBUG: core [db_row.c:95]: db_free_row(): freeing row values at 
0x7f5485539e80

[31723]: DEBUG: core [db_res.c:60]: db_free_rows(): freeing rows at 
0x7f54855c0578

[31723]: DEBUG: core [db_res.c:134]: db_free_result(): freeing result set at 
0x7f548558aae0

[31723]: DEBUG: core [strcommon.c:212]: unescape_user(): unescaped string is 
sip:xx

[31723]: DEBUG: registrar [path.c:110]: build_path_vector(): received is 
sip:xx

[31723]: DEBUG: registrar [path.c:118]: build_path_vector(): path is 
sip:x;lr;received=sip:xxx

[31723]: DEBUG: core [sruid.c:183]: sruid_next(): new sruid is 
[uloc-54d9e708-7beb-d1] (29 / 21)

[31723]: DEBUG: registrar [save.c:409]: pack_ci(): generated ruid is: 
uloc-54d9e708-7beb-d1

[31723]: DEBUG: usrloc [ucontact.c:948]: db_update_ucontact_ruid(): 
ruid:uloc-54d9e708-7be9-c1

[31723]: DEBUG: usrloc [ucontact.c:1059]: db_update_ucontact_ruid(): 
contact:sip:u1@xxx;rinstance=2786DE56

[31723]: DEBUG: registrar [reply.c:374]: build_contact(): created Contact HF: 
Contact: 
sip:u1@xx;rinstance=2786DE56;expires=3600;received=sip:xx#015#012

[31723]: DEBUG: sl [sl.c:280]: send_reply(): reply in stateless mode (sl)

[31723]: DEBUG: core [msg_translator.c:158]: check_via_address(): 
(x,x, 0)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
0x7f547e87e188

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [xavp.c:446]: xavp_destroy_list(): destroying xavp list 
(nil)

[31723]: DEBUG: core [receive.c:278]: receive_msg(): cleaning up

 

Thanks,

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Tuesday, February 03, 2015 9:43 PM
To: Mickael Marrache; sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

I pushed a patch on git master branch for this issue, can you try it and report 
the results?

I tested a bit with usrloc and DB_ONLY mode, it seemed fine here.

Cheers,
Daniel

On 03/02/15 12:36, Daniel-Constantin Mierla wrote:

I haven't had time to look at it, being traveling to Fosdem in the past days. 
It is on my short term agenda.

Cheers,
Daniel

On 02/02/15 12:38, Mickael Marrache wrote:

Any news regarding this issue?

 

I don't think { expires : { $date : 1422728781000 }, expires : { $date 
: 0 } } is a valid query… Is the intent to remove entries where expires = 
1422728781000 or expires = 0? 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.

 

Thanks,

Mickael

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Saturday, January 31, 2015 8:32 PM
To: 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] Wrong location entries when using usrloc with Mongo

 

Hi,

 

The log entries are all of the form:

 

DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter 
document: { expires : { $date : 1422728781000 }, expires : { $date : 0 
} }

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Friday, January 30, 2015 4:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

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 mico...@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 mickaelmarra...@gmail.com 
wrote:

I forgot to precise that I allow only one contact per AOR

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

2015-02-03 Thread Daniel-Constantin Mierla
I haven't had time to look at it, being traveling to Fosdem in the past
days. It is on my short term agenda.

Cheers,
Daniel

On 02/02/15 12:38, Mickael Marrache wrote:

 Any news regarding this issue?

  

 I don't think *{ expires : { $date : 1422728781000 }, expires :
 { $date : 0 } }*is a valid query… Is the intent to remove entries
 where *expires =* *1422728781000 or expires = 0*? 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.

  

 Thanks,

 Mickael

  

 *From:*Mickael Marrache [mailto:mickaelmarra...@gmail.com]
 *Sent:* Saturday, January 31, 2015 8:32 PM
 *To:* 'Kamailio (SER) - Users Mailing List'
 *Subject:* RE: [SR-Users] Wrong location entries when using usrloc
 with Mongo

  

 Hi,

  

 The log entries are all of the form:

  

 DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete
 filter document: { expires : { $date : 1422728781000 }, expires
 : { $date : 0 } }

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *Daniel-Constantin Mierla
 *Sent:* Friday, January 30, 2015 4:28 PM
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Wrong location entries when using usrloc
 with Mongo

  

 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
 mico...@gmail.com mailto:mico...@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
 mickaelmarra...@gmail.com mailto:mickaelmarra...@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:mickaelmarra...@gmail.com
 mailto:mickaelmarra...@gmail.com]
 *Sent:* Friday, January 30, 2015 10:51 AM
 *To:* sr-users@lists.sip-router.org
 mailto:sr-users@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@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:XXX:54217;transport=tcp,
 path :
 sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
 socket : udp:X: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: X:54217;transport=tcp,
 path : sip: X;lr;received=sip:
 X:54217%3Btransport%3Dtcp, socket : udp:
 X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null,
 reg_id : 0, contact :
 sip:A@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: X:54217;transport=tcp,
 path : sip: X;lr;received=sip:
 X:54217%3Btransport%3Dtcp, socket : udp:
 X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null,
 reg_id : 0, contact :
 sip:A@192.168.1.3:54217

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

2015-02-03 Thread Daniel-Constantin Mierla
I pushed a patch on git master branch for this issue, can you try it and
report the results?

I tested a bit with usrloc and DB_ONLY mode, it seemed fine here.

Cheers,
Daniel

On 03/02/15 12:36, Daniel-Constantin Mierla wrote:
 I haven't had time to look at it, being traveling to Fosdem in the
 past days. It is on my short term agenda.

 Cheers,
 Daniel

 On 02/02/15 12:38, Mickael Marrache wrote:

 Any news regarding this issue?

  

 I don't think *{ expires : { $date : 1422728781000 }, expires :
 { $date : 0 } }*is a valid query… Is the intent to remove entries
 where *expires =* *1422728781000 or expires = 0*? 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.

  

 Thanks,

 Mickael

  

 *From:*Mickael Marrache [mailto:mickaelmarra...@gmail.com]
 *Sent:* Saturday, January 31, 2015 8:32 PM
 *To:* 'Kamailio (SER) - Users Mailing List'
 *Subject:* RE: [SR-Users] Wrong location entries when using usrloc
 with Mongo

  

 Hi,

  

 The log entries are all of the form:

  

 DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete
 filter document: { expires : { $date : 1422728781000 }, expires
 : { $date : 0 } }

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *Daniel-Constantin Mierla
 *Sent:* Friday, January 30, 2015 4:28 PM
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Wrong location entries when using usrloc
 with Mongo

  

 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
 mico...@gmail.com mailto:mico...@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
 mickaelmarra...@gmail.com mailto:mickaelmarra...@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:mickaelmarra...@gmail.com
 mailto:mickaelmarra...@gmail.com]
 *Sent:* Friday, January 30, 2015 10:51 AM
 *To:* sr-users@lists.sip-router.org
 mailto:sr-users@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@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:XXX:54217;transport=tcp, path :
 sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
 socket : udp:X: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: X:54217;transport=tcp,
 path : sip: X;lr;received=sip:
 X:54217%3Btransport%3Dtcp, socket : udp:
 X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null,
 reg_id : 0, contact :
 sip:A@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: X:54217;transport=tcp,
 path : sip: X;lr;received=sip:
 X:54217%3Btransport%3Dtcp

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

2015-02-02 Thread Mickael Marrache
Any news regarding this issue?

 

I don't think { expires : { $date : 1422728781000 }, expires : { $date 
: 0 } } is a valid query… Is the intent to remove entries where expires = 
1422728781000 or expires = 0? 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.

 

Thanks,

Mickael

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Saturday, January 31, 2015 8:32 PM
To: 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] Wrong location entries when using usrloc with Mongo

 

Hi,

 

The log entries are all of the form:

 

DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter 
document: { expires : { $date : 1422728781000 }, expires : { $date : 0 
} }

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Friday, January 30, 2015 4:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

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 mico...@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 mickaelmarra...@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:mickaelmarra...@gmail.com] 
Sent: Friday, January 30, 2015 10:51 AM
To: sr-users@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@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:XXX:54217;transport=tcp, path : 
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp, 
socket : udp:X: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: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@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: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact : 
sip:A@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: X:54217;transport=tcp, path : sip: 
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket : 
udp: X: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

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

2015-01-31 Thread Mickael Marrache
Hi,

 

The log entries are all of the form:

 

DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter 
document: { expires : { $date : 1422728781000 }, expires : { $date : 0 
} }

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Friday, January 30, 2015 4:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

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 mico...@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 mickaelmarra...@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:mickaelmarra...@gmail.com] 
Sent: Friday, January 30, 2015 10:51 AM
To: sr-users@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@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:XXX:54217;transport=tcp, path : 
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp, 
socket : udp:X: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: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@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: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact : 
sip:A@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: X:54217;transport=tcp, path : sip: 
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket : 
udp: X: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@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

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

2015-01-30 Thread Daniel-Constantin Mierla
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 
mico...@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 
 mickaelmarra...@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:mickaelmarra...@gmail.com]
 *Sent:* Friday, January 30, 2015 10:51 AM
 *To:* sr-users@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@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:XXX:54217;transport=tcp, path : 
 sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
 socket : udp:X: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: X:54217;transport=tcp, path : sip:
 X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
 udp: X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id :
 0, contact : sip:A@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: X:54217;transport=tcp, path : sip:
 X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
 udp: X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id :
 0, contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp
 }



 { _id : ObjectId(54cb3a7884e581337a25b895), username : A,
 contact : sip:A@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: X:54217;transport=tcp, path : sip:
 X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
 udp: X: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@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
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


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

2015-01-30 Thread Daniel-Constantin Mierla
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 mickaelmarra...@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:mickaelmarra...@gmail.com]
 *Sent:* Friday, January 30, 2015 10:51 AM
 *To:* sr-users@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@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:XXX:54217;transport=tcp, path : 
 sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
 socket : udp:X: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: X:54217;transport=tcp, path : sip:
 X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
 udp: X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id :
 0, contact : sip:A@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: X:54217;transport=tcp, path : sip:
 X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
 udp: X:5060, methods : 4751, last_modified :
 ISODate(2015-01-30T07:56:51Z), callid :
 297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id :
 0, contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp
 }



 { _id : ObjectId(54cb3a7884e581337a25b895), username : A,
 contact : sip:A@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: X:54217;transport=tcp, path : sip:
 X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
 udp: X: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@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
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


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

2015-01-30 Thread Mickael Marrache
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@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:XXX:54217;transport=tcp, path :
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
socket : udp:X: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: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@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: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact
: sip:A@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: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X: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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


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

2015-01-30 Thread Mickael Marrache
I forgot to precise that I allow only one contact per AOR.

 

modparam(registrar, max_contacts, 1)

save(location, 0x04)

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Friday, January 30, 2015 10:51 AM
To: sr-users@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@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:XXX:54217;transport=tcp, path :
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
socket : udp:X: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: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@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: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact
: sip:A@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: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X: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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users