[Home]

Summary:ASTERISK-14936: fullcontact not updated in database
Reporter:Ross Beer (rossbeer)Labels:
Date Opened:2009-10-03 14:27:30Date Closed:2011-06-07 14:01:02
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/res_config_mysql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The fullcontact field is not updated in the realtime database. All other fields are updated correctly.



****** ADDITIONAL INFORMATION ******

Asterisk 1.6.1.6
DAHDI Linux 2.2.0.2
DAHDI Tools 2.2.0
Libpri 1.4.10.1
Addons 1.6.1.1
Ubuntu 9.04
Comments:By: Tilghman Lesher (tilghman) 2009-10-03 23:21:40

Please paste your table structure.

Also, are there any warnings/errors outputted during the update?



By: Ross Beer (rossbeer) 2009-10-04 06:49:27

CREATE TABLE  `asterisk`.`sipregs` (
 `name` varchar(10) NOT NULL,
 `ipaddr` char(15) DEFAULT NULL,
 `port` smallint(5) unsigned DEFAULT NULL,
 `regseconds` int(10) DEFAULT NULL,
 `defaultuser` char(10) DEFAULT NULL,
 `fullcontact` char(35) DEFAULT NULL,
 `regserver` char(20) DEFAULT NULL,
 `useragent` char(32) DEFAULT NULL,
 `lastms` int(10) DEFAULT NULL,
 `username` char(20) DEFAULT NULL,
 PRIMARY KEY (`name`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8;

There are no messages, but every other column is updated. However the regserver is not updated either though it is set in sip.conf and asterisk.conf

Also this is also the case if 'sipregs' realtime table is not used.

The above was automatically generated by asterisk at start, I can see that the 'fullcontact' is only 35 chars long, where as the table for the sip accounts have this set to 80. However neither of them update the field.



By: Tilghman Lesher (tilghman) 2009-10-04 13:19:32

Does it react any differently if you use a regular MyISAM table and not an ndbcluster table?

By: Ross Beer (rossbeer) 2009-10-05 06:18:34

Nope, I had the same thought.

I have also tried changing the 'CHARSET' but this makes no difference.

An earlier version also has the same issue.



By: Karsten Schmidt (guggemand) 2009-10-05 12:10:52

I saw the same behavior.

Looking through the source i found that rtcachefriends has to be set to yes.
Then fullcontact is updated.

in the update_peer function the following is called

realtime_update_peer(p->name, &p->addr, p->username, rtcachefriends ? p->fullcontact : NULL, p->useragent, expire, p->deprecated_username, p->lastms);

Setting the fullcontact setting to NULL when rtcachefriends is not set.

and in realtime_update_peer fc is then set to NULL, and the realtime update is called without fullcontact

By: Ross Beer (rossbeer) 2009-10-06 08:12:52

I can confirm that the fullcontact is updated with 'rtcachefriends=yes' is set. However the regserver is not updated.

Thank you for your input Guggemand, it was very helpful!

By: Karsten Schmidt (guggemand) 2009-10-06 09:45:58

regserver needs either
systemname = my_system_name
or
autosystemname = yes

in asterisk.conf

and
rtsavesysname=yes

in sip.conf

By: Ross Beer (rossbeer) 2009-10-07 09:51:02

For some reason Asterisk does not want to insert the systemname at all. It does not appear in the registration or in mysql CDR 'uniqueid'.

I have tried 'Guggemand' suggestions however it is still not inserted.

By: Karsten Schmidt (guggemand) 2009-10-07 10:55:14

What "System name:" do you see in the CLI when running "core show settings"
And what does "sip show settings" show under "Save sys. name:"

By: Ross Beer (rossbeer) 2009-10-07 11:54:09

Funnily enough its blank, so it doesn't appear to be picking up the variable.

By: Karsten Schmidt (guggemand) 2009-10-07 12:25:00

If its blank that would mean its not setup correctly in asterisk.conf.
Did you set one of the systemname settings, and restart asterisk?

By: Tilghman Lesher (tilghman) 2009-10-07 12:37:29

Looks like this is a user configuration error, so closing.

By: Ross Beer (rossbeer) 2009-10-07 13:52:08

Re-opened as fullcontact should be updated even if rtcachefriends=no

Also, regarding the 'systemname' issues, I have tried both variables and neither of them update the correct fields in the database.

By: Leif Madsen (lmadsen) 2009-10-08 07:13:09

Please show us your asterisk.conf -- I have a feeling you forgot to uncomment the [options] header.

By: Leif Madsen (lmadsen) 2009-10-20 09:38:08

Closed due to lack of response.