<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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@192.168.1.2 xyz. A few days ago I reproduced it several times.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">the line "DBG:auth_db:get_ha1: no result for user 'abc@'" no longer appears in the debug.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">For your curiosity here are my auth settings.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">#### AUTHentication modules </span><span style=" font-family:'monospace';"><br />loadmodule "auth.so" <br />loadmodule "auth_db.so" <br />modparam("auth_db", "calculate_ha1", yes) <br />modparam("auth_db", "password_column", "password") <br />#modparam("auth_db|uri", "db_url", <br /> #"mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME <br />modparam("usrloc|auth_db|uri", "db_url", "text:///usr/share/opensips/dbtext/opensips") <br />modparam("auth_db", "load_credentials", "")<br /></span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Thursday, November 15, 2018 5:50:08 AM PST Bogdan-Andrei Iancu wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> <span style=" font-family:'Monospace';">Hi Robert,<br /> <br /> 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 - see</span><a href="http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#func_www_authorize"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#func_www_authorize</span></a><span style=" font-family:'Monospace';"><br /> <br /> Regards,<br /> </span> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Monospace';">Bogdan-Andrei IancuOpenSIPS Founder and Developer </span><a href="http://www.opensips-solutions.com"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://www.opensips-solutions.com</span></a><span style=" font-family:'Monospace';">OpenSIPS Bootcamp 2018 </span><a href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</span></a> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On 11/14/2018 08:03 PM, Robert Dyck wrote:<br /> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I added "modparam("auth_db", "use_domain", 1)" but it doesn't make a difference to the subscriber table. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Wednesday, November 14, 2018 9:36:34 AM PST Robert Dyck wrote: </p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">[root@slim opensips]# opensipsctl add abc xyz </span><span style=" font-family:'monospace';">Updated subscriber, rows affected: 1 </span><span style=" font-family:'monospace'; font-weight:600; color:#000000; background-color:#ffffff;">new user 'abc' added</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">10:abc:localhost:xyz::6c7faf173d3b8e26d95e7f26dd0388d6:e091cc8c08b19e1d50ee3891d3f37153:</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">[root@slim opensips]# opensipsctl rm abc </span><span style=" font-family:'monospace';">Updated dbaliases, rows affected: 0</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">[root@slim opensips]# opensipsctl add </span><a href="mailto:abc@192.168.1.2"><span style=" font-family:'monospace'; text-decoration: underline; color:#2980b9; background-color:#ffffff;">abc@192.168.1.2</span></a><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> xyz </span><span style=" font-family:'monospace';">Updated subscriber, rows affected: 1 </span><span style=" font-family:'monospace'; font-weight:600; color:#000000; background-color:#ffffff;">new user '</span><a href="mailto:abc@192.168.1.2"><span style=" font-family:'monospace'; font-weight:600; text-decoration: underline; color:#2980b9; background-color:#ffffff;">abc@192.168.1.2</span></a><span style=" font-family:'monospace'; font-weight:600; color:#000000; background-color:#ffffff;">' added</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">10:abc:192.168.1.2:xyz::9ce761c3a9f328510ea011bd5c9bd2c5:cc312796ec331326cd537f3a3ffad7b6:</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';">The difference being localhost vs 192.168.1.2</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';">abc@ not found.</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:80px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Wednesday, November 14, 2018 8:59:10 AM PST Bogdan-Andrei Iancu wrote: </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:160px; margin-right:160px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> <span style=" font-family:'Monospace';">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, </span> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:160px; margin-right:160px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Monospace';">Bogdan-Andrei IancuOpenSIPS Founder and Developer </span><a href="http://www.opensips-solutions.com"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://www.opensips-solutions.com</span></a><span style=" font-family:'Monospace';">OpenSIPS Bootcamp 2018 </span><a href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</span></a> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:160px; margin-right:160px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On 11/14/2018 06:52 PM, Robert Dyck wrote: </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:200px; margin-right:200px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:200px; margin-right:200px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I do not have that parameter set and I do not use multiple domains. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:200px; margin-right:200px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:200px; margin-right:200px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:200px; margin-right:200px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:200px; margin-right:200px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Wednesday, November 14, 2018 6:11:52 AM PST Bogdan-Andrei Iancu wrote: </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:240px; margin-right:240px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> <span style=" font-family:'Monospace';">Hi Robert, Do you have the "use_domain" parameter enabled in the auth_db module ? </span><a href="http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#param_use_domain"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://www.opensips.org/html/docs/modules/2.4.x/auth_db.html#param_use_domain</span></a><span style=" font-family:'Monospace';"> Regards, </span> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:240px; margin-right:240px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Monospace';">Bogdan-Andrei IancuOpenSIPS Founder and Developer </span><a href="http://www.opensips-solutions.com"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://www.opensips-solutions.com</span></a><span style=" font-family:'Monospace';">OpenSIPS Bootcamp 2018 </span><a href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</span></a> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:240px; margin-right:240px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On 11/07/2018 04:30 AM, Robert Dyck wrote: </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">So I added the users but made an error. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">opensipsctl add abc xyz -- I didn't specify the domain. The UAC would not register. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I corrected the user. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">opensipsctl rm abc, opensipsctl add <a href="mailto:abc@192.168.1.2"><span style=" text-decoration: underline; color:#2980b9;">abc@192.168.1.2</span></a> xyz </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The UAC still cannot register. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">DBG:auth_db:get_ha1: no result for user 'abc@'</span> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Opensips is restarted and the UAC registers. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Restaring a production machine is problematic. Is there a way to flush the bad data which I assume has been cached? </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Some error checking in opensipsctl or the DB interface would be helpful. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thanks for your time and the product. </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Rob </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:280px; margin-right:280px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Monospace';">_______________________________________________Users mailing list</span><a href="mailto:Users@lists.opensips.org"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">Users@lists.opensips.org</span></a><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"><span style=" font-family:'Monospace'; text-decoration: underline; color:#2980b9;">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</span></a> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:120px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> <br /> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p></body></html>