[OpenSIPS-Users] usrloc contact_id
Callum Guy
callum.guy at x-on.co.uk
Mon Nov 11 04:26:40 EST 2019
Hi All,
I just wanted to feedback on this after a run through of the usrloc source
(ucontact.c:518).
It appears that unless we are running in sql-only cluster mode (we are
using full-sharing) the contact_id generation is handled by the module
rather than using the database autoincrement. This makes sense now that I
think about it, especially given that we are using write-back so the
contacts will share an identifier within the cluster before being persisted.
On that basis I guess we would be sensible to remove the auto_increment
option from the table definition to reduce the ambiguity.
Callum
On Fri, 8 Nov 2019 at 17:13, Callum Guy <callum.guy at x-on.co.uk> wrote:
> New installation running on OpenSIPs 3.0.1.
>
> Quick question, has anything changed with regards to the contact_id field
> of the location tables? The platform I am using implements the database on
> MySQL NDBCLUSTER however the autoincrement values are going wild - I'm
> trying to work out if its my database or if we've moved away from auto-inc?
> I only ask as the newest ID's are not necessarily the largest!
>
> We've only got three subscribers and look:
>
> [image: image.png]
>
> Bonkers! That table has been truncated and recreated just before these
> first registrations came in!
>
> Here is our table definition in case that's useful:
>
> CREATE TABLE `location_th` (
> `contact_id` BIGINT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
> `username` CHAR(64) NOT NULL DEFAULT '',
> `domain` CHAR(64) DEFAULT NULL,
> `contact` CHAR(255) NOT NULL DEFAULT '',
> `received` CHAR(255) DEFAULT NULL,
> `path` CHAR(255) DEFAULT NULL,
> `expires` INT(10) UNSIGNED NOT NULL,
> `q` FLOAT(10,2) NOT NULL DEFAULT '1.00',
> `callid` CHAR(255) NOT NULL DEFAULT 'Default-Call-ID',
> `cseq` INT(11) NOT NULL DEFAULT '13',
> `last_modified` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:01',
> `flags` INT(11) NOT NULL DEFAULT '0',
> `cflags` CHAR(255) DEFAULT NULL,
> `user_agent` CHAR(255) NOT NULL DEFAULT '',
> `socket` CHAR(64) DEFAULT NULL,
> `methods` INT(11) DEFAULT NULL,
> `sip_instance` CHAR(255) DEFAULT NULL,
> `kv_store` VARCHAR(1000) DEFAULT NULL,
> `attr` CHAR(255) DEFAULT NULL,
> PRIMARY KEY (`contact_id`)
> ) ENGINE=NDBCLUSTER AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
>
--
*0333 332 0000 | www.x-on.co.uk <http://www.x-on.co.uk> | **
<https://www.linkedin.com/company/x-on> <https://www.facebook.com/XonTel>
<https://twitter.com/xonuk> *
X-on
is a trading name of Storacall
Technology Ltd a limited company registered in
England and Wales.
Registered Office : Avaland House, 110 London Road, Apsley, Hemel
Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.
The
information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately
on +44(0)333 332 0000 and delete the
message from your computer. If you are
not a named addressee you must not use,
disclose, disseminate, distribute,
copy, print or reply to this email. Views
or opinions expressed by an
individual
within this email may not necessarily
reflect the views of X-on
or its associated companies. Although X-on routinely
screens for viruses,
addressees should scan this email and any attachments
for
viruses. X-on
makes no representation or warranty as to the absence of viruses
in this
email or any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20191111/7be82c3f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20417 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20191111/7be82c3f/attachment-0001.png>
More information about the Users
mailing list