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.

Could you please give some idea about this?
I can’t register using md5 method.
username = sip
secret = 1234
context = from-internal
host = dynamic
type = friend
qualify = yes
register => sip:81dc9bdb52d04dc20036dbd8313ed055@
register => sip:#81dc9bdb52d04dc20036dbd8313ed055#@

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.)

username = sip
context = from-internal
host = dynamic
type = peer
qualify = yes

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@’ failed for ‘’ - 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.