[OpenSIPS-Users] BDB cannot register multiple phones for an AOR?

Rick van Rein rick at openfortress.nl
Wed May 30 11:07:12 CEST 2012


Hello,

I'm using BDB 4.8 with OpenSIPS 1.8.0 from your Debian packages.  I like
to avoid the complexity of set semantics for phone registration, but I
ran into an oddity that is either a bug or a misconception on my part.

One phone can register to my BDB location database, but a second will
overwrite the first entry.  When I lookup the code for insertion in
the BDB database, then it does indeed boil down to a "put" operation
on the database, without first a "get" of previous values to extend.

Is this intentional?  My location database is indexed with username and
domain, and I doubt I should change that.  What I had expected was a
list of registrations to be maintained.  Am I wrong to assume that?

I am attaching some test results in case you would like to see it.


Thanks,
 -Rick


    ------- 8< ------- 8< ------- 8< ------- 8< ------- 8< -------


I have no trouble registering twice with MySQL:

Contact:: <sip:3153432xxxx at 10.0.0.186:5064>;q=;expires=17991;flags=0x0;cflags=0x0;socket=<udp:10.0.0.11:5070>;methods=0x143F;user_agent=<Linksys/SPA962-6.1.5(a)>
Contact:: <sip:3153432xxxx at 10.0.0.200:5080>;q=;expires=17904;flags=0x0;cflags=0x0;socket=<udp:10.0.0.11:5070>;methods=0xFFFFFFFF;user_agent=<Linphone/3.3.2 (eXosip2/3.3.0)>

But when I switch to BDB and make no other changes to the OpenSIPS script,
it won't let me register multiple phones.  This is a phone that registers
normally, and manages to stay registered...

 3153432xxxx|sip4and6.dynqr.nl|
 NIL|3153432xxxx|sip4and6.dynqr.nl|sip:3153432xxxx at 10.0.0.186:5064|NULL|NULL|2012-05-30 13:07:45|-1.00     |745e1aeb-b90c1627 at 10.0.0.186|15819|2012-05-30 08:07:45|0|0|Linksys/SPA962-6.1.5(a)|udp:10.0.0.11:5070|5183|NULL||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

...until _another_ phone registers as well, and _replaces_ this one...

 3153432xxxx|sip4and6.dynqr.nl|
 NIL|3153432xxxx|sip4and6.dynqr.nl|sip:3153432xxxx at 10.0.0.200:5080|NULL|NULL|2012-05-30 13:10:38|-1.00     |1838705389|4|2012-05-30 08:10:38|0|0|Linphone/3.3.2 (eXosip2/3.3.0)|udp:10.0.0.11:5070|NULL|NULL|

...possibly caused by the key definition?

 METADATA_KEY
 1 2 

I would expect either multiple records under this key, or more keys (but
that would damage lookup capabilities).

This is the column setup for my BDB database.  I am using
usrloc.matching_mode=1

 METADATA_COLUMNS
 id(int) username(str) domain(str) contact(str) received(str) path(str) expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int) cflags(int) user_agent(str) socket(str) methods(int) sip_instance(str)




More information about the Users mailing list