How to use password file with Authenticate Application

Home » Asterisk Users » How to use password file with Authenticate Application
Asterisk Users No Comments

Hi List,

I want to use text file to get password information with Authenticate
Application. I am using asterisk 1.6.2.11. I made text file at
/tmp/pass.txt with below information.

*pass.txt*

Virendra: 81dc9bdb52d04dc20036dbd8313ed055
Vijay : 9996535e07258a7bbfd8b132435c5962
Virendra Bhati: 7bccfde7714a1ebadf06c5f4cea752c1
*
SIP.conf :-

[2218]*
type=friend
secret=******
callerid=”Virendra” <9172341457>
host=dynamic ; This device needs to register
nat=yes ; X-Lite is behind a NAT router
canreinvite=no ; Typically set to NO if behind NAT
disallow=all
dtmfmode=inband
allow=speex
allow=ulaw
allow=alaw
allow=gsm ; GSM consumes far less bandwidth than ulaw
insecure=invite,port
context=bhati-test
qualify=yes
accountcode=Virendra*

**extensions.conf*

[bhati-test]

exten => 1234,1,Answer()

same => n,NoOp(Welcome to WaveCrest Conferencing Soultion)
same => n,playback(WC)
same => n,Authenticate(/tmp/pass.txt,am,5)
same => n,MeetMe(1234,Mp)
same => n,Hangup()

*CLI output:-

* == Using SIP RTP CoS mark 5