MD5 secret in sip.conf

Does anyone know how to hash the secret password in sip.conf?

nvm got it!
I had to put the md5secret and restart asterisk.

HI,
Could you please give some idea about this?
I can’t register using md5 method.

10.10.1.42
[sip]
username = sip
secret = 1234
context = from-internal
host = dynamic
type = friend
qualify = yes

10.10.1.254
register => sip:81dc9bdb52d04dc20036dbd8313ed055@10.10.1.42
and
register => sip:#81dc9bdb52d04dc20036dbd8313ed055#@10.10.1.42

As you know both addresses, don’t use register. Just use type=peer with a static address (use type=peer even with dynamic ones).

(The MD5 hashing is performed internally and includes more than just the password. The register line would contain the clear text password, if register were appropriate here.)

[sip]
username = sip
md5secret=81dc9bdb52d04dc20036dbd8313ed055
context = from-internal
host = dynamic
type = peer
qualify = yes

X-lite
displayname = sip
username = sip
password = 1234
domain = ipaddress
authentication name = sip

after fixed this thing,

receiving below content.
[Jul 11 15:14:53] NOTICE[30970]: chan_sip.c:25160 handle_request_register: Registration from ‘"sip"sip:sip@10.10.1.42’ failed for ‘10.10.1.100:12274’ - Wrong password

Very few people use md5secret. Just use the clear text secret, or don’t bother with a secret at all, as the IP address will provide some protection.

In any case, you seem to have failed to include the user and realm in the hash.