When you change the domain column in the subscriber table, you have to
recalculate ha1 and ha1b fields. In order to do that you must have the
password of each subscriber. It is stored in the 'password' column if you
have set STORE_PLAINTEXT_PW=1 in opensipsctlrc (default).

HA1 is a MD5 hash of "username:domain:password". For example, if you have
created a SIP account [email protected] using password 123456, then HA1 is
the MD5 hash of "1000:mydomain.com:123456" (without quotes). On the other
hand HA1B is the MD5 hash of "usern...@domain:domain:password"; so using the
same example above, HA1B would be the MD5 hash of "[email protected]:m
ydomain.com:123456" (without quotes).

So, to recalculate and update ha1 and ha1b columns in the subscriber table,
just execute the following sql statement in mysql:

update subscriber
set ha1 = md5(concat(username, ':', domain, ':', password)),
ha1b = md5(concat(username, '@', domain, ':', domain, ':', password))

I hope this could be useful.

Regards,

Dioris
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to