login | register
Sat 17 of May, 2008 [13:30 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.40s
  • Memory usage: 2.25MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 0.75

Asterisk cmd Authenticate

Description

 Authenticate a user with a dialed passcode

Synopsis

 Authenticate(password[|options]])
 Authenticate(/passwdfile|[|options]])
 Authenticate(/db-keyfamily|d[options]])

Options

A string of options may be provided by concatenating any of the following letters:
  • a - Set account code to the password that is entered. The password will be stored in the CDR field "accountcode" and the channel variable ${ACCOUNTCODE} will be set.
  • d - Interpret path as database key family
  • j - jump to priority n+101 if the authentication fails and that priority exists
  • m - Interpret the given path as a file which contains a list of account codes and password hashes delimited with ':', listed one per line in the file. When one of the passwords is matched, the channel will have its account code set to the corresponding account code in the file.
  • r - Remove database key upon successful entry (only applicable with 'd' option)
In the development branch of Asterisk, this command has an additional option:

NOTE: The 'm' option does not set the account code unless the 'a' option is specified as well.
NOTE: When using the 'm' option, make sure that you don't create the hash with the number you want and a new line character you don't!

The application requires a user to enter a password in order to continue execution.

If the first argument of the Authenticate application begins with the '/' character, it is interpreted as a file that contains a list of acceptable passwords (one password per line). Usernames or channels cannot be specified in the password file.

If the options string contains the 'd' option, then the first argument represents a database key family, with the key being the password to be matched.
i.e.:
/FEATURE/1234 = anystring.
Here FEATURE is the key family and '1234' (the key) is the password to be matched.
The value associated with the key can be any string.

NOTE: This design is totally counterintuitive to common sense, it should have been designed as /FEATURE/TYPE = password, so that a password can be retrieved from the database when having a key (and not the password), or can be deleted without also deleting the family or tree (dbdeltree)
(counterintuitive, yes, but absolutely necessary. This is the only way to allow multiple passwords to be stored, and remove each upon use with the r option.)

See also



Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Created by oej, Last modification by chandave on Fri 12 of Oct, 2007 [06:02 UTC]

Comments Filter

Using de option m for Authenticate cmd

by jchiantera on Monday 10 of September, 2007 [20:30:16 UTC]
Is very easy, the magic word in documentation is hashed password.
in extension conf:
  Authenticate(/etc/asterisk/passwd_code.txt,am);
in passwd_code.txt
  1234:d005ce7aeef46bd18515f783fb8e87fa
  1235:b8c4c8b2271787e2f78b5fe2ce193caa
  1236:8af141d3c5a5146a3eac9d166ab4c458
to hash a password you can use md5 -s
example
  # md5 -s "9993"
  MD5 ("9993") = 8af141d3c5a5146a3eac9d166ab4c458
where 9993 is the password to hash and 8af141d3c5a5146a3eac9d166ab4c458 is hashed password
copy paste in the password file

New CDR Dialplan Function

by Gordon Knoppe on Friday 04 of May, 2007 [14:10:23 UTC]
I had difficulty getting the |a option to work in authenticate. Turned out that in newer versions (mine is 1.4.4) the ${ACCOUNTCODE} variable has been deprecated for the new dialplan function CDR. Where one would previously use Set(Code=${ACCOUNTCODE}) should now use Set(Code=CDR(accountcode)). Hope this helps someone.

Re: Alternative

by mantujha on Monday 31 of July, 2006 [07:50:03 UTC]
Hi,

I want to use authcode for IDD dailing can anyone help me in configuring it authcode will be of 4 digit followed by # and it will be dialed once user finish dialing IDD number system should prompt for Authcoce and once user dial authcode it connect to the IDD each user will use its individual Authcode

J option is broken in Authenticate...

by Walter Rodrigues Filho on Wednesday 28 of June, 2006 [01:59:00 UTC]
It seems that the "j" option is broken in Authenticate.
When I dial from outside inwards from my cellphone, the system identifies me and asks for authentication in order to give me access to DISA and throw me in my context "walter"with no password. But instead of throwing me in "default"context when I input the wrong password (priority n+101) it gives me access to DISA sameway..!?

