Asterisk md5secret password problem

Asterisk md5secret password problem

Introduction –

After upgrading the Asterisk-1.2 to new Asterisk version 1.4 … The md5secret password option in SIP configuration file was not working with new Asterisk 1.4 version…. We try to sort this problem… and finally we found the solution…..

1] Open Asterisk configuration file ‘ sip.conf ‘ and check your realm name –

[root@indianGNU.org:/etc/asterisk# cat sip.conf

[general]
port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
allowguest=no
#disallow=all

…..
…….
localnet=192.168.1.0/24
externip=A.B.C.D
realm=asterisk.IndianGNU.org
recordhistory=yes
videosupport=yes

;add sip_account.conf file configuration ;; note below line is not comment..
#include sip_account.conf
[root@indianGNU.org:/etc/asterisk#

2] How to generate MD5 secret password for SIP account –

[root@indianGNU.org:~# echo -n “4050:asterisk.IndianGNU.org:mypwd” | md5sum
91f55d8bd74cad9e223c2d3a326f1367 –
[root@indianGNU.org:~#

3] The format for generating the MD5 secret password is ….

[root@indianGNU.org:~# echo -n “sip_account_no:realm_name:password” | md5sum

sip_account_no = This is the SIP account name see below file
realm_name = This option is set in sip.conf file of asterisk with “realm” option
password = Password for your SIP account

4] Asterisk SIP account file (in my case ‘sip_account.conf’ )

[root@indianGNU.org:/etc/asterisk# head -n 13 sip_account.conf

[4050]

username=4050
md5secret=91f55d8bd74cad9e223c2d3a326f1367
callerid=Arun Bagul<4050>
context=for-allowme
type=friend

….
….

[root@indianGNU.org:/etc/asterisk#

5]
Now restart or reload Asterisk server and try to login register account 4050 with secrete password “mypwd” .. The account will be registered successfully…

[root@indianGNU.org:~# /etc/init.d/asterisk reload
Reloading Asterisk PBX configuration files.
[root@indianGNU.org:~#

Thank you,

Arun Bagul

Similar Posts:

Be Sociable, Share!

3 Replies to “Asterisk md5secret password problem”

  1. i live kuwait i have a fring mobile line.i want sip reload card your card valid my line .how get how much all details send me

  2. Is it necessary to mention realm in sip.conf because i don’t have domain configuration in my server.

Leave a Reply

Your email address will not be published. Required fields are marked *