If I use the command database show again, the defaultuser have not changed from Celso to Junior, it still show Celso!
asterisk*CLI> database show
/SIP/Registry/8001 : 172.16.1.1:5060:900:Celso:sip:email@example.com:5060
Is there a way to when the defaultuser is changed in sip.conf the defaultuser stored on database show is updated automaticaly?
It is not a problem if you are using sip.conf, but if you are using RealTime like my, when you change the defaultuser on the ODBC/postgres database, then when the peer register the Asterisk update the collumn defaultuser on the ODBC/postgres side based on the information found on the Asterisk database show.
I read in and old post these fields doesn’t work with RealTime, dont know if you Asterisk vesion is affected by this issue
One workaround would be trying use username instead. I know Asterisk doucumenation suggest the following
Note: The parameter “username” is not the username and in most cases is ; not needed at all. Check below. In later releases, it’s renamed ; to “defaultuser” which is a better name, since it is used in ; combination with the “defaultip” setting.
It is expected that asterisk should be capable to update and delete his records based on the information that it collect.
What I whant to know is if asterisk can or can’t do this, and if it does, what I have to do, what I have to set, to make it work propely.
I don’t know what this old post is about exactly, but columns such as:
they are expected to be updated but not defaultuser, it should be the opposite, the registy defaultuser on asterisk database should be updated based on the values configured in sip.conf or the values configured on the table sippeers.
Here is an example of asterisk updating the table sippeers: 2020-04-22 14:52:46.262 -03  asterisk@anequim_config LOG: comando: UPDATE sippeers SET ipaddr = '10.100.0.168', fullcontact = 'sip:firstname.lastname@example.org:5060', lastms = '16', useragent = 'Yealink SIP-T19P_E2 22.214.171.124',defaultuser = 'Pré-pesagem - Italianinho', regseconds = '1587578026', port = '5060' WHERE name = '8163'
I know about that warning, I highlighted it on my first post, but just a warning you still can use username.
Yes you re right I just checked the DB structure and colum it is missing that colum, I dint realized it before, becuase I switched to pjsip. all chan_si support (and patches) is provided only by the community , not by Sangoma. So if is this is an issue with chan_sip you will need to wait some one on the commnuty fix it. And I agree with you ,information should be updated automatically on the Asterisk internal DB, that DB should be automtically updated by the module