default
include => rede-int

exten => s/13188628800,1,Answer()
exten => s/13188628800,n,Set(TIMEOUT(digit)=5)
exten => s/13188628800,n,Set(TIMEOUT(response)=10)
exten => s/13188628800,n,Authenticate(123456|j) ; <---this "j"option should jump to priority n+101 whenever authetication fails. It does not happen though.
exten => s/13188628800,n,DISA(no-password|walter)
exten => s/13188628800,n+101,Goto(default,s,1)

exten => s,1,NoOp(Numero entrante:${CALLERIDNUM})
exten => s,n,Set(CALLERID(num)=${CALLERIDNUM:-10})
exten => s,n,NoOp(Novo numero:${CALLERIDNUM})
exten => s,n,Set(VAR = 1)
exten => s,n,Ringing(1)
exten => s,n,Answer()
exten => s,n(menu),Background(menu-bemvindo-res)
exten => s,n,Waitexten(5|m)


Any comments or fixes?
thanks,
Walter R Filho

strings?

by dolson on Thursday 10 of February, 2005 [21:55:39 UTC]
Is it possible to type in strings as opposed to numbers, and have Asterisk automatically do the conversion? I know I could do it manually, but for legibility purposes, it would be nice to have...

Authenticate(mypassword) ; password is: 6972779673

Re: Passwords are exposed in reports

by ianplain on Saturday 05 of February, 2005 [00:08:16 UTC]
Hi
In my example i have changed it a bit since posting
one of the changes was the account code part

exten => 567,3,DBget(passkey=auth_user/${CALLERIDNUM})
exten => 567,4,Authenticate(${passkey})
exten => 567,5,SetAccount(${CALLERIDNUM})

what this now does is put in the caller id number as an acount code which also means that this account gets its own CDR records.


Database usage

by khb on Friday 04 of February, 2005 [19:15:38 UTC]
In database usage, the design of this command is totally counter-intuitive when storing the passcode to the database. Updated the documentation to reflect its true workings.
Here is an example of how it has to work:

;;First, set the pin code by calling this macro
[macro-myapplication_pin]]
...
exten = s,10,setvar(feature=myfeature)
exten = s,11,setvar(pin=1234)
...
exten = s,20,DBput(APP-AUTH-${feature}/${pin}=TRUE)
...



;; Now call this macro to authenticate my application

[macro-myapplication_auth]]
;; Authenticate the user of an application
;; ARG1 = application feature
exten = s,1,setvar(feature=${ARG1})
exten = s,2,answer
exten = s,3,wait(1)
exten = s,4,authenticate(/APP-AUTH-${feature}|da)
exten = s,5,playback(feature/welcome)
exten = s,6,playback(feature/${feature})
exten = s,7,my_application(${feature})
exten = s,8,playback(vm-goodbye)
exten = s,9,hangup


Edit

Passwords are exposed in reports

by Anonymous on Friday 04 of February, 2005 [04:15:08 UTC]
The problem with using the Authenticate command is that the password is exposed when I print reports for users. Is there a way to set an accountcode that identifies the user that is not the password?

Authenticate using CLI and password

by ianplain on Saturday 22 of January, 2005 [00:03:38 UTC]
Hi
Here is a simple method of authenticating users, This will work for internal and external as long as the have cli. first you need to create a database family
for example:- database put auth_user 123456 1234
will create a user whose cli must be 123456 and password is 1234

Then ad something similar to you extensions.conf

;password system

exten => 567,1,Answer ; Answer the line
exten => 567,2,Background,Welcome-to-test
exten => 567,3,DBget(passkey=auth_user/${CALLERIDNUM})
exten => 567,4,Authenticate(${passkey}|a)
exten => 567,5,SetAccount(${passkey})
exten => 567,6,WaitMusicOnHold(60)

It will be very simple to set up the system so users can change passwords themselves from their phone as well as you to add users from yours.

As this is only an example it will just play MOH.

enjoy

Edit

Re: Need to access the password after authentication

by Anonymous on Wednesday 08 of December, 2004 [22:22:46 UTC]
Sorry found it..its in accountcode if you use option .....a'

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver