[asterisk-users] How to use password file with Authenticate Application

virendra bhati virbhati at gmail.com
Mon Nov 21 00:42:31 CST 2011


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
    -- Executing [1234 at bhati-test:1] Answer("SIP/2218-0000064f", "") in new
stack
    -- Executing [1234 at bhati-test:2] NoOp("SIP/2218-0000064f", "Welcome to
WaveCrest Conferencing Soultion") in new stack
    -- Executing [1234 at bhati-test:3] Playback("SIP/2218-0000064f", "WC") in
new stack
    -- <SIP/2218-0000064f> Playing 'WC.gsm' (language 'en')
    -- Executing [1234 at bhati-test:4] Authenticate("SIP/2218-0000064f",
"/tmp/pass.txt,am,5") in new stack
    -- <SIP/2218-0000064f> Playing 'agent-pass.ulaw' (language 'en')
    -- <SIP/2218-0000064f> Playing 'auth-incorrect.ulaw' (language 'en')
    -- <SIP/2218-0000064f> Playing 'auth-incorrect.ulaw' (language 'en')
    -- <SIP/2218-0000064f> Playing 'vm-goodbye.ulaw' (language 'en')
  == Spawn extension (bhati-test, 1234, 4) exited non-zero on
'SIP/2218-0000064f'

Please help me where I am wrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111121/836cc1ef/attachment.htm>


More information about the asterisk-users mailing list