[OpenSIPS-Users] Flush bad user data from from running opensips

Robert Dyck rob.dyck at telus.net
Thu Nov 15 13:50:39 EST 2018


So now I am confused. I am unable to reproduce the problem regardless of the "use_domain" 
setting. I even tried eliminating that line from the configuration ( that is how it was originally ) 
and the client can register whether I had created the user as abc xyz or abc at 192.168.1.2 xyz. A 
few days ago I reproduced it several times.

the line "DBG:auth_db:get_ha1: no result for user 'abc@'" no longer appears in the debug.

For your curiosity here are my auth settings.

#### AUTHentication modules 


On Thursday, November 15, 2018 5:50:08 AM PST Bogdan-Andrei Iancu wrote:


    Hi Robert,            So, the data in DB is ok, but the auth still fails - please paste      the exact 
setting/modparams you have for the auth_db module along      with the return code provided by 
the www_auth function - seehttp://www.opensips.org/html/docs/modules/2.4.x/
auth_db.html#func_www_authorize[1]
    
Bogdan-Andrei IancuOpenSIPS Founder and Developer  http://www.opensips-solutions.com[2]OpenSIPS Bootcamp 2018  http://opensips.org/training/
OpenSIPS_Bootcamp_2018/[3]    
On 11/14/2018 08:03 PM, Robert Dyck      wrote:        
                  
I added "modparam("auth_db", "use_domain", 1)" but it doesn't make a difference to the 
subscriber table.      
      
On Wednesday, November 14, 2018 9:36:34 AM PST Robert Dyck wrote:      
[root at slim opensips]# opensipsctl add abc xyz Updated subscriber, rows affected: 1 *new user 
'abc' added*      
10:abc:localhost:xyz::
6c7faf173d3b8e26d95e7f26dd0388d6:e091cc8c08b19e1d50ee3891d3f37153:      
[root at slim opensips]# opensipsctl rm abc Updated dbaliases, rows affected: 0[root at slim 
opensips]# opensipsctl add abc at 192.168.1.2[4] xyz                Updated subscriber, rows 
affected: 1 *new user '_abc at 192.168.1.2_' added*      
10:abc:192.168.1.2:xyz::
9ce761c3a9f328510ea011bd5c9bd2c5:cc312796ec331326cd537f3a3ffad7b6:      
      
The difference being localhost vs 192.168.1.2      
abc@ not found.      
      
      
On Wednesday, November 14, 2018 8:59:10 AM PST Bogdan-Andrei Iancu wrote:      
    That's the whole idea - if the "use_domain" is on 0, OpenSIPS      will reference the users only 
by username. So try "opensipsctl add      abc xyz" and post what record you get into the 
subscriber table.            Regards,           
Bogdan-Andrei IancuOpenSIPS Founder and Developer  http://www.opensips-solutions.com[2]OpenSIPS Bootcamp 2018  http://opensips.org/training/
OpenSIPS_Bootcamp_2018/[3]          
On 11/14/2018 06:52 PM, Robert Dyck      wrote:              
                        
I do not have that parameter set and I do not use multiple domains.            
            
The problem was that after I corrected the error ( missing domain ), opensips continued to look 
for abc@ rather than abc. I was looking for a graceful way to correct the internal representation 
of the user name. Restarting opensips is no problem on a small installation but it is less than 
ideal.            
            
On Wednesday, November 14, 2018 6:11:52 AM PST Bogdan-Andrei Iancu wrote:            
    Hi Robert,            Do you have the "use_domain" parameter enabled in the auth_db module      
?         http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#param_use_domain[5]            
Regards,                    
Bogdan-Andrei IancuOpenSIPS Founder and Developer  http://www.opensips-solutions.com[2]OpenSIPS Bootcamp 2018  http://opensips.org/training/
OpenSIPS_Bootcamp_2018/[3]                
On 11/07/2018 04:30 AM, Robert Dyck      wrote:                    
                              
I have updated my small test bed from 2.3.2 to 2.4.2. I didn't bother to back up the 'subscriber" 
table and it was wiped by the installation. No big deal, it was tiny.                  
                  
So I added the users but made an error.                  
opensipsctl add abc xyz --  I didn't specify the domain. The UAC would not register.                  
                  
I corrected the user.                  
opensipsctl rm abc, opensipsctl add abc at 192.168.1.2[4] xyz                  
The UAC still cannot register.                  
DBG:auth_db:get_ha1: no result for user 'abc@'                  
                  
Opensips is restarted and the UAC registers.                  
                  
Restaring a production machine is problematic. Is there a way to flush the bad data which I 
assume has been cached?                  
                  
Some error checking in opensipsctl or the DB interface would be helpful.                  
                  
Thanks for your time and the product.                  
Rob                                    
_______________________________________________Users mailing 
listUsers at lists.opensips.org[6]http://lists.opensips.org/cgi-bin/mailman/listinfo/users[7]                      
                
      
          



--------
[1] http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#func_www_authorize
[2] http://www.opensips-solutions.com
[3] http://opensips.org/training/OpenSIPS_Bootcamp_2018/
[4] mailto:abc at 192.168.1.2
[5] http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#param_use_domain
[6] mailto:Users at lists.opensips.org
[7] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20181115/8af478d3/attachment-0001.html>


More information about the Users mailing